first commit

This commit is contained in:
Yangtao
2025-11-18 17:48:20 +08:00
commit 6e56cab848
196 changed files with 65809 additions and 0 deletions

67
pkg/res/app_user_order.go Normal file
View File

@ -0,0 +1,67 @@
package res
import (
"servicebase/pkg/datasource/fields"
"github.com/shopspring/decimal"
)
type OrderRes struct {
IDBody
UserID string `gorm:"column:user_id;type:int;not null;comment:用户id" json:"user_id"`
Truename string `json:"truename"`
Nickname string `json:"nickname"`
OrderNo string `gorm:"column:order_no;type:varchar(255);not null;comment:订单号" json:"order_no"`
OrderStatus string `gorm:"column:order_status;type:char(2);not null;comment:订单状态 1=已下单 2=已收货 3=已付款 4=已完成 0=已取消" json:"order_status"`
OrderType int32 `gorm:"column:order_type;type:int;not null;comment:订单类型 1=到店 2=邮寄" json:"order_type"`
OrderAmount decimal.Decimal `gorm:"column:order_amount;type:decimal(10,2);not null;comment:订单金额" json:"order_amount"`
OrderExtraAmount decimal.Decimal `gorm:"column:order_extra_amount;type:decimal(10,2);not null;comment:订单额外费用挂号信要2000其他0" json:"order_extra_amount"`
OrderPayAmount decimal.Decimal `gorm:"column:order_pay_amount;type:decimal(10,2);not null;comment:订单支付金额" json:"order_pay_amount"`
OrderPayType int32 `gorm:"column:order_pay_type;type:int;not null;comment:订单支付类型1=现金 2=银行汇款 3=挂号信" json:"order_pay_type"`
OrderPayTime string `gorm:"column:order_pay_time;type:datetime;not null;comment:订单支付时间" json:"order_pay_time"`
OrderPayNo string `gorm:"column:order_pay_no;type:varchar(255);not null;comment:订单支付流水号" json:"order_pay_no"`
OrderPayStatus string `gorm:"column:order_pay_status;type:char(1);not null;comment:订单支付状态 0=未支付 1=已支付" json:"order_pay_status"`
OrderPayRemark string `gorm:"column:order_pay_remark;type:varchar(255);not null;comment:订单支付备注" json:"order_pay_remark"`
OrderRemark string `gorm:"column:order_remark;type:varchar(255);not null;comment:订单备注" json:"order_remark"`
ToShopID string `gorm:"column:to_shop_id;type:int;not null;comment:到店门店id" json:"to_shop_id"`
ToShopName string `json:"to_shop_name"`
ToShopDate string `gorm:"column:to_shop_date;type:char(10);not null;comment:到店日期" json:"to_shop_date"`
ToShopTime string `gorm:"column:to_shop_time;type:char(20);not null;comment:到店时间" json:"to_shop_time"`
ExpressArriveDate string `gorm:"column:express_arrive_date;type:varchar(20);not null;comment:快递日期" json:"express_arrive_date"`
ExpressArriveTime string `gorm:"column:express_arrive_time;type:varchar(255);not null;comment:快递时间" json:"express_arrive_time"`
InvoiceType string `gorm:"column:invoice_type;type:char(1);not null;comment:发票类型1=需要发票 2=不需要" json:"invoice_type"`
InvoiceNo string `gorm:"column:invoice_no;type:varchar(255);comment:发票号码" json:"invoice_no"`
CreateAt fields.Time `gorm:"column:create_at;type:datetime;not null;comment:Create Time" json:"create_at"`
UpdateAt fields.Time `gorm:"column:update_at;type:datetime;not null;comment:Create Time" json:"update_at"`
PersonalDocType string `gorm:"column:personal_doc_type;type:varchar(255);not null;comment:身份类型" json:"personal_doc_type"`
PersonalDoc string `gorm:"column:personal_doc;type:varchar(255);not null;comment:身份照片" json:"personal_doc"`
PersonalEndDate string `gorm:"column:personal_end_date;type:varchar(255);not null;comment:身份有效期" json:"personal_end_date"`
Details []OrderDetaliRes `json:"details" gorm:"-"`
BankName string `gorm:"column:bank_name;type:varchar(255);not null;comment:银行名" json:"bank_name"`
BranchBankName string `gorm:"column:branch_bank_name;type:varchar(255);not null;comment:支行名" json:"branch_bank_name"`
CardType string `gorm:"column:card_type;type:varchar(255);not null;comment:卡类型" json:"card_type"`
CardNo string `gorm:"column:card_no;type:varchar(255);not null;comment:卡号" json:"card_no"`
CardUserName string `gorm:"column:card_user_name;type:varchar(255);not null;comment:卡户名" json:"card_user_name"`
Birthday string `gorm:"column:birthday;type:varchar(255);not null;comment:生日" json:"birthday"`
Position string `json:"position"`
Phone string `json:"phone"`
Gender string `json:"gender"`
Prefecture string `json:"prefecture"`
Address string `json:"address"`
Building string `json:"building"`
}
type OrderDetaliRes struct {
IDBody
OrderID string `gorm:"column:order_id;type:int;not null;comment:订单ID" json:"order_id"`
ProductID string `gorm:"column:product_id;type:int;not null;comment:商品ID" json:"product_id"`
ProductName string `gorm:"column:product_name;type:varchar(255);not null;comment:商品名称" json:"product_name"`
ProductPrice decimal.Decimal `gorm:"column:product_price;type:decimal(10,2);not null;comment:商品价格" json:"product_price"`
ProductNum int32 `gorm:"column:product_num;type:int;not null;comment:商品数量" json:"product_num"`
ProductTotal decimal.Decimal `gorm:"column:product_total;type:decimal(10,2);not null;comment:商品总价" json:"product_total"`
ProductPros string `gorm:"column:product_pros;type:varchar(255);not null;comment:属性" json:"product_pros"`
CreateAt *fields.Time `gorm:"column:create_at;type:datetime;not null;comment:Create Time" json:"create_at"`
UpdateAt *fields.Time `gorm:"column:update_at;type:datetime;not null;comment:Create Time" json:"update_at"`
PriceType string `gorm:"column:price_type;type:char(50);not null;comment:价格类型" json:"price_type"`
ProductCode string `json:"product_code"`
}