Files
b2b/app/model/prestadb/ps_cart_rule.go

54 lines
4.1 KiB
Go

// 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 prestadb
import (
"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
}