Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Currency ¶
type Currency struct { Code string `gorm:"column:code;type:text;primaryKey" json:"code"` Symbol string `gorm:"column:symbol;type:text;not null" json:"symbol"` SymbolNative string `gorm:"column:symbol_native;type:text;not null" json:"symbol_native"` Name string `gorm:"column:name;type:text;not null" json:"name"` }
type MoneyAmount ¶
type MoneyAmount struct { core.BaseModel CurrencyCode string `gorm:"column:currency_code;type:text;index:IDX_money_amount_currency_code,priority:1" json:"currency_code"` Amount float64 `gorm:"column:amount;type:numeric" json:"amount"` MinQuantity float64 `gorm:"column:min_quantity;type:numeric" json:"min_quantity"` MaxQuantity float64 `gorm:"column:max_quantity;type:numeric" json:"max_quantity"` PriceSetMoneyAmount *PriceSetMoneyAmount `gorm:"foreignKey:MoneyAmountId" json:"price_set_money_amount"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_money_amount_deleted_at,priority:1" json:"deleted_at"` }
func (*MoneyAmount) TableName ¶
func (*MoneyAmount) TableName() string
type PriceList ¶
type PriceList struct { core.BaseModel Status string `gorm:"column:status;type:text;not null;default:draft" json:"status"` StartsAt time.Time `gorm:"column:starts_at;type:timestamp with time zone" json:"starts_at"` EndsAt time.Time `gorm:"column:ends_at;type:timestamp with time zone" json:"ends_at"` RulesCount int32 `gorm:"column:rules_count;type:integer;not null" json:"rules_count"` Title string `gorm:"column:title;type:text;not null" json:"title"` Name string `gorm:"column:name;type:text" json:"name"` Description string `gorm:"column:description;type:text;not null" json:"description"` Type string `gorm:"column:type;type:text;not null;default:sale" json:"type"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_price_list_deleted_at,priority:1" json:"deleted_at"` }
type PriceListRule ¶
type PriceListRule struct { ID string `gorm:"column:id;type:text;primaryKey" json:"id"` RuleTypeId string `` /* 192-byte string literal not displayed */ PriceListId string `` /* 195-byte string literal not displayed */ RuleType *RuleType `gorm:"foreignKey:RuleTypeId" json:"rule_type"` PriceList *PriceList `gorm:"foreignKey:PriceListId" json:"price_list"` PriceListRuleValues []PriceListRuleValue `gorm:"foreignKey:PriceListRuleId" json:"price_list_rule_values"` }
func (*PriceListRule) TableName ¶
func (*PriceListRule) TableName() string
type PriceListRuleValue ¶
type PriceListRuleValue struct { core.BaseModel Value string `gorm:"column:value;type:text;not null" json:"value"` PriceListRuleId string `` /* 139-byte string literal not displayed */ PriceListRule *PriceListRule `gorm:"foreignKey:PriceListRuleId" json:"price_list_rule"` DeletedAt gorm.DeletedAt `gorm:"index:idx_price_list_rule_value_deleted_at;column:deleted_at;type:timestamptz;default:null"` }
func (*PriceListRuleValue) TableName ¶
func (*PriceListRuleValue) TableName() string
type PriceRule ¶
type PriceRule struct { core.BaseModel PriceSetId string `gorm:"column:price_set_id;type:text;not null;index:IDX_price_rule_price_set_id,priority:1" json:"price_set_id"` RuleTypeId string `gorm:"column:rule_type_id;type:text;not null;index:IDX_price_rule_rule_type_id,priority:1" json:"rule_type_id"` Value string `gorm:"column:value;type:text;not null" json:"value"` Priority int32 `gorm:"column:priority;type:integer;not null" json:"priority"` PriceSetMoneyAmountId string `` /* 149-byte string literal not displayed */ DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_price_rule_deleted_at,priority:1" json:"deleted_at"` }
type PriceSet ¶
type PriceSet struct { core.BaseModel //TODO: check uuid // ID string `gorm:"column:id;type:text;primaryKey" json:"id"` PriceSetMoneyAmounts []PriceSetMoneyAmount `` /* 145-byte string literal not displayed */ PriceRules []PriceRule `gorm:"foreignKey:PriceSetId;references:id;constraint:OnDelete:CASCADE;index:idx_price_set_price_rules" json:"price_rules"` MoneyAmounts []MoneyAmount `gorm:"many2many:price_set_money_amounts;constraint:OnDelete:CASCADE;index:idx_price_set_money_amounts" json:"money_amounts"` RuleTypes []RuleType `gorm:"many2many:price_set_rule_types;constraint:OnDelete:CASCADE;index:idx_price_set_rule_types" json:"rule_types"` }
type PriceSetMoneyAmount ¶
type PriceSetMoneyAmount struct { core.BaseModel Title string `gorm:"column:title;type:text;not null" json:"title"` PriceSetId string `gorm:"column:price_set_id;type:text;not null;index:IDX_price_set_money_amount_price_set_id,priority:1" json:"price_set_id"` MoneyAmountId string `` /* 200-byte string literal not displayed */ RulesCount int32 `gorm:"column:rules_count;type:integer;not null" json:"rules_count"` PriceListId string `gorm:"column:price_list_id;type:text;index:IDX_price_rule_price_list_id,priority:1" json:"price_list_id"` PriceSet *PriceSet `` /* 133-byte string literal not displayed */ MoneyAmount *MoneyAmount `` /* 142-byte string literal not displayed */ PriceList *PriceList `` /* 136-byte string literal not displayed */ PriceRules []PriceRule `` /* 131-byte string literal not displayed */ PriceSetMoneyAmountRules []PriceSetMoneyAmountRules `` /* 142-byte string literal not displayed */ DeletedAt gorm.DeletedAt `` /* 127-byte string literal not displayed */ }
func (*PriceSetMoneyAmount) TableName ¶
func (*PriceSetMoneyAmount) TableName() string
type PriceSetMoneyAmountRules ¶
type PriceSetMoneyAmountRules struct { core.BaseModel PriceSetMoneyAmountId string `` /* 167-byte string literal not displayed */ RuleTypeId string `` /* 128-byte string literal not displayed */ Value string `gorm:"column:value;type:text;not null" json:"value"` DeletedAt gorm.DeletedAt `gorm:"index:idx_price_set_money_amount_rules_deleted_at;column:deleted_at;type:timestamptz;default:null"` }
func (*PriceSetMoneyAmountRules) TableName ¶
func (*PriceSetMoneyAmountRules) TableName() string
type PriceSetRuleType ¶
type PriceSetRuleType struct { core.BaseModel //TODO: check uuid // ID string `gorm:"column:id;type:text;primaryKey" json:"id"` PriceSetId string `gorm:"column:price_set_id;type:text;not null;index:IDX_price_set_rule_type_price_set_id,priority:1" json:"price_set_id"` RuleTypeId string `gorm:"column:rule_type_id;type:text;not null;index:IDX_price_set_rule_type_rule_type_id,priority:1" json:"rule_type_id"` PriceSet *PriceSet `gorm:"foreignKey:PriceSetID;references:id;constraint:OnDelete:CASCADE;index:idx_price_set_rule_type_price_set_id"` RuleType *RuleType `gorm:"foreignKey:RuleTypeID;references:id;constraint:OnDelete:CASCADE;index:idx_price_set_rule_type_rule_type_id"` }
func (*PriceSetRuleType) TableName ¶
func (*PriceSetRuleType) TableName() string
type RuleType ¶
type RuleType struct { core.BaseModel //TODO: check uuid // ID string `gorm:"column:id;type:text;primaryKey" json:"id"` Name string `gorm:"column:name;type:text;not null" json:"name"` RuleAttribute string `gorm:"column:rule_attribute;type:text;not null;index:IDX_rule_type_rule_attribute,priority:1" json:"rule_attribute"` DefaultPriority int32 `gorm:"column:default_priority;type:integer;not null" json:"default_priority"` PriceSets []PriceSet `gorm:"many2many:price_set_rule_types;constraint:OnDelete:CASCADE;index:idx_price_set_rule_types" json:"price_sets"` }
Click to show internal directories.
Click to hide internal directories.