Use table name constant in Cols for type safety
This commit is contained in:
124
app/model/dbmodel/ps_cart_rule.go
Normal file
124
app/model/dbmodel/ps_cart_rule.go
Normal file
@@ -0,0 +1,124 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package dbmodel
|
||||
|
||||
import (
|
||||
"git.ma-al.com/goc_marek/gormcol"
|
||||
"time"
|
||||
)
|
||||
|
||||
const TableNamePsCartRule = "ps_cart_rule"
|
||||
|
||||
// PsCartRule mapped from table <ps_cart_rule>
|
||||
type PsCartRule struct {
|
||||
IDCartRule int32 `gorm:"column:id_cart_rule;primaryKey;autoIncrement:true" json:"id_cart_rule"`
|
||||
IDCustomer int32 `gorm:"column:id_customer;not null;index:id_customer,priority:1;index:id_customer_2,priority:1" json:"id_customer"`
|
||||
DateFrom time.Time `gorm:"column:date_from;not null;index:date_from,priority:1" json:"date_from"`
|
||||
DateTo time.Time `gorm:"column:date_to;not null;index:date_to,priority:1;index:group_restriction,priority:3;index:group_restriction_2,priority:4;index:id_customer,priority:3;index:id_customer_2,priority:4" json:"date_to"`
|
||||
Description *string `gorm:"column:description" json:"description"`
|
||||
Quantity int32 `gorm:"column:quantity;not null" json:"quantity"`
|
||||
QuantityPerUser int32 `gorm:"column:quantity_per_user;not null" json:"quantity_per_user"`
|
||||
Priority int32 `gorm:"column:priority;not null;default:1" json:"priority"`
|
||||
PartialUse bool `gorm:"column:partial_use;not null" json:"partial_use"`
|
||||
Code string `gorm:"column:code;not null" json:"code"`
|
||||
MinimumAmount float64 `gorm:"column:minimum_amount;not null;default:0.00" json:"minimum_amount"`
|
||||
MinimumAmountTax bool `gorm:"column:minimum_amount_tax;not null" json:"minimum_amount_tax"`
|
||||
MinimumAmountCurrency int32 `gorm:"column:minimum_amount_currency;not null" json:"minimum_amount_currency"`
|
||||
MinimumAmountShipping bool `gorm:"column:minimum_amount_shipping;not null" json:"minimum_amount_shipping"`
|
||||
CountryRestriction bool `gorm:"column:country_restriction;not null" json:"country_restriction"`
|
||||
CarrierRestriction bool `gorm:"column:carrier_restriction;not null" json:"carrier_restriction"`
|
||||
GroupRestriction bool `gorm:"column:group_restriction;not null;index:group_restriction,priority:1;index:group_restriction_2,priority:1" json:"group_restriction"`
|
||||
CartRuleRestriction bool `gorm:"column:cart_rule_restriction;not null" json:"cart_rule_restriction"`
|
||||
ProductRestriction bool `gorm:"column:product_restriction;not null" json:"product_restriction"`
|
||||
ShopRestriction bool `gorm:"column:shop_restriction;not null" json:"shop_restriction"`
|
||||
FreeShipping bool `gorm:"column:free_shipping;not null" json:"free_shipping"`
|
||||
ReductionPercent float64 `gorm:"column:reduction_percent;not null;default:0.00" json:"reduction_percent"`
|
||||
ReductionAmount float64 `gorm:"column:reduction_amount;not null;default:0.00" json:"reduction_amount"`
|
||||
ReductionTax bool `gorm:"column:reduction_tax;not null" json:"reduction_tax"`
|
||||
ReductionCurrency int32 `gorm:"column:reduction_currency;not null" json:"reduction_currency"`
|
||||
ReductionProduct int32 `gorm:"column:reduction_product;not null" json:"reduction_product"`
|
||||
ReductionExcludeSpecial bool `gorm:"column:reduction_exclude_special;not null" json:"reduction_exclude_special"`
|
||||
GiftProduct int32 `gorm:"column:gift_product;not null" json:"gift_product"`
|
||||
GiftProductAttribute int32 `gorm:"column:gift_product_attribute;not null" json:"gift_product_attribute"`
|
||||
Highlight bool `gorm:"column:highlight;not null;index:group_restriction_2,priority:3;index:id_customer_2,priority:3" json:"highlight"`
|
||||
Active bool `gorm:"column:active;not null;index:group_restriction,priority:2;index:group_restriction_2,priority:2;index:id_customer,priority:2;index:id_customer_2,priority:2" json:"active"`
|
||||
DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"`
|
||||
DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"`
|
||||
}
|
||||
|
||||
// TableName PsCartRule's table name
|
||||
func (*PsCartRule) TableName() string {
|
||||
return TableNamePsCartRule
|
||||
}
|
||||
|
||||
var PsCartRuleCols = struct {
|
||||
IDCartRule gormcol.Field
|
||||
IDCustomer gormcol.Field
|
||||
DateFrom gormcol.Field
|
||||
DateTo gormcol.Field
|
||||
Description gormcol.Field
|
||||
Quantity gormcol.Field
|
||||
QuantityPerUser gormcol.Field
|
||||
Priority gormcol.Field
|
||||
PartialUse gormcol.Field
|
||||
Code gormcol.Field
|
||||
MinimumAmount gormcol.Field
|
||||
MinimumAmountTax gormcol.Field
|
||||
MinimumAmountCurrency gormcol.Field
|
||||
MinimumAmountShipping gormcol.Field
|
||||
CountryRestriction gormcol.Field
|
||||
CarrierRestriction gormcol.Field
|
||||
GroupRestriction gormcol.Field
|
||||
CartRuleRestriction gormcol.Field
|
||||
ProductRestriction gormcol.Field
|
||||
ShopRestriction gormcol.Field
|
||||
FreeShipping gormcol.Field
|
||||
ReductionPercent gormcol.Field
|
||||
ReductionAmount gormcol.Field
|
||||
ReductionTax gormcol.Field
|
||||
ReductionCurrency gormcol.Field
|
||||
ReductionProduct gormcol.Field
|
||||
ReductionExcludeSpecial gormcol.Field
|
||||
GiftProduct gormcol.Field
|
||||
GiftProductAttribute gormcol.Field
|
||||
Highlight gormcol.Field
|
||||
Active gormcol.Field
|
||||
DateAdd gormcol.Field
|
||||
DateUpd gormcol.Field
|
||||
}{
|
||||
IDCartRule: gormcol.Field{Table: TableNamePsCartRule, Column: "id_cart_rule"},
|
||||
IDCustomer: gormcol.Field{Table: TableNamePsCartRule, Column: "id_customer"},
|
||||
DateFrom: gormcol.Field{Table: TableNamePsCartRule, Column: "date_from"},
|
||||
DateTo: gormcol.Field{Table: TableNamePsCartRule, Column: "date_to"},
|
||||
Description: gormcol.Field{Table: TableNamePsCartRule, Column: "description"},
|
||||
Quantity: gormcol.Field{Table: TableNamePsCartRule, Column: "quantity"},
|
||||
QuantityPerUser: gormcol.Field{Table: TableNamePsCartRule, Column: "quantity_per_user"},
|
||||
Priority: gormcol.Field{Table: TableNamePsCartRule, Column: "priority"},
|
||||
PartialUse: gormcol.Field{Table: TableNamePsCartRule, Column: "partial_use"},
|
||||
Code: gormcol.Field{Table: TableNamePsCartRule, Column: "code"},
|
||||
MinimumAmount: gormcol.Field{Table: TableNamePsCartRule, Column: "minimum_amount"},
|
||||
MinimumAmountTax: gormcol.Field{Table: TableNamePsCartRule, Column: "minimum_amount_tax"},
|
||||
MinimumAmountCurrency: gormcol.Field{Table: TableNamePsCartRule, Column: "minimum_amount_currency"},
|
||||
MinimumAmountShipping: gormcol.Field{Table: TableNamePsCartRule, Column: "minimum_amount_shipping"},
|
||||
CountryRestriction: gormcol.Field{Table: TableNamePsCartRule, Column: "country_restriction"},
|
||||
CarrierRestriction: gormcol.Field{Table: TableNamePsCartRule, Column: "carrier_restriction"},
|
||||
GroupRestriction: gormcol.Field{Table: TableNamePsCartRule, Column: "group_restriction"},
|
||||
CartRuleRestriction: gormcol.Field{Table: TableNamePsCartRule, Column: "cart_rule_restriction"},
|
||||
ProductRestriction: gormcol.Field{Table: TableNamePsCartRule, Column: "product_restriction"},
|
||||
ShopRestriction: gormcol.Field{Table: TableNamePsCartRule, Column: "shop_restriction"},
|
||||
FreeShipping: gormcol.Field{Table: TableNamePsCartRule, Column: "free_shipping"},
|
||||
ReductionPercent: gormcol.Field{Table: TableNamePsCartRule, Column: "reduction_percent"},
|
||||
ReductionAmount: gormcol.Field{Table: TableNamePsCartRule, Column: "reduction_amount"},
|
||||
ReductionTax: gormcol.Field{Table: TableNamePsCartRule, Column: "reduction_tax"},
|
||||
ReductionCurrency: gormcol.Field{Table: TableNamePsCartRule, Column: "reduction_currency"},
|
||||
ReductionProduct: gormcol.Field{Table: TableNamePsCartRule, Column: "reduction_product"},
|
||||
ReductionExcludeSpecial: gormcol.Field{Table: TableNamePsCartRule, Column: "reduction_exclude_special"},
|
||||
GiftProduct: gormcol.Field{Table: TableNamePsCartRule, Column: "gift_product"},
|
||||
GiftProductAttribute: gormcol.Field{Table: TableNamePsCartRule, Column: "gift_product_attribute"},
|
||||
Highlight: gormcol.Field{Table: TableNamePsCartRule, Column: "highlight"},
|
||||
Active: gormcol.Field{Table: TableNamePsCartRule, Column: "active"},
|
||||
DateAdd: gormcol.Field{Table: TableNamePsCartRule, Column: "date_add"},
|
||||
DateUpd: gormcol.Field{Table: TableNamePsCartRule, Column: "date_upd"},
|
||||
}
|
||||
Reference in New Issue
Block a user