models

package
v0.0.0-...-993f9dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	core.BaseModel

	FulfillmentId string         `gorm:"column:fulfillment_id;type:text;index:IDX_fulfillment_address_fulfillment_id,priority:1" json:"fulfillment_id"`
	Company       string         `gorm:"column:company;type:text" json:"company"`
	FirstName     string         `gorm:"column:first_name;type:text" json:"first_name"`
	LastName      string         `gorm:"column:last_name;type:text" json:"last_name"`
	Address1      string         `gorm:"column:address_1;type:text" json:"address_1"`
	Address2      string         `gorm:"column:address_2;type:text" json:"address_2"`
	City          string         `gorm:"column:city;type:text" json:"city"`
	CountryCode   string         `gorm:"column:country_code;type:text" json:"country_code"`
	Province      string         `gorm:"column:province;type:text" json:"province"`
	PostalCode    string         `gorm:"column:postal_code;type:text" json:"postal_code"`
	Phone         string         `gorm:"column:phone;type:text" json:"phone"`
	DeletedAt     gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_fulfillment_address_deleted_at,priority:1" json:"deleted_at"`
}

func (*Address) TableName

func (*Address) TableName() string

type Fulfillment

type Fulfillment struct {
	core.BaseModel

	LocationId        string             `gorm:"column:location_id;type:text;not null;index:IDX_fulfillment_location_id,priority:1" json:"location_id"`
	PackedAt          time.Time          `gorm:"column:packed_at;type:timestamp with time zone" json:"packed_at"`
	ShippedAt         time.Time          `gorm:"column:shipped_at;type:timestamp with time zone" json:"shipped_at"`
	DeliveredAt       time.Time          `gorm:"column:delivered_at;type:timestamp with time zone" json:"delivered_at"`
	CanceledAt        time.Time          `gorm:"column:canceled_at;type:timestamp with time zone" json:"canceled_at"`
	Data              string             `gorm:"column:data;type:jsonb" json:"data"`
	ProviderId        string             `gorm:"column:provider_id;type:text;not null;index:IDX_fulfillment_provider_id,priority:1" json:"provider_id"`
	ShippingOptionId  string             `gorm:"column:shipping_option_id;type:text;index:IDX_fulfillment_shipping_option_id,priority:1" json:"shipping_option_id"`
	DeliveryAddressId string             `gorm:"column:delivery_address_id;type:text;not null" json:"delivery_address_id"`
	ItemsId           string             `gorm:"column:items_id;type:text;not null" json:"items_id"`
	ShippingOption    *ShippingOption    `gorm:"foreignKey:ShippingOptionId;references:ID;constraint:OnDelete:CASCADE" json:"shipping_option"`
	Provider          *ServiceProvider   `gorm:"foreignKey:ProviderId;references:ID;constraint:OnDelete:CASCADE" json:"provider"`
	DeliveryAddress   *Address           `gorm:"foreignKey:DeliveryAddressId;references:ID;constraint:OnDelete:CASCADE" json:"delivery_address"`
	Items             []FulfillmentItem  `gorm:"foreignKey:FulfillmentId;references:ID;constraint:OnDelete:CASCADE" json:"items"`
	Labels            []FulfillmentLabel `gorm:"foreignKey:FulfillmentId;references:ID;constraint:OnDelete:CASCADE" json:"labels"`
	DeletedAt         gorm.DeletedAt     `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_fulfillment_deleted_at,priority:1" json:"deleted_at"`
}

func (*Fulfillment) TableName

func (*Fulfillment) TableName() string

type FulfillmentItem

type FulfillmentItem struct {
	core.BaseModel

	Title           string         `gorm:"column:title;type:text;not null" json:"title"`
	Sku             string         `gorm:"column:sku;type:text;not null" json:"sku"`
	Barcode         string         `gorm:"column:barcode;type:text;not null" json:"barcode"`
	Quantity        float64        `gorm:"column:quantity;type:numeric;not null" json:"quantity"`
	LineItemId      string         `gorm:"column:line_item_id;type:text;index:IDX_fulfillment_item_line_item_id,priority:1" json:"line_item_id"`
	InventoryItemId string         `gorm:"column:inventory_item_id;type:text;index:IDX_fulfillment_item_inventory_item_id,priority:1" json:"inventory_item_id"`
	FulfillmentId   string         `gorm:"column:fulfillment_id;type:text;not null;index:IDX_fulfillment_item_fulfillment_id,priority:1" json:"fulfillment_id"`
	Fulfillment     *Fulfillment   `gorm:"foreignKey:FulfillmentID;references:ID;constraint:OnDelete:CASCADE" json:"fulfillment"`
	DeletedAt       gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_fulfillment_item_deleted_at,priority:1" json:"deleted_at"`
}

func (*FulfillmentItem) TableName

func (*FulfillmentItem) TableName() string

type FulfillmentLabel

type FulfillmentLabel struct {
	core.BaseModel

	TrackingNumber string         `gorm:"column:tracking_number;type:text;not null" json:"tracking_number"`
	TrackingURL    string         `gorm:"column:tracking_url;type:text;not null" json:"tracking_url"`
	LabelURL       string         `gorm:"column:label_url;type:text;not null" json:"label_url"`
	FulfillmentId  string         `gorm:"column:fulfillment_id;type:text;not null;index:IDX_fulfillment_label_fulfillment_id,priority:1" json:"fulfillment_id"`
	Fulfillment    *Fulfillment   `gorm:"foreignKey:FulfillmentId;references:ID;constraint:OnDelete:CASCADE" json:"fulfillment"`
	DeletedAt      gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_fulfillment_label_deleted_at,priority:1" json:"deleted_at"`
}

func (*FulfillmentLabel) TableName

func (*FulfillmentLabel) TableName() string

type FulfillmentSet

type FulfillmentSet struct {
	core.BaseModel

	Name         string         `gorm:"column:name;type:text;not null;uniqueIndex:IDX_fulfillment_set_name_unique,priority:1" json:"name"`
	Type         string         `gorm:"column:type;type:text;not null" json:"type"`
	ServiceZones []ServiceZone  `gorm:"foreignKey:FulfillmentSetId;references:ID;constraint:OnDelete:CASCADE" json:"service_zones"`
	DeletedAt    gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_fulfillment_set_deleted_at,priority:1" json:"deleted_at"`
}

func (*FulfillmentSet) TableName

func (*FulfillmentSet) TableName() string

type GeoZone

type GeoZone struct {
	core.BaseModel

	Type             string         `gorm:"column:type;type:text;not null;default:country" json:"type"`
	CountryCode      string         `gorm:"column:country_code;type:text;not null;index:IDX_geo_zone_country_code,priority:1" json:"country_code"`
	ProvinceCode     string         `gorm:"column:province_code;type:text;index:IDX_geo_zone_province_code,priority:1" json:"province_code"`
	City             string         `gorm:"column:city;type:text;index:IDX_geo_zone_city,priority:1" json:"city"`
	ServiceZoneId    string         `gorm:"column:service_zone_id;type:text;not null;index:IDX_geo_zone_service_zone_id,priority:1" json:"service_zone_id"`
	PostalExpression string         `gorm:"column:postal_expression;type:jsonb" json:"postal_expression"`
	ServiceZone      *ServiceZone   `gorm:"foreignKey:ServiceZoneId;references:ID;constraint:OnDelete:CASCADE" json:"service_zone"`
	DeletedAt        gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_geo_zone_deleted_at,priority:1" json:"deleted_at"`
}

func (*GeoZone) TableName

func (*GeoZone) TableName() string

type ServiceProvider

type ServiceProvider struct {
	core.BaseModel

	ShippingOptions []ShippingOption `gorm:"foreignKey:ServiceProviderId" json:"shipping_options"`
	DeletedAt       gorm.DeletedAt   `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_service_provider_deleted_at,priority:1" json:"deleted_at"`
}

func (*ServiceProvider) TableName

func (*ServiceProvider) TableName() string

type ServiceZone

type ServiceZone struct {
	core.BaseModel

	Name             string           `gorm:"column:name;type:text;not null;uniqueIndex:IDX_service_zone_name_unique,priority:1" json:"name"`
	FulfillmentSetId string           `` /* 130-byte string literal not displayed */
	FulfillmentSet   *FulfillmentSet  `gorm:"foreignKey:FulfillmentSetId" json:"fulfillment_set"`
	GeoZones         []GeoZone        `gorm:"foreignKey:ServiceZoneId" json:"geo_zones"`
	ShippingOptions  []ShippingOption `gorm:"foreignKey:ServiceZoneId" json:"shipping_options"`
	DeletedAt        gorm.DeletedAt   `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_service_zone_deleted_at,priority:1" json:"deleted_at"`
}

func (*ServiceZone) TableName

func (*ServiceZone) TableName() string

type ShippingOption

type ShippingOption struct {
	core.BaseModel

	Name                 string               `gorm:"column:name;type:text;not null" json:"name"`
	PriceType            string               `gorm:"column:price_type;type:text;not null;default:calculated" json:"price_type"`
	ServiceZoneId        string               `gorm:"column:service_zone_id;type:text;not null;index:IDX_shipping_option_service_zone_id,priority:1" json:"service_zone_id"`
	ShippingProfileId    string               `` /* 127-byte string literal not displayed */
	ServiceProviderId    string               `` /* 127-byte string literal not displayed */
	ShippingOptionTypeId string               `` /* 209-byte string literal not displayed */
	Data                 string               `gorm:"column:data;type:jsonb" json:"data"`
	ServiceZone          *ServiceZone         `gorm:"foreignKey:ServiceZoneId" json:"service_zone"`
	ShippingProfile      *ShippingProfile     `gorm:"foreignKey:ShippingProfileId" json:"shipping_profile"`
	ServiceProvider      *ServiceProvider     `gorm:"foreignKey:ServiceProviderId" json:"service_provider"`
	ShippingOptionType   *ShippingOptionType  `gorm:"foreignKey:ShippingOptionTypeId" json:"shipping_option_type"`
	Rules                []ShippingOptionRule `gorm:"foreignKey:ShippingOptionId" json:"rules"`
	Fulfillments         []Fulfillment        `gorm:"foreignKey:ShippingOptionId" json:"fulfillments"`
	DeletedAt            gorm.DeletedAt       `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_shipping_option_deleted_at,priority:1" json:"deleted_at"`
}

func (*ShippingOption) TableName

func (*ShippingOption) TableName() string

type ShippingOptionRule

type ShippingOptionRule struct {
	core.BaseModel

	Attribute        string          `gorm:"column:attribute;type:text;not null" json:"attribute"`
	Operator         string          `gorm:"column:operator;type:text;not null" json:"operator"`
	Value            string          `gorm:"column:value;type:jsonb" json:"value"`
	ShippingOptionId string          `` /* 138-byte string literal not displayed */
	ShippingOption   *ShippingOption `gorm:"foreignKey:ShippingOptionId" json:"shipping_option"`
	DeletedAt        gorm.DeletedAt  `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_shipping_option_rule_deleted_at,priority:1" json:"deleted_at"`
}

func (*ShippingOptionRule) TableName

func (*ShippingOptionRule) TableName() string

type ShippingOptionType

type ShippingOptionType struct {
	core.BaseModel

	Label            string          `gorm:"column:label;type:text;not null" json:"label"`
	Description      string          `gorm:"column:description;type:text" json:"description"`
	Code             string          `gorm:"column:code;type:text;not null" json:"code"`
	ShippingOptionId string          `` /* 138-byte string literal not displayed */
	ShippingOption   *ShippingOption `gorm:"foreignKey:ShippingOptionId" json:"shipping_option"`
	DeletedAt        gorm.DeletedAt  `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_shipping_option_type_deleted_at,priority:1" json:"deleted_at"`
}

func (*ShippingOptionType) TableName

func (*ShippingOptionType) TableName() string

type ShippingProfile

type ShippingProfile struct {
	core.BaseModel

	Name            string           `gorm:"column:name;type:text;not null;uniqueIndex:IDX_shipping_profile_name_unique,priority:1" json:"name"`
	Type            string           `gorm:"column:type;type:text;not null" json:"type"`
	ShippingOptions []ShippingOption `gorm:"foreignKey:ShippingProfileId" json:"shipping_options"`
	DeletedAt       gorm.DeletedAt   `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_shipping_profile_deleted_at,priority:1" json:"deleted_at"`
}

func (*ShippingProfile) TableName

func (*ShippingProfile) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL