package order_preview import ( "github.com/golangkit/formatime" "github.com/shopspring/decimal" ) type Information struct { ID uint `gorm:"column:id;primary_key" json:"id"` AncestorID uint `gorm:"column:ancestor_id" json:"-"` ParentID uint `gorm:"column:parent_id" json:"parentId" ` // 分享者id,链接购买则是分享者id。其他方式则是自己上级的id SharerID uint `gorm:"column:sharer_id" json:"sharerId"` LiveId uint `gorm:"column:live_id" json:"liveId"` UserID uint `gorm:"column:user_id" json:"userId"` // 下单者 UserRole uint `gorm:"column:user_role" json:"userRole"` Title string `gorm:"column:title" json:"-"` // 订单简要标题 BrandCouponTotalAmount decimal.Decimal `gorm:"column:brand_coupon_total_amount" json:"brandCouponTotalAmount"` // 品牌优惠券抵扣总金额 UniverseCouponTotalAmount decimal.Decimal `gorm:"column:universe_coupon_total_amount" json:"universeCouponTotalAmount"` // 购物券抵扣总金额 CoinTotalAmount decimal.Decimal `gorm:"column:coin_total_amount" json:"coinTotalAmount"` // 瑞币抵扣总金额 ExpressTotalFee decimal.Decimal `gorm:"column:express_total_fee" json:"expressTotalFee"` // 总快递费 GoodsTotalAmount decimal.Decimal `gorm:"column:goods_total_amount" json:"goodsTotalAmount"` // 商品总金额 GoodsTotalCommission decimal.Decimal `gorm:"column:goods_total_commission" json:"goodsTotalCommission"` // 商品总返还金额 ActualTotalAmount decimal.Decimal `gorm:"column:actual_total_amount" json:"actualTotalAmount"` // 实际支付的金额 Channel uint `gorm:"column:channel" json:"-"` // 下单渠道:0详情页直接购买 1购物车结算购买' ShippingMethod uint `gorm:"column:shipping_method" json:"shippingMethod"` // 配送方式 0快递 1自提 StoreID uint `gorm:"column:store_id" json:"-"` // 门店id BuyerMessage string `gorm:"column:buyer_message" json:"buyerMessage"` // 买家留言。不超过50个字 CreatedAt formatime.Second `gorm:"column:created_at" json:"-"` // 创建时间 Cost decimal.Decimal `json:"-"` OrderType uint `json:"-"` IsVirtual bool `json:"-"` } // TableName sets the insert table name for this struct type func (r *Information) TableName() string { return "recook_order_preview_info" }