修改gorm序列化错误
This commit is contained in:
parent
78c886f057
commit
31111a5332
|
@ -106,7 +106,7 @@ func GenFromPath(pth string) {
|
|||
tagstr += "\"primary_key\""
|
||||
typeName = typeName[1:]
|
||||
} else {
|
||||
tagstr += "\"\""
|
||||
tagstr += "\"-\""
|
||||
}
|
||||
tagstr += fmt.Sprintf(" json:\"%s\"`", col.Name)
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ import (
|
|||
|
||||
type FsCanteenType struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // ID
|
||||
Name *string `gorm:"" json:"name"` // 餐厅名字
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序
|
||||
Status *int64 `gorm:"" json:"status"` // 状态位 1启用0停用
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
Name *string `gorm:"-" json:"name"` // 餐厅名字
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态位 1启用0停用
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
}
|
||||
type FsCanteenTypeModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ import (
|
|||
)
|
||||
|
||||
type FsFont struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // id
|
||||
Title *string `gorm:"" json:"title"` // 字体名字
|
||||
LinuxFontname *string `gorm:"" json:"linux_fontname"` // linux对应字体名
|
||||
FilePath *string `gorm:"" json:"file_path"` // 字体文件路径
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序
|
||||
Id int64 `gorm:"primary_key" json:"id"` // id
|
||||
Title *string `gorm:"-" json:"title"` // 字体名字
|
||||
LinuxFontname *string `gorm:"-" json:"linux_fontname"` // linux对应字体名
|
||||
FilePath *string `gorm:"-" json:"file_path"` // 字体文件路径
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序
|
||||
}
|
||||
type FsFontModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,21 +5,21 @@ import (
|
|||
)
|
||||
|
||||
type FsPay struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
UserId *int64 `gorm:"" json:"user_id"` // 用户id
|
||||
OrderNumber *string `gorm:"" json:"order_number"` // 订单编号
|
||||
TradeNo *string `gorm:"" json:"trade_no"` // 第三方支付编号
|
||||
PayAmount *int64 `gorm:"" json:"pay_amount"` // 支付金额 (分)
|
||||
PayStatus *int64 `gorm:"" json:"pay_status"` // 支付状态 0 不成功 1 成功
|
||||
IsRefund *int64 `gorm:"" json:"is_refund"` // 是否退款 0 未退款 1退款
|
||||
PaymentMethod *int64 `gorm:"" json:"payment_method"` // 支付方式 1 stripe 2 paypal
|
||||
PayStage *int64 `gorm:"" json:"pay_stage"` // 支付阶段 1首付 2尾款
|
||||
OrderSource *int64 `gorm:"" json:"order_source"` // 订单来源 1pc
|
||||
PayTime *int64 `gorm:"" json:"pay_time"` // 支付时间
|
||||
CreatedAt *int64 `gorm:"" json:"created_at"` // 创建时间
|
||||
UpdatedAt *int64 `gorm:"" json:"updated_at"` // 更新时间
|
||||
CardNo *string `gorm:"" json:"card_no"` // 卡后4位
|
||||
Brand *string `gorm:"" json:"brand"` // 银行品牌
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
UserId *int64 `gorm:"-" json:"user_id"` // 用户id
|
||||
OrderNumber *string `gorm:"-" json:"order_number"` // 订单编号
|
||||
TradeNo *string `gorm:"-" json:"trade_no"` // 第三方支付编号
|
||||
PayAmount *int64 `gorm:"-" json:"pay_amount"` // 支付金额 (分)
|
||||
PayStatus *int64 `gorm:"-" json:"pay_status"` // 支付状态 0 不成功 1 成功
|
||||
IsRefund *int64 `gorm:"-" json:"is_refund"` // 是否退款 0 未退款 1退款
|
||||
PaymentMethod *int64 `gorm:"-" json:"payment_method"` // 支付方式 1 stripe 2 paypal
|
||||
PayStage *int64 `gorm:"-" json:"pay_stage"` // 支付阶段 1首付 2尾款
|
||||
OrderSource *int64 `gorm:"-" json:"order_source"` // 订单来源 1pc
|
||||
PayTime *int64 `gorm:"-" json:"pay_time"` // 支付时间
|
||||
CreatedAt *int64 `gorm:"-" json:"created_at"` // 创建时间
|
||||
UpdatedAt *int64 `gorm:"-" json:"updated_at"` // 更新时间
|
||||
CardNo *string `gorm:"-" json:"card_no"` // 卡后4位
|
||||
Brand *string `gorm:"-" json:"brand"` // 银行品牌
|
||||
}
|
||||
type FsPayModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,32 +5,32 @@ import (
|
|||
)
|
||||
|
||||
type FsUser struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // ID
|
||||
FaceId *int64 `gorm:"" json:"face_id"` // facebook的userid
|
||||
Sub *int64 `gorm:"" json:"sub"` // google的sub
|
||||
FirstName *string `gorm:"" json:"first_name"` // FirstName
|
||||
LastName *string `gorm:"" json:"last_name"` // LastName
|
||||
Username *string `gorm:"" json:"username"` // 用户名
|
||||
Company *string `gorm:"" json:"company"` // 公司名称
|
||||
Mobile *string `gorm:"" json:"mobile"` // 手机号码
|
||||
AuthKey *string `gorm:"" json:"auth_key"` //
|
||||
PasswordHash *string `gorm:"" json:"password_hash"` //
|
||||
VerificationToken *string `gorm:"" json:"verification_token"` //
|
||||
PasswordResetToken *string `gorm:"" json:"password_reset_token"` //
|
||||
Email *string `gorm:"" json:"email"` // 邮箱
|
||||
Type *int64 `gorm:"" json:"type"` // 1普通餐厅 2连锁餐厅
|
||||
Status *int64 `gorm:"" json:"status"` // 1正常 0不正常
|
||||
IsDel *int64 `gorm:"" json:"is_del"` // 是否删除 1删除
|
||||
CreatedAt *int64 `gorm:"" json:"created_at"` // 添加时间
|
||||
UpdatedAt *int64 `gorm:"" json:"updated_at"` // 更新时间
|
||||
IsOrderStatusEmail *int64 `gorm:"" json:"is_order_status_email"` // 订单状态改变时是否接收邮件
|
||||
IsEmailAdvertisement *int64 `gorm:"" json:"is_email_advertisement"` // 是否接收邮件广告
|
||||
IsOrderStatusPhone *int64 `gorm:"" json:"is_order_status_phone"` // 订单状态改变是是否接收电话
|
||||
IsPhoneAdvertisement *int64 `gorm:"" json:"is_phone_advertisement"` // 是否接收短信广告
|
||||
IsOpenRender *int64 `gorm:"" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
||||
IsThousandFace *int64 `gorm:"" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
||||
IsLowRendering *int64 `gorm:"" json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
||||
IsRemoveBg *int64 `gorm:"" json:"is_remove_bg"` // 用户上传logo是否去除背景
|
||||
Id int64 `gorm:"primary_key" json:"id"` // ID
|
||||
FaceId *int64 `gorm:"-" json:"face_id"` // facebook的userid
|
||||
Sub *int64 `gorm:"-" json:"sub"` // google的sub
|
||||
FirstName *string `gorm:"-" json:"first_name"` // FirstName
|
||||
LastName *string `gorm:"-" json:"last_name"` // LastName
|
||||
Username *string `gorm:"-" json:"username"` // 用户名
|
||||
Company *string `gorm:"-" json:"company"` // 公司名称
|
||||
Mobile *string `gorm:"-" json:"mobile"` // 手机号码
|
||||
AuthKey *string `gorm:"-" json:"auth_key"` //
|
||||
PasswordHash *string `gorm:"-" json:"password_hash"` //
|
||||
VerificationToken *string `gorm:"-" json:"verification_token"` //
|
||||
PasswordResetToken *string `gorm:"-" json:"password_reset_token"` //
|
||||
Email *string `gorm:"-" json:"email"` // 邮箱
|
||||
Type *int64 `gorm:"-" json:"type"` // 1普通餐厅 2连锁餐厅
|
||||
Status *int64 `gorm:"-" json:"status"` // 1正常 0不正常
|
||||
IsDel *int64 `gorm:"-" json:"is_del"` // 是否删除 1删除
|
||||
CreatedAt *int64 `gorm:"-" json:"created_at"` // 添加时间
|
||||
UpdatedAt *int64 `gorm:"-" json:"updated_at"` // 更新时间
|
||||
IsOrderStatusEmail *int64 `gorm:"-" json:"is_order_status_email"` // 订单状态改变时是否接收邮件
|
||||
IsEmailAdvertisement *int64 `gorm:"-" json:"is_email_advertisement"` // 是否接收邮件广告
|
||||
IsOrderStatusPhone *int64 `gorm:"-" json:"is_order_status_phone"` // 订单状态改变是是否接收电话
|
||||
IsPhoneAdvertisement *int64 `gorm:"-" json:"is_phone_advertisement"` // 是否接收短信广告
|
||||
IsOpenRender *int64 `gorm:"-" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
||||
IsThousandFace *int64 `gorm:"-" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
||||
IsLowRendering *int64 `gorm:"-" json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
||||
IsRemoveBg *int64 `gorm:"-" json:"is_remove_bg"` // 用户上传logo是否去除背景
|
||||
}
|
||||
type FsUserModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -8,18 +8,18 @@ import (
|
|||
|
||||
type UserBasicInfoForSave struct {
|
||||
ID uint `gorm:"primary_key" json:"id"`
|
||||
FirstName string `gorm:"" json:"first_name"`
|
||||
LastName string `gorm:"" json:"last_name"`
|
||||
Mobile string `gorm:"" json:"mobile"`
|
||||
Company string `gorm:"" json:"company"`
|
||||
IsOrderStatusEmail int64 `gorm:"" json:"is_order_status_email"`
|
||||
IsEmailAdvertisement int64 `gorm:"" json:"is_email_advertisement"`
|
||||
IsOrderStatusPhone int64 `gorm:"" json:"is_order_status_phone"`
|
||||
IsPhoneAdvertisement int64 `gorm:"" json:"is_phone_advertisement"`
|
||||
Type int64 `gorm:"" json:"type"`
|
||||
IsOpenRender int64 `gorm:"" json:"is_open_render"`
|
||||
IsLowRendering int64 `gorm:"" json:"is_low_rendering"`
|
||||
IsRemoveBg int64 `gorm:"" json:"is_remove_bg"`
|
||||
FirstName string `gorm:"-" json:"first_name"`
|
||||
LastName string `gorm:"-" json:"last_name"`
|
||||
Mobile string `gorm:"-" json:"mobile"`
|
||||
Company string `gorm:"-" json:"company"`
|
||||
IsOrderStatusEmail int64 `gorm:"-" json:"is_order_status_email"`
|
||||
IsEmailAdvertisement int64 `gorm:"-" json:"is_email_advertisement"`
|
||||
IsOrderStatusPhone int64 `gorm:"-" json:"is_order_status_phone"`
|
||||
IsPhoneAdvertisement int64 `gorm:"-" json:"is_phone_advertisement"`
|
||||
Type int64 `gorm:"-" json:"type"`
|
||||
IsOpenRender int64 `gorm:"-" json:"is_open_render"`
|
||||
IsLowRendering int64 `gorm:"-" json:"is_low_rendering"`
|
||||
IsRemoveBg int64 `gorm:"-" json:"is_remove_bg"`
|
||||
}
|
||||
|
||||
func (u *FsUserModel) FindUserByEmail(ctx context.Context, emailname string) (resp FsUser, err error) {
|
||||
|
|
|
@ -24,7 +24,7 @@ type FsCart struct {
|
|||
Status *int64 `gorm:"default:1" json:"status"` // 状态位
|
||||
OptionalId *int64 `gorm:"default:0" json:"optional_id"` // 选项ID
|
||||
IsCheck *int64 `gorm:"default:0" json:"is_check"` // 是否选中状态(0:未选中,1:选中)
|
||||
TsTime *time.Time `gorm:"" json:"ts_time"`
|
||||
TsTime *time.Time `gorm:"-" json:"ts_time"`
|
||||
IsEmail *int64 `gorm:"default:0" json:"is_email"` // 是否发送邮件
|
||||
}
|
||||
type FsCartModel struct {
|
||||
|
|
|
@ -11,21 +11,26 @@ import (
|
|||
|
||||
type FsGuest struct {
|
||||
GuestId int64 `gorm:"primary_key" json:"guest_id"` // 游客ID
|
||||
AuthKey *string `gorm:"" json:"auth_key"` // jwt token
|
||||
Status *int64 `gorm:"" json:"status"` // 1正常 0不正常
|
||||
IsDel *int64 `gorm:"" json:"is_del"` // 是否删除 1删除
|
||||
CreatedAt *int64 `gorm:"" json:"created_at"` // 添加时间
|
||||
UpdatedAt *int64 `gorm:"" json:"updated_at"` // 更新时间
|
||||
IsOpenRender *int64 `gorm:"" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
||||
IsThousandFace *int64 `gorm:"" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
||||
IsLowRendering *int64 `gorm:"" json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
||||
IsRemoveBg *int64 `gorm:"" json:"is_remove_bg"` // 用户上传logo是否去除背景
|
||||
AuthKey *string `gorm:"-" json:"auth_key"` // jwt token
|
||||
Status *int64 `gorm:"-" json:"status"` // 1正常 0不正常
|
||||
IsDel *int64 `gorm:"-" json:"is_del"` // 是否删除 1删除
|
||||
CreatedAt *int64 `gorm:"-" json:"created_at"` // 添加时间
|
||||
UpdatedAt *int64 `gorm:"-" json:"updated_at"` // 更新时间
|
||||
IsOpenRender *int64 `gorm:"-" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
||||
IsThousandFace *int64 `gorm:"-" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
||||
IsLowRendering *int64 `gorm:"-" json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
||||
IsRemoveBg *int64 `gorm:"-" json:"is_remove_bg"` // 用户上传logo是否去除背景
|
||||
}
|
||||
type FsGuestModel struct{ db *gorm.DB }
|
||||
|
||||
func NewFsGuestModel(db *gorm.DB) *FsGuestModel { return &FsGuestModel{db} }
|
||||
|
||||
func (m *FsGuestModel) GenerateGuestID(ctx context.Context, AccessSecret *string) (authKey string, err error) {
|
||||
var record = &FsGuest{}
|
||||
err = m.db.Create(record).Error
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
}
|
||||
|
||||
err = m.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
|
||||
now := time.Now().Unix()
|
||||
|
@ -35,7 +40,10 @@ func (m *FsGuestModel) GenerateGuestID(ctx context.Context, AccessSecret *string
|
|||
authKey, err = auth.GenerateJwtToken(AccessSecret, now, 31536000, 0, record.GuestId)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
tx.Rollback()
|
||||
err = tx.Rollback().Error
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
record.AuthKey = &authKey
|
||||
|
|
|
@ -3,8 +3,9 @@ package gmodel
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type FsOrder struct {
|
||||
|
@ -40,7 +41,7 @@ type FsOrder struct {
|
|||
IsDeleted *int64 `gorm:"default:0" json:"is_deleted"` // 是否删除(0:否,1:是)
|
||||
RefundReasonId *int64 `gorm:"default:0" json:"refund_reason_id"` // 取消订单原因ID
|
||||
RefundReason *string `gorm:"default:''" json:"refund_reason"` // 取消订单原因
|
||||
TsTime *time.Time `gorm:"" json:"ts_time"`
|
||||
TsTime *time.Time `gorm:"-" json:"ts_time"`
|
||||
IsSure *int64 `gorm:"default:0" json:"is_sure"` // 是否确认订单 1确认0未确认
|
||||
DeliverSn *string `gorm:"default:''" json:"deliver_sn"` // 发货单号
|
||||
EmailTime *int64 `gorm:"default:0" json:"email_time"` // 邮件发送时间
|
||||
|
|
|
@ -3,8 +3,9 @@ package gmodel
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type FsProductDesign struct {
|
||||
|
@ -18,7 +19,7 @@ type FsProductDesign struct {
|
|||
OptionalId *int64 `gorm:"default:0" json:"optional_id"` // 选项ID
|
||||
Cover *string `gorm:"default:''" json:"cover"` // 封面图
|
||||
Info *string `gorm:"default:''" json:"info"` // 保留的设计信息
|
||||
Utime *time.Time `gorm:"" json:"utime"` // 更新时间
|
||||
Utime *time.Time `gorm:"-" json:"utime"` // 更新时间
|
||||
Status *int64 `gorm:"default:1" json:"status"` // 状态
|
||||
IsDel *int64 `gorm:"default:0" json:"is_del"` // 是否删除 0未删除 1删除
|
||||
IsPay *int64 `gorm:"default:0" json:"is_pay"` // 是否已有支付 0 未 1 有
|
||||
|
|
|
@ -6,19 +6,19 @@ import (
|
|||
|
||||
type FsAddress struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
UserId *int64 `gorm:"" json:"user_id"` // 用户ID
|
||||
Name *string `gorm:"" json:"name"` // 地址名称
|
||||
FirstName *string `gorm:"" json:"first_name"` // FirstName
|
||||
LastName *string `gorm:"" json:"last_name"` // LastName
|
||||
Mobile *string `gorm:"" json:"mobile"` // 手机号码
|
||||
Street *string `gorm:"" json:"street"` // 街道
|
||||
Suite *string `gorm:"" json:"suite"` // 房号
|
||||
City *string `gorm:"" json:"city"` // 城市
|
||||
State *string `gorm:"" json:"state"` // 州名
|
||||
Country *string `gorm:"" json:"country"` // 国家
|
||||
ZipCode *string `gorm:"" json:"zip_code"` // 邮编
|
||||
Status *int64 `gorm:"" json:"status"` // 1正常 0异常
|
||||
IsDefault *int64 `gorm:"" json:"is_default"` // 1默认地址,0非默认地址
|
||||
UserId *int64 `gorm:"-" json:"user_id"` // 用户ID
|
||||
Name *string `gorm:"-" json:"name"` // 地址名称
|
||||
FirstName *string `gorm:"-" json:"first_name"` // FirstName
|
||||
LastName *string `gorm:"-" json:"last_name"` // LastName
|
||||
Mobile *string `gorm:"-" json:"mobile"` // 手机号码
|
||||
Street *string `gorm:"-" json:"street"` // 街道
|
||||
Suite *string `gorm:"-" json:"suite"` // 房号
|
||||
City *string `gorm:"-" json:"city"` // 城市
|
||||
State *string `gorm:"-" json:"state"` // 州名
|
||||
Country *string `gorm:"-" json:"country"` // 国家
|
||||
ZipCode *string `gorm:"-" json:"zip_code"` // 邮编
|
||||
Status *int64 `gorm:"-" json:"status"` // 1正常 0异常
|
||||
IsDefault *int64 `gorm:"-" json:"is_default"` // 1默认地址,0非默认地址
|
||||
}
|
||||
type FsAddressModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@ import (
|
|||
|
||||
type FsCanteenProduct struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // ID
|
||||
CanteenType *int64 `gorm:"" json:"canteen_type"` // 餐厅类别id
|
||||
ProductId *int64 `gorm:"" json:"product_id"` // 产品id
|
||||
SizeId *int64 `gorm:"" json:"size_id"` // 尺寸id
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序
|
||||
Status *int64 `gorm:"" json:"status"` // 状态位 1启用0停用
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
Sid *string `gorm:"" json:"sid"` // 前端带入的id
|
||||
CanteenType *int64 `gorm:"-" json:"canteen_type"` // 餐厅类别id
|
||||
ProductId *int64 `gorm:"-" json:"product_id"` // 产品id
|
||||
SizeId *int64 `gorm:"-" json:"size_id"` // 尺寸id
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态位 1启用0停用
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
Sid *string `gorm:"-" json:"sid"` // 前端带入的id
|
||||
}
|
||||
type FsCanteenProductModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ import (
|
|||
|
||||
type FsCanteenType struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // ID
|
||||
Name *string `gorm:"" json:"name"` // 餐厅名字
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序
|
||||
Status *int64 `gorm:"" json:"status"` // 状态位 1启用0停用
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
Name *string `gorm:"-" json:"name"` // 餐厅名字
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态位 1启用0停用
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
}
|
||||
type FsCanteenTypeModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -1,27 +1,28 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type FsCart struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // id
|
||||
UserId *int64 `gorm:"" json:"user_id"` // 用户ID
|
||||
ProductId *int64 `gorm:"" json:"product_id"` // 产品ID
|
||||
TemplateId *int64 `gorm:"" json:"template_id"` // 模板ID
|
||||
PriceId *int64 `gorm:"" json:"price_id"` // 价格ID
|
||||
MaterialId *int64 `gorm:"" json:"material_id"` // 材质ID
|
||||
SizeId *int64 `gorm:"" json:"size_id"` // 尺寸ID
|
||||
BuyNum *int64 `gorm:"" json:"buy_num"` // 购买数量
|
||||
Cover *string `gorm:"" json:"cover"` // 截图
|
||||
DesignId *int64 `gorm:"" json:"design_id"` // 设计ID
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
Status *int64 `gorm:"" json:"status"` // 状态位
|
||||
OptionalId *int64 `gorm:"" json:"optional_id"` // 选项ID
|
||||
IsCheck *int64 `gorm:"" json:"is_check"` // 是否选中状态(0:未选中,1:选中)
|
||||
TsTime *time.Time `gorm:"" json:"ts_time"` //
|
||||
IsEmail *int64 `gorm:"" json:"is_email"` // 是否发送邮件
|
||||
UserId *int64 `gorm:"-" json:"user_id"` // 用户ID
|
||||
ProductId *int64 `gorm:"-" json:"product_id"` // 产品ID
|
||||
TemplateId *int64 `gorm:"-" json:"template_id"` // 模板ID
|
||||
PriceId *int64 `gorm:"-" json:"price_id"` // 价格ID
|
||||
MaterialId *int64 `gorm:"-" json:"material_id"` // 材质ID
|
||||
SizeId *int64 `gorm:"-" json:"size_id"` // 尺寸ID
|
||||
BuyNum *int64 `gorm:"-" json:"buy_num"` // 购买数量
|
||||
Cover *string `gorm:"-" json:"cover"` // 截图
|
||||
DesignId *int64 `gorm:"-" json:"design_id"` // 设计ID
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态位
|
||||
OptionalId *int64 `gorm:"-" json:"optional_id"` // 选项ID
|
||||
IsCheck *int64 `gorm:"-" json:"is_check"` // 是否选中状态(0:未选中,1:选中)
|
||||
TsTime *time.Time `gorm:"-" json:"ts_time"` //
|
||||
IsEmail *int64 `gorm:"-" json:"is_email"` // 是否发送邮件
|
||||
}
|
||||
type FsCartModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@ import (
|
|||
|
||||
type FsFaq struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
TagId *int64 `gorm:"" json:"tag_id"` // 分类ID
|
||||
TagName *string `gorm:"" json:"tag_name"` // 分类名称
|
||||
Title *string `gorm:"" json:"title"` // 标题
|
||||
Content *string `gorm:"" json:"content"` // 内容
|
||||
Status *int64 `gorm:"" json:"status"` // 状态(0:禁用,1:启用)
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
TagId *int64 `gorm:"-" json:"tag_id"` // 分类ID
|
||||
TagName *string `gorm:"-" json:"tag_name"` // 分类名称
|
||||
Title *string `gorm:"-" json:"title"` // 标题
|
||||
Content *string `gorm:"-" json:"content"` // 内容
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态(0:禁用,1:启用)
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
}
|
||||
type FsFaqModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ import (
|
|||
)
|
||||
|
||||
type FsFont struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // id
|
||||
Title *string `gorm:"" json:"title"` // 字体名字
|
||||
LinuxFontname *string `gorm:"" json:"linux_fontname"` // linux对应字体名
|
||||
FilePath *string `gorm:"" json:"file_path"` // 字体文件路径
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序
|
||||
Id int64 `gorm:"primary_key" json:"id"` // id
|
||||
Title *string `gorm:"-" json:"title"` // 字体名字
|
||||
LinuxFontname *string `gorm:"-" json:"linux_fontname"` // linux对应字体名
|
||||
FilePath *string `gorm:"-" json:"file_path"` // 字体文件路径
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序
|
||||
}
|
||||
type FsFontModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -6,15 +6,15 @@ import (
|
|||
|
||||
type FsGuest struct {
|
||||
GuestId int64 `gorm:"primary_key" json:"guest_id"` // 游客ID
|
||||
AuthKey *string `gorm:"" json:"auth_key"` // jwt token
|
||||
Status *int64 `gorm:"" json:"status"` // 1正常 0不正常
|
||||
IsDel *int64 `gorm:"" json:"is_del"` // 是否删除 1删除
|
||||
CreatedAt *int64 `gorm:"" json:"created_at"` // 添加时间
|
||||
UpdatedAt *int64 `gorm:"" json:"updated_at"` // 更新时间
|
||||
IsOpenRender *int64 `gorm:"" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
||||
IsThousandFace *int64 `gorm:"" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
||||
IsLowRendering *int64 `gorm:"" json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
||||
IsRemoveBg *int64 `gorm:"" json:"is_remove_bg"` // 用户上传logo是否去除背景
|
||||
AuthKey *string `gorm:"-" json:"auth_key"` // jwt token
|
||||
Status *int64 `gorm:"-" json:"status"` // 1正常 0不正常
|
||||
IsDel *int64 `gorm:"-" json:"is_del"` // 是否删除 1删除
|
||||
CreatedAt *int64 `gorm:"-" json:"created_at"` // 添加时间
|
||||
UpdatedAt *int64 `gorm:"-" json:"updated_at"` // 更新时间
|
||||
IsOpenRender *int64 `gorm:"-" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
||||
IsThousandFace *int64 `gorm:"-" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
||||
IsLowRendering *int64 `gorm:"-" json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
||||
IsRemoveBg *int64 `gorm:"-" json:"is_remove_bg"` // 用户上传logo是否去除背景
|
||||
}
|
||||
type FsGuestModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@ import (
|
|||
|
||||
type FsMapLibrary struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // Id
|
||||
Title *string `gorm:"" json:"title"` // 名称
|
||||
Info *string `gorm:"" json:"info"` // 贴图数据
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序
|
||||
Status *int64 `gorm:"" json:"status"` // 状态 1启用
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 创建时间
|
||||
TagId *int64 `gorm:"" json:"tag_id"` // 模板标签id
|
||||
Title *string `gorm:"-" json:"title"` // 名称
|
||||
Info *string `gorm:"-" json:"info"` // 贴图数据
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态 1启用
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 创建时间
|
||||
TagId *int64 `gorm:"-" json:"tag_id"` // 模板标签id
|
||||
}
|
||||
type FsMapLibraryModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,30 +5,30 @@ import (
|
|||
)
|
||||
|
||||
type FsOrderDetail struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Sn *string `gorm:"" json:"sn"` // 唯一编码
|
||||
OrderId *int64 `gorm:"" json:"order_id"` // 订单ID
|
||||
UserId *int64 `gorm:"" json:"user_id"` // 用户ID
|
||||
FactoryId *int64 `gorm:"" json:"factory_id"` // 工厂ID
|
||||
OrderDetailTemplateId *int64 `gorm:"" json:"order_detail_template_id"` // 详情templateID
|
||||
ProductId *int64 `gorm:"" json:"product_id"` // 产品ID
|
||||
BuyNum *int64 `gorm:"" json:"buy_num"` // 购买数量
|
||||
PushNum *int64 `gorm:"" json:"push_num"` // 已发数量
|
||||
Amount *int64 `gorm:"" json:"amount"` // 单价
|
||||
Cover *string `gorm:"" json:"cover"` // 截图
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
Status *int64 `gorm:"" json:"status"` // 状态位 是否推送到厂家 是否生产完成 是否发货完成
|
||||
OptionalId *int64 `gorm:"" json:"optional_id"` // 选项ID
|
||||
OptionalTitle *string `gorm:"" json:"optional_title"` // 选项名称
|
||||
OptionPrice *int64 `gorm:"" json:"option_price"` // 配件价格
|
||||
IsTofactory *int64 `gorm:"" json:"is_tofactory"` // 是否推送到工厂
|
||||
IsProduct *int64 `gorm:"" json:"is_product"` // 是否生产中
|
||||
IsProductCompletion *int64 `gorm:"" json:"is_product_completion"` // 是否生产完成
|
||||
IsCloud *int64 `gorm:"" json:"is_cloud"` // 是否是云仓订单
|
||||
IsTocloud *int64 `gorm:"" json:"is_tocloud"` // 是否已发云仓(云仓单要发货到云仓,直接发到用户的不需要发到云仓)
|
||||
IsDeliver *int64 `gorm:"" json:"is_deliver"` // 是否已发货
|
||||
IsEnd *int64 `gorm:"" json:"is_end"` // 是否完成订单(签收)
|
||||
CartId *int64 `gorm:"" json:"cart_id"` // 购物车编号
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Sn *string `gorm:"-" json:"sn"` // 唯一编码
|
||||
OrderId *int64 `gorm:"-" json:"order_id"` // 订单ID
|
||||
UserId *int64 `gorm:"-" json:"user_id"` // 用户ID
|
||||
FactoryId *int64 `gorm:"-" json:"factory_id"` // 工厂ID
|
||||
OrderDetailTemplateId *int64 `gorm:"-" json:"order_detail_template_id"` // 详情templateID
|
||||
ProductId *int64 `gorm:"-" json:"product_id"` // 产品ID
|
||||
BuyNum *int64 `gorm:"-" json:"buy_num"` // 购买数量
|
||||
PushNum *int64 `gorm:"-" json:"push_num"` // 已发数量
|
||||
Amount *int64 `gorm:"-" json:"amount"` // 单价
|
||||
Cover *string `gorm:"-" json:"cover"` // 截图
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态位 是否推送到厂家 是否生产完成 是否发货完成
|
||||
OptionalId *int64 `gorm:"-" json:"optional_id"` // 选项ID
|
||||
OptionalTitle *string `gorm:"-" json:"optional_title"` // 选项名称
|
||||
OptionPrice *int64 `gorm:"-" json:"option_price"` // 配件价格
|
||||
IsTofactory *int64 `gorm:"-" json:"is_tofactory"` // 是否推送到工厂
|
||||
IsProduct *int64 `gorm:"-" json:"is_product"` // 是否生产中
|
||||
IsProductCompletion *int64 `gorm:"-" json:"is_product_completion"` // 是否生产完成
|
||||
IsCloud *int64 `gorm:"-" json:"is_cloud"` // 是否是云仓订单
|
||||
IsTocloud *int64 `gorm:"-" json:"is_tocloud"` // 是否已发云仓(云仓单要发货到云仓,直接发到用户的不需要发到云仓)
|
||||
IsDeliver *int64 `gorm:"-" json:"is_deliver"` // 是否已发货
|
||||
IsEnd *int64 `gorm:"-" json:"is_end"` // 是否完成订单(签收)
|
||||
CartId *int64 `gorm:"-" json:"cart_id"` // 购物车编号
|
||||
}
|
||||
type FsOrderDetailModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,17 +5,17 @@ import (
|
|||
)
|
||||
|
||||
type FsOrderDetailTemplate struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Sn *string `gorm:"" json:"sn"` // 唯一编码
|
||||
ProductId *int64 `gorm:"" json:"product_id"` // 产品ID
|
||||
ModelId *int64 `gorm:"" json:"model_id"` // 模型ID
|
||||
TemplateId *int64 `gorm:"" json:"template_id"` // 模板ID
|
||||
MaterialId *int64 `gorm:"" json:"material_id"` // 材质id
|
||||
SizeId *int64 `gorm:"" json:"size_id"` // 尺寸id
|
||||
EachBoxNum *int64 `gorm:"" json:"each_box_num"` // 每一箱的个数
|
||||
EachBoxWeight *float64 `gorm:"" json:"each_box_weight"` // 每一箱的重量 单位KG
|
||||
DesignId *int64 `gorm:"" json:"design_id"` // 设计ID
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Sn *string `gorm:"-" json:"sn"` // 唯一编码
|
||||
ProductId *int64 `gorm:"-" json:"product_id"` // 产品ID
|
||||
ModelId *int64 `gorm:"-" json:"model_id"` // 模型ID
|
||||
TemplateId *int64 `gorm:"-" json:"template_id"` // 模板ID
|
||||
MaterialId *int64 `gorm:"-" json:"material_id"` // 材质id
|
||||
SizeId *int64 `gorm:"-" json:"size_id"` // 尺寸id
|
||||
EachBoxNum *int64 `gorm:"-" json:"each_box_num"` // 每一箱的个数
|
||||
EachBoxWeight *float64 `gorm:"-" json:"each_box_weight"` // 每一箱的重量 单位KG
|
||||
DesignId *int64 `gorm:"-" json:"design_id"` // 设计ID
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
}
|
||||
type FsOrderDetailTemplateModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -1,47 +1,48 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type FsOrder struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Sn *string `gorm:"" json:"sn"` // 订单编号 FS211224OL2XDKNP
|
||||
UserId *int64 `gorm:"" json:"user_id"` // 用户ID
|
||||
SellerUserId *int64 `gorm:"" json:"seller_user_id"` // 销售员ID 0:自主下单
|
||||
TotalAmount *int64 `gorm:"" json:"total_amount"` // 总价
|
||||
PayedAmount *int64 `gorm:"" json:"payed_amount"` // 已支付金额
|
||||
PayMethod *int64 `gorm:"" json:"pay_method"` // 支付方式 1paypal 2strip
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
Utime *int64 `gorm:"" json:"utime"` // 更新时间
|
||||
Ptime *int64 `gorm:"" json:"ptime"` // 最后一次 支付时间(可能多次支付)
|
||||
AddressId *int64 `gorm:"" json:"address_id"` // 地址ID或者云仓ID
|
||||
DeliveryMethod *int64 `gorm:"" json:"delivery_method"` // 配送方式 1:直接发货到收获地址 2:云仓
|
||||
CustomerMark *string `gorm:"" json:"customer_mark"` // 客户备注
|
||||
Mark *string `gorm:"" json:"mark"` // 后台订单备注
|
||||
AddressInfo *string `gorm:"" json:"address_info"` // 详细地址信息JSON
|
||||
IsSup *int64 `gorm:"" json:"is_sup"` // 0不是补货 1是补货
|
||||
Status *int64 `gorm:"" json:"status"` // 状态位(0:未支付,1:部分支付,2:支付完成,3:部分生产,4:部分生产完成,5:全部生产,6:全部生产完成,7:部分发货,8:发货完成,9:完成订单,10:取消订单,11:退款中,12:退款完成,13:订单已删除,14:订单已关闭)
|
||||
IsPartPay *int64 `gorm:"" json:"is_part_pay"` // 是否部分支付(0:否,1:是)
|
||||
IsPayCompleted *int64 `gorm:"" json:"is_pay_completed"` // 是否支付完成(0:否,1:是)
|
||||
IsPartProduct *int64 `gorm:"" json:"is_part_product"` // 是否部分生产(0:否,1:是)
|
||||
IsPartProductCompleted *int64 `gorm:"" json:"is_part_product_completed"` // 是否部分生产完成(0:否,1:是)
|
||||
IsAllProduct *int64 `gorm:"" json:"is_all_product"` // 是否全部生产(0:否,1:是)
|
||||
IsAllProductCompleted *int64 `gorm:"" json:"is_all_product_completed"` // 是否全部生产完成(0:否,1:是)
|
||||
IsPartDelivery *int64 `gorm:"" json:"is_part_delivery"` // 是否部分发货(0:否,1:是)
|
||||
IsDeliveryCompleted *int64 `gorm:"" json:"is_delivery_completed"` // 是否发货完成(0:否,1:是)
|
||||
IsComplated *int64 `gorm:"" json:"is_complated"` // 是否完成订单(0:否,1:是)
|
||||
IsCancel *int64 `gorm:"" json:"is_cancel"` // 是否取消订单(0:否,1:是)
|
||||
IsRefunding *int64 `gorm:"" json:"is_refunding"` // 是否退款中(0:否,1:是)
|
||||
IsRefunded *int64 `gorm:"" json:"is_refunded"` // 是否退款完成(0:否,1:是)
|
||||
IsDeleted *int64 `gorm:"" json:"is_deleted"` // 是否删除(0:否,1:是)
|
||||
RefundReasonId *int64 `gorm:"" json:"refund_reason_id"` // 取消订单原因ID
|
||||
RefundReason *string `gorm:"" json:"refund_reason"` // 取消订单原因
|
||||
TsTime *time.Time `gorm:"" json:"ts_time"` //
|
||||
IsSure *int64 `gorm:"" json:"is_sure"` // 是否确认订单 1确认0未确认
|
||||
DeliverSn *string `gorm:"" json:"deliver_sn"` // 发货单号
|
||||
EmailTime *int64 `gorm:"" json:"email_time"` // 邮件发送时间
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Sn *string `gorm:"-" json:"sn"` // 订单编号 FS211224OL2XDKNP
|
||||
UserId *int64 `gorm:"-" json:"user_id"` // 用户ID
|
||||
SellerUserId *int64 `gorm:"-" json:"seller_user_id"` // 销售员ID 0:自主下单
|
||||
TotalAmount *int64 `gorm:"-" json:"total_amount"` // 总价
|
||||
PayedAmount *int64 `gorm:"-" json:"payed_amount"` // 已支付金额
|
||||
PayMethod *int64 `gorm:"-" json:"pay_method"` // 支付方式 1paypal 2strip
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
Utime *int64 `gorm:"-" json:"utime"` // 更新时间
|
||||
Ptime *int64 `gorm:"-" json:"ptime"` // 最后一次 支付时间(可能多次支付)
|
||||
AddressId *int64 `gorm:"-" json:"address_id"` // 地址ID或者云仓ID
|
||||
DeliveryMethod *int64 `gorm:"-" json:"delivery_method"` // 配送方式 1:直接发货到收获地址 2:云仓
|
||||
CustomerMark *string `gorm:"-" json:"customer_mark"` // 客户备注
|
||||
Mark *string `gorm:"-" json:"mark"` // 后台订单备注
|
||||
AddressInfo *string `gorm:"-" json:"address_info"` // 详细地址信息JSON
|
||||
IsSup *int64 `gorm:"-" json:"is_sup"` // 0不是补货 1是补货
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态位(0:未支付,1:部分支付,2:支付完成,3:部分生产,4:部分生产完成,5:全部生产,6:全部生产完成,7:部分发货,8:发货完成,9:完成订单,10:取消订单,11:退款中,12:退款完成,13:订单已删除,14:订单已关闭)
|
||||
IsPartPay *int64 `gorm:"-" json:"is_part_pay"` // 是否部分支付(0:否,1:是)
|
||||
IsPayCompleted *int64 `gorm:"-" json:"is_pay_completed"` // 是否支付完成(0:否,1:是)
|
||||
IsPartProduct *int64 `gorm:"-" json:"is_part_product"` // 是否部分生产(0:否,1:是)
|
||||
IsPartProductCompleted *int64 `gorm:"-" json:"is_part_product_completed"` // 是否部分生产完成(0:否,1:是)
|
||||
IsAllProduct *int64 `gorm:"-" json:"is_all_product"` // 是否全部生产(0:否,1:是)
|
||||
IsAllProductCompleted *int64 `gorm:"-" json:"is_all_product_completed"` // 是否全部生产完成(0:否,1:是)
|
||||
IsPartDelivery *int64 `gorm:"-" json:"is_part_delivery"` // 是否部分发货(0:否,1:是)
|
||||
IsDeliveryCompleted *int64 `gorm:"-" json:"is_delivery_completed"` // 是否发货完成(0:否,1:是)
|
||||
IsComplated *int64 `gorm:"-" json:"is_complated"` // 是否完成订单(0:否,1:是)
|
||||
IsCancel *int64 `gorm:"-" json:"is_cancel"` // 是否取消订单(0:否,1:是)
|
||||
IsRefunding *int64 `gorm:"-" json:"is_refunding"` // 是否退款中(0:否,1:是)
|
||||
IsRefunded *int64 `gorm:"-" json:"is_refunded"` // 是否退款完成(0:否,1:是)
|
||||
IsDeleted *int64 `gorm:"-" json:"is_deleted"` // 是否删除(0:否,1:是)
|
||||
RefundReasonId *int64 `gorm:"-" json:"refund_reason_id"` // 取消订单原因ID
|
||||
RefundReason *string `gorm:"-" json:"refund_reason"` // 取消订单原因
|
||||
TsTime *time.Time `gorm:"-" json:"ts_time"` //
|
||||
IsSure *int64 `gorm:"-" json:"is_sure"` // 是否确认订单 1确认0未确认
|
||||
DeliverSn *string `gorm:"-" json:"deliver_sn"` // 发货单号
|
||||
EmailTime *int64 `gorm:"-" json:"email_time"` // 邮件发送时间
|
||||
}
|
||||
type FsOrderModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,21 +5,21 @@ import (
|
|||
)
|
||||
|
||||
type FsPay struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
UserId *int64 `gorm:"" json:"user_id"` // 用户id
|
||||
OrderNumber *string `gorm:"" json:"order_number"` // 订单编号
|
||||
TradeNo *string `gorm:"" json:"trade_no"` // 第三方支付编号
|
||||
PayAmount *int64 `gorm:"" json:"pay_amount"` // 支付金额 (分)
|
||||
PayStatus *int64 `gorm:"" json:"pay_status"` // 支付状态 0 不成功 1 成功
|
||||
IsRefund *int64 `gorm:"" json:"is_refund"` // 是否退款 0 未退款 1退款
|
||||
PaymentMethod *int64 `gorm:"" json:"payment_method"` // 支付方式 1 stripe 2 paypal
|
||||
PayStage *int64 `gorm:"" json:"pay_stage"` // 支付阶段 1首付 2尾款
|
||||
OrderSource *int64 `gorm:"" json:"order_source"` // 订单来源 1pc
|
||||
PayTime *int64 `gorm:"" json:"pay_time"` // 支付时间
|
||||
CreatedAt *int64 `gorm:"" json:"created_at"` // 创建时间
|
||||
UpdatedAt *int64 `gorm:"" json:"updated_at"` // 更新时间
|
||||
CardNo *string `gorm:"" json:"card_no"` // 卡后4位
|
||||
Brand *string `gorm:"" json:"brand"` // 银行品牌
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
UserId *int64 `gorm:"-" json:"user_id"` // 用户id
|
||||
OrderNumber *string `gorm:"-" json:"order_number"` // 订单编号
|
||||
TradeNo *string `gorm:"-" json:"trade_no"` // 第三方支付编号
|
||||
PayAmount *int64 `gorm:"-" json:"pay_amount"` // 支付金额 (分)
|
||||
PayStatus *int64 `gorm:"-" json:"pay_status"` // 支付状态 0 不成功 1 成功
|
||||
IsRefund *int64 `gorm:"-" json:"is_refund"` // 是否退款 0 未退款 1退款
|
||||
PaymentMethod *int64 `gorm:"-" json:"payment_method"` // 支付方式 1 stripe 2 paypal
|
||||
PayStage *int64 `gorm:"-" json:"pay_stage"` // 支付阶段 1首付 2尾款
|
||||
OrderSource *int64 `gorm:"-" json:"order_source"` // 订单来源 1pc
|
||||
PayTime *int64 `gorm:"-" json:"pay_time"` // 支付时间
|
||||
CreatedAt *int64 `gorm:"-" json:"created_at"` // 创建时间
|
||||
UpdatedAt *int64 `gorm:"-" json:"updated_at"` // 更新时间
|
||||
CardNo *string `gorm:"-" json:"card_no"` // 卡后4位
|
||||
Brand *string `gorm:"-" json:"brand"` // 银行品牌
|
||||
}
|
||||
type FsPayModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -1,27 +1,28 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type FsProductDesign struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Sn *string `gorm:"" json:"sn"` // 唯一标识
|
||||
UserId *int64 `gorm:"" json:"user_id"` // 用户ID
|
||||
ProductId *int64 `gorm:"" json:"product_id"` // 产品ID
|
||||
TemplateId *int64 `gorm:"" json:"template_id"` // 模型ID
|
||||
MaterialId *int64 `gorm:"" json:"material_id"` // 材质ID
|
||||
SizeId *int64 `gorm:"" json:"size_id"` // 尺寸ID
|
||||
OptionalId *int64 `gorm:"" json:"optional_id"` // 选项ID
|
||||
Cover *string `gorm:"" json:"cover"` // 封面图
|
||||
Info *string `gorm:"" json:"info"` // 保留的设计信息
|
||||
Utime *time.Time `gorm:"" json:"utime"` // 更新时间
|
||||
Status *int64 `gorm:"" json:"status"` // 状态
|
||||
IsDel *int64 `gorm:"" json:"is_del"` // 是否删除 0未删除 1删除
|
||||
IsPay *int64 `gorm:"" json:"is_pay"` // 是否已有支付 0 未 1 有
|
||||
LogoColor *string `gorm:"" json:"logo_color"` // logo图片备选项
|
||||
PageGuid *string `gorm:"" json:"page_guid"` // 页面识别id
|
||||
Sn *string `gorm:"-" json:"sn"` // 唯一标识
|
||||
UserId *int64 `gorm:"-" json:"user_id"` // 用户ID
|
||||
ProductId *int64 `gorm:"-" json:"product_id"` // 产品ID
|
||||
TemplateId *int64 `gorm:"-" json:"template_id"` // 模型ID
|
||||
MaterialId *int64 `gorm:"-" json:"material_id"` // 材质ID
|
||||
SizeId *int64 `gorm:"-" json:"size_id"` // 尺寸ID
|
||||
OptionalId *int64 `gorm:"-" json:"optional_id"` // 选项ID
|
||||
Cover *string `gorm:"-" json:"cover"` // 封面图
|
||||
Info *string `gorm:"-" json:"info"` // 保留的设计信息
|
||||
Utime *time.Time `gorm:"-" json:"utime"` // 更新时间
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态
|
||||
IsDel *int64 `gorm:"-" json:"is_del"` // 是否删除 0未删除 1删除
|
||||
IsPay *int64 `gorm:"-" json:"is_pay"` // 是否已有支付 0 未 1 有
|
||||
LogoColor *string `gorm:"-" json:"logo_color"` // logo图片备选项
|
||||
PageGuid *string `gorm:"-" json:"page_guid"` // 页面识别id
|
||||
}
|
||||
type FsProductDesignModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,35 +5,35 @@ import (
|
|||
)
|
||||
|
||||
type FsProduct struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Sn *string `gorm:"" json:"sn"` // 商品编号 P98f087j
|
||||
Type *int64 `gorm:"" json:"type"` // 分类ID
|
||||
Title *string `gorm:"" json:"title"` // 名称
|
||||
TitleCn *string `gorm:"" json:"title_cn"` // 中文名称
|
||||
Cover *string `gorm:"" json:"cover"` // 封面图
|
||||
Imgs *string `gorm:"" json:"imgs"` // 一个或多个介绍图或视频
|
||||
Keywords *string `gorm:"" json:"keywords"` // 关键字
|
||||
Intro *string `gorm:"" json:"intro"` // 简要描述
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序
|
||||
SelledNum *int64 `gorm:"" json:"selled_num"` // 已卖数量
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
View *int64 `gorm:"" json:"view"` // 浏览量
|
||||
SizeIds *string `gorm:"" json:"size_ids"` // 尺寸 1,2,3,4
|
||||
MaterialIds *string `gorm:"" json:"material_ids"` // 材质 1,2,3
|
||||
TagIds *string `gorm:"" json:"tag_ids"` // 标签 逗号间隔
|
||||
Status *int64 `gorm:"" json:"status"` // 状态位 弃用
|
||||
ProduceDays *int64 `gorm:"" json:"produce_days"` // 生产天数
|
||||
DeliveryDays *int64 `gorm:"" json:"delivery_days"` // 运送天数
|
||||
CoverImg *string `gorm:"" json:"cover_img"` // 背景图
|
||||
IsShelf *int64 `gorm:"" json:"is_shelf"` // 是否上架
|
||||
IsRecommend *int64 `gorm:"" json:"is_recommend"` // 是否推荐
|
||||
IsHot *int64 `gorm:"" json:"is_hot"` // 是否热销
|
||||
IsProtection *int64 `gorm:"" json:"is_protection"` // 是否环保
|
||||
IsMicrowave *int64 `gorm:"" json:"is_microwave"` // 是否可微波炉
|
||||
IsDel *int64 `gorm:"" json:"is_del"` // 是否删除
|
||||
RecommendProduct *string `gorm:"" json:"recommend_product"` // 推荐产品id例如: 1,3,4,5
|
||||
RecommendProductSort *string `gorm:"" json:"recommend_product_sort"` // 推荐排序例如:1324
|
||||
SceneIds *string `gorm:"" json:"scene_ids"` // 关联的场景id
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Sn *string `gorm:"-" json:"sn"` // 商品编号 P98f087j
|
||||
Type *int64 `gorm:"-" json:"type"` // 分类ID
|
||||
Title *string `gorm:"-" json:"title"` // 名称
|
||||
TitleCn *string `gorm:"-" json:"title_cn"` // 中文名称
|
||||
Cover *string `gorm:"-" json:"cover"` // 封面图
|
||||
Imgs *string `gorm:"-" json:"imgs"` // 一个或多个介绍图或视频
|
||||
Keywords *string `gorm:"-" json:"keywords"` // 关键字
|
||||
Intro *string `gorm:"-" json:"intro"` // 简要描述
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序
|
||||
SelledNum *int64 `gorm:"-" json:"selled_num"` // 已卖数量
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
View *int64 `gorm:"-" json:"view"` // 浏览量
|
||||
SizeIds *string `gorm:"-" json:"size_ids"` // 尺寸 1,2,3,4
|
||||
MaterialIds *string `gorm:"-" json:"material_ids"` // 材质 1,2,3
|
||||
TagIds *string `gorm:"-" json:"tag_ids"` // 标签 逗号间隔
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态位 弃用
|
||||
ProduceDays *int64 `gorm:"-" json:"produce_days"` // 生产天数
|
||||
DeliveryDays *int64 `gorm:"-" json:"delivery_days"` // 运送天数
|
||||
CoverImg *string `gorm:"-" json:"cover_img"` // 背景图
|
||||
IsShelf *int64 `gorm:"-" json:"is_shelf"` // 是否上架
|
||||
IsRecommend *int64 `gorm:"-" json:"is_recommend"` // 是否推荐
|
||||
IsHot *int64 `gorm:"-" json:"is_hot"` // 是否热销
|
||||
IsProtection *int64 `gorm:"-" json:"is_protection"` // 是否环保
|
||||
IsMicrowave *int64 `gorm:"-" json:"is_microwave"` // 是否可微波炉
|
||||
IsDel *int64 `gorm:"-" json:"is_del"` // 是否删除
|
||||
RecommendProduct *string `gorm:"-" json:"recommend_product"` // 推荐产品id例如: 1,3,4,5
|
||||
RecommendProductSort *string `gorm:"-" json:"recommend_product_sort"` // 推荐排序例如:1324
|
||||
SceneIds *string `gorm:"-" json:"scene_ids"` // 关联的场景id
|
||||
}
|
||||
type FsProductModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,24 +5,24 @@ import (
|
|||
)
|
||||
|
||||
type FsProductModel3d struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
ProductId *int64 `gorm:"" json:"product_id"` // 产品ID
|
||||
Tag *int64 `gorm:"" json:"tag"` // 类别(1:模型,2:配件,3:场景)
|
||||
Title *string `gorm:"" json:"title"` // 标题
|
||||
Name *string `gorm:"" json:"name"` // 详情页展示名称
|
||||
ModelInfo *string `gorm:"" json:"model_info"` // 模型详情
|
||||
MaterialId *int64 `gorm:"" json:"material_id"` // 材质ID
|
||||
SizeId *int64 `gorm:"" json:"size_id"` // 尺寸ID
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序
|
||||
Light *int64 `gorm:"" json:"light"` // 灯光组
|
||||
LightList *string `gorm:"" json:"light_list"` // 灯光备选项
|
||||
PartId *int64 `gorm:"" json:"part_id"` // 配件选项id(配件就是模型的id)
|
||||
PartList *string `gorm:"" json:"part_list"` // 配件备选项
|
||||
Status *int64 `gorm:"" json:"status"` // 状态位 显示 删除
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
OptionTemplate *int64 `gorm:"" json:"option_template"` // 配件绑定的公共模板
|
||||
Price *int64 `gorm:"" json:"price"` // 仅配件用,配件的价格, 单位:美分
|
||||
Sku *string `gorm:"" json:"sku"` // sku
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
ProductId *int64 `gorm:"-" json:"product_id"` // 产品ID
|
||||
Tag *int64 `gorm:"-" json:"tag"` // 类别(1:模型,2:配件,3:场景)
|
||||
Title *string `gorm:"-" json:"title"` // 标题
|
||||
Name *string `gorm:"-" json:"name"` // 详情页展示名称
|
||||
ModelInfo *string `gorm:"-" json:"model_info"` // 模型详情
|
||||
MaterialId *int64 `gorm:"-" json:"material_id"` // 材质ID
|
||||
SizeId *int64 `gorm:"-" json:"size_id"` // 尺寸ID
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序
|
||||
Light *int64 `gorm:"-" json:"light"` // 灯光组
|
||||
LightList *string `gorm:"-" json:"light_list"` // 灯光备选项
|
||||
PartId *int64 `gorm:"-" json:"part_id"` // 配件选项id(配件就是模型的id)
|
||||
PartList *string `gorm:"-" json:"part_list"` // 配件备选项
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态位 显示 删除
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
OptionTemplate *int64 `gorm:"-" json:"option_template"` // 配件绑定的公共模板
|
||||
Price *int64 `gorm:"-" json:"price"` // 仅配件用,配件的价格, 单位:美分
|
||||
Sku *string `gorm:"-" json:"sku"` // sku
|
||||
}
|
||||
type FsProductModel3dModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ import (
|
|||
|
||||
type FsProductModel3dLight struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Name *string `gorm:"" json:"name"` // 灯光名称
|
||||
Info *string `gorm:"" json:"info"` // 灯光数据(json格式)
|
||||
Status *int64 `gorm:"" json:"status"` // 状态值(1:显示,0:删除)
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 创建时间
|
||||
Name *string `gorm:"-" json:"name"` // 灯光名称
|
||||
Info *string `gorm:"-" json:"info"` // 灯光数据(json格式)
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态值(1:显示,0:删除)
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 创建时间
|
||||
}
|
||||
type FsProductModel3dLightModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,19 +5,19 @@ import (
|
|||
)
|
||||
|
||||
type FsProductPrice struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Sn *string `gorm:"" json:"sn"` // 唯一编码
|
||||
Title *string `gorm:"" json:"title"` // 标题描述
|
||||
ProductId *int64 `gorm:"" json:"product_id"` // 产品ID
|
||||
MaterialId *int64 `gorm:"" json:"material_id"` // 材质ID
|
||||
SizeId *int64 `gorm:"" json:"size_id"` // 尺寸ID
|
||||
EachBoxNum *int64 `gorm:"" json:"each_box_num"` // 每一箱的个数
|
||||
EachBoxWeight *float64 `gorm:"" json:"each_box_weight"` // 每一箱的重量 单位KG
|
||||
MinBuyNum *int64 `gorm:"" json:"min_buy_num"` // 最少购买量
|
||||
StepNum *string `gorm:"" json:"step_num"` // 数量阶梯 eg:10,20,30
|
||||
StepPrice *string `gorm:"" json:"step_price"` // 价格阶梯 eg:100,50,25
|
||||
Status *int64 `gorm:"" json:"status"` // 是否可用
|
||||
IsDefault *int64 `gorm:"" json:"is_default"` // 是否默认
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
Sn *string `gorm:"-" json:"sn"` // 唯一编码
|
||||
Title *string `gorm:"-" json:"title"` // 标题描述
|
||||
ProductId *int64 `gorm:"-" json:"product_id"` // 产品ID
|
||||
MaterialId *int64 `gorm:"-" json:"material_id"` // 材质ID
|
||||
SizeId *int64 `gorm:"-" json:"size_id"` // 尺寸ID
|
||||
EachBoxNum *int64 `gorm:"-" json:"each_box_num"` // 每一箱的个数
|
||||
EachBoxWeight *float64 `gorm:"-" json:"each_box_weight"` // 每一箱的重量 单位KG
|
||||
MinBuyNum *int64 `gorm:"-" json:"min_buy_num"` // 最少购买量
|
||||
StepNum *string `gorm:"-" json:"step_num"` // 数量阶梯 eg:10,20,30
|
||||
StepPrice *string `gorm:"-" json:"step_price"` // 价格阶梯 eg:100,50,25
|
||||
Status *int64 `gorm:"-" json:"status"` // 是否可用
|
||||
IsDefault *int64 `gorm:"-" json:"is_default"` // 是否默认
|
||||
}
|
||||
type FsProductPriceModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,16 +5,16 @@ import (
|
|||
)
|
||||
|
||||
type FsProductSize struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
ProductId *int64 `gorm:"" json:"product_id"` // 产品ID
|
||||
Title *string `gorm:"" json:"title"` // 标题 10*10*20
|
||||
Cover *string `gorm:"" json:"cover"` // 封面图
|
||||
CoverImg *string `gorm:"" json:"cover_img"` // 背景图
|
||||
Capacity *string `gorm:"" json:"capacity"` // 自己填的尺寸名称
|
||||
Status *int64 `gorm:"" json:"status"` // 状态位 显示 删除
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序
|
||||
Remark *string `gorm:"" json:"remark"` // 备注信息
|
||||
PartsCanDeleted *int64 `gorm:"" json:"parts_can_deleted"` // 配件是否可移除 1是0否
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
ProductId *int64 `gorm:"-" json:"product_id"` // 产品ID
|
||||
Title *string `gorm:"-" json:"title"` // 标题 10*10*20
|
||||
Cover *string `gorm:"-" json:"cover"` // 封面图
|
||||
CoverImg *string `gorm:"-" json:"cover_img"` // 背景图
|
||||
Capacity *string `gorm:"-" json:"capacity"` // 自己填的尺寸名称
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态位 显示 删除
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序
|
||||
Remark *string `gorm:"-" json:"remark"` // 备注信息
|
||||
PartsCanDeleted *int64 `gorm:"-" json:"parts_can_deleted"` // 配件是否可移除 1是0否
|
||||
}
|
||||
type FsProductSizeModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import (
|
|||
|
||||
type FsProductTemplateTags struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // ID
|
||||
Title *string `gorm:"" json:"title"` // 标题
|
||||
Status *int64 `gorm:"" json:"status"` // 状态 1:可用
|
||||
CreateAt *int64 `gorm:"" json:"create_at"` // 创建时间
|
||||
Title *string `gorm:"-" json:"title"` // 标题
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态 1:可用
|
||||
CreateAt *int64 `gorm:"-" json:"create_at"` // 创建时间
|
||||
}
|
||||
type FsProductTemplateTagsModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,22 +5,22 @@ import (
|
|||
)
|
||||
|
||||
type FsProductTemplateV2 struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
ProductId *int64 `gorm:"" json:"product_id"` // 产品ID
|
||||
ModelId *int64 `gorm:"" json:"model_id"` // 模型ID
|
||||
Title *string `gorm:"" json:"title"` // 模板(sku),预留字段
|
||||
Name *string `gorm:"" json:"name"` // 名称
|
||||
CoverImg *string `gorm:"" json:"cover_img"` // 模板背景图
|
||||
TemplateInfo *string `gorm:"" json:"template_info"` // 模板详情
|
||||
MaterialImg *string `gorm:"" json:"material_img"` // 合成好的贴图
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序
|
||||
LogoWidth *int64 `gorm:"" json:"logo_width"` // logo图最大宽度
|
||||
LogoHeight *int64 `gorm:"" json:"logo_height"` // logo图最大高度
|
||||
IsPublic *int64 `gorm:"" json:"is_public"` // 是否可公用(1:可以,0:不可以)
|
||||
Status *int64 `gorm:"" json:"status"` // 状态1正常 2异常
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
Tag *string `gorm:"" json:"tag"` // 标签(用户自填)
|
||||
IsDel *int64 `gorm:"" json:"is_del"` // 是否删除 1删除
|
||||
Id int64 `gorm:"primary_key" json:"id"` //
|
||||
ProductId *int64 `gorm:"-" json:"product_id"` // 产品ID
|
||||
ModelId *int64 `gorm:"-" json:"model_id"` // 模型ID
|
||||
Title *string `gorm:"-" json:"title"` // 模板(sku),预留字段
|
||||
Name *string `gorm:"-" json:"name"` // 名称
|
||||
CoverImg *string `gorm:"-" json:"cover_img"` // 模板背景图
|
||||
TemplateInfo *string `gorm:"-" json:"template_info"` // 模板详情
|
||||
MaterialImg *string `gorm:"-" json:"material_img"` // 合成好的贴图
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序
|
||||
LogoWidth *int64 `gorm:"-" json:"logo_width"` // logo图最大宽度
|
||||
LogoHeight *int64 `gorm:"-" json:"logo_height"` // logo图最大高度
|
||||
IsPublic *int64 `gorm:"-" json:"is_public"` // 是否可公用(1:可以,0:不可以)
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态1正常 2异常
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
Tag *string `gorm:"-" json:"tag"` // 标签(用户自填)
|
||||
IsDel *int64 `gorm:"-" json:"is_del"` // 是否删除 1删除
|
||||
}
|
||||
type FsProductTemplateV2Model struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,18 +5,18 @@ import (
|
|||
)
|
||||
|
||||
type FsQrcodeSet struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // id
|
||||
Name *string `gorm:"" json:"name"` // 二维码组件名称
|
||||
Size *int64 `gorm:"" json:"size"` // 二维码内容尺寸
|
||||
IndexX *int64 `gorm:"" json:"index_x"` // x偏移量
|
||||
IndexY *int64 `gorm:"" json:"index_y"` // y偏移量
|
||||
SvgWebsite *string `gorm:"" json:"svg_website"` // website d数据
|
||||
SvgInstagram *string `gorm:"" json:"svg_instagram"` // svg instagram d数据
|
||||
SvgFacebook *string `gorm:"" json:"svg_facebook"` // svg facebook d数据
|
||||
Status *int64 `gorm:"" json:"status"` // 状态
|
||||
AdminId *int64 `gorm:"" json:"admin_id"` // 操作人
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
Utime *int64 `gorm:"" json:"utime"` // 更新时间
|
||||
Id int64 `gorm:"primary_key" json:"id"` // id
|
||||
Name *string `gorm:"-" json:"name"` // 二维码组件名称
|
||||
Size *int64 `gorm:"-" json:"size"` // 二维码内容尺寸
|
||||
IndexX *int64 `gorm:"-" json:"index_x"` // x偏移量
|
||||
IndexY *int64 `gorm:"-" json:"index_y"` // y偏移量
|
||||
SvgWebsite *string `gorm:"-" json:"svg_website"` // website d数据
|
||||
SvgInstagram *string `gorm:"-" json:"svg_instagram"` // svg instagram d数据
|
||||
SvgFacebook *string `gorm:"-" json:"svg_facebook"` // svg facebook d数据
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态
|
||||
AdminId *int64 `gorm:"-" json:"admin_id"` // 操作人
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
Utime *int64 `gorm:"-" json:"utime"` // 更新时间
|
||||
}
|
||||
type FsQrcodeSetModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ import (
|
|||
|
||||
type FsStandardLogo struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // ID
|
||||
Name *string `gorm:"" json:"name"` // logo名称
|
||||
Image *string `gorm:"" json:"image"` // 图片地址
|
||||
Ctime *int64 `gorm:"" json:"ctime"` // 添加时间
|
||||
Status *int64 `gorm:"" json:"status"` // 状态 1正常 0删除
|
||||
Name *string `gorm:"-" json:"name"` // logo名称
|
||||
Image *string `gorm:"-" json:"image"` // 图片地址
|
||||
Ctime *int64 `gorm:"-" json:"ctime"` // 添加时间
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态 1正常 0删除
|
||||
}
|
||||
type FsStandardLogoModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,17 +5,17 @@ import (
|
|||
)
|
||||
|
||||
type FsTags struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // ID
|
||||
Title *string `gorm:"" json:"title"` // 标题
|
||||
Level *int64 `gorm:"" json:"level"` // 层级、分类 1 => 二维码分类
|
||||
ClickNum *int64 `gorm:"" json:"click_num"` // 点击次数
|
||||
Sort *int64 `gorm:"" json:"sort"` // 排序(从大到小)
|
||||
CreateAt *int64 `gorm:"" json:"create_at"` // 创建时间
|
||||
Icon *string `gorm:"" json:"icon"` // 标签图标
|
||||
Status *int64 `gorm:"" json:"status"` // 状态 1:可用
|
||||
Description *string `gorm:"" json:"description"` // 介绍 Seo
|
||||
RecommendProduct *string `gorm:"" json:"recommend_product"` // 推荐产品id例如: 1,3,4,5
|
||||
RecommendProductSort *string `gorm:"" json:"recommend_product_sort"` // 推荐排序例如:1324
|
||||
Id int64 `gorm:"primary_key" json:"id"` // ID
|
||||
Title *string `gorm:"-" json:"title"` // 标题
|
||||
Level *int64 `gorm:"-" json:"level"` // 层级、分类 1 => 二维码分类
|
||||
ClickNum *int64 `gorm:"-" json:"click_num"` // 点击次数
|
||||
Sort *int64 `gorm:"-" json:"sort"` // 排序(从大到小)
|
||||
CreateAt *int64 `gorm:"-" json:"create_at"` // 创建时间
|
||||
Icon *string `gorm:"-" json:"icon"` // 标签图标
|
||||
Status *int64 `gorm:"-" json:"status"` // 状态 1:可用
|
||||
Description *string `gorm:"-" json:"description"` // 介绍 Seo
|
||||
RecommendProduct *string `gorm:"-" json:"recommend_product"` // 推荐产品id例如: 1,3,4,5
|
||||
RecommendProductSort *string `gorm:"-" json:"recommend_product_sort"` // 推荐排序例如:1324
|
||||
}
|
||||
type FsTagsModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -5,32 +5,32 @@ import (
|
|||
)
|
||||
|
||||
type FsUser struct {
|
||||
Id int64 `gorm:"primary_key" json:"id"` // ID
|
||||
FaceId *int64 `gorm:"" json:"face_id"` // facebook的userid
|
||||
Sub *int64 `gorm:"" json:"sub"` // google的sub
|
||||
FirstName *string `gorm:"" json:"first_name"` // FirstName
|
||||
LastName *string `gorm:"" json:"last_name"` // LastName
|
||||
Username *string `gorm:"" json:"username"` // 用户名
|
||||
Company *string `gorm:"" json:"company"` // 公司名称
|
||||
Mobile *string `gorm:"" json:"mobile"` // 手机号码
|
||||
AuthKey *string `gorm:"" json:"auth_key"` //
|
||||
PasswordHash *string `gorm:"" json:"password_hash"` //
|
||||
VerificationToken *string `gorm:"" json:"verification_token"` //
|
||||
PasswordResetToken *string `gorm:"" json:"password_reset_token"` //
|
||||
Email *string `gorm:"" json:"email"` // 邮箱
|
||||
Type *int64 `gorm:"" json:"type"` // 1普通餐厅 2连锁餐厅
|
||||
Status *int64 `gorm:"" json:"status"` // 1正常 0不正常
|
||||
IsDel *int64 `gorm:"" json:"is_del"` // 是否删除 1删除
|
||||
CreatedAt *int64 `gorm:"" json:"created_at"` // 添加时间
|
||||
UpdatedAt *int64 `gorm:"" json:"updated_at"` // 更新时间
|
||||
IsOrderStatusEmail *int64 `gorm:"" json:"is_order_status_email"` // 订单状态改变时是否接收邮件
|
||||
IsEmailAdvertisement *int64 `gorm:"" json:"is_email_advertisement"` // 是否接收邮件广告
|
||||
IsOrderStatusPhone *int64 `gorm:"" json:"is_order_status_phone"` // 订单状态改变是是否接收电话
|
||||
IsPhoneAdvertisement *int64 `gorm:"" json:"is_phone_advertisement"` // 是否接收短信广告
|
||||
IsOpenRender *int64 `gorm:"" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
||||
IsThousandFace *int64 `gorm:"" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
||||
IsLowRendering *int64 `gorm:"" json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
||||
IsRemoveBg *int64 `gorm:"" json:"is_remove_bg"` // 用户上传logo是否去除背景
|
||||
Id int64 `gorm:"primary_key" json:"id"` // ID
|
||||
FaceId *int64 `gorm:"-" json:"face_id"` // facebook的userid
|
||||
Sub *int64 `gorm:"-" json:"sub"` // google的sub
|
||||
FirstName *string `gorm:"-" json:"first_name"` // FirstName
|
||||
LastName *string `gorm:"-" json:"last_name"` // LastName
|
||||
Username *string `gorm:"-" json:"username"` // 用户名
|
||||
Company *string `gorm:"-" json:"company"` // 公司名称
|
||||
Mobile *string `gorm:"-" json:"mobile"` // 手机号码
|
||||
AuthKey *string `gorm:"-" json:"auth_key"` //
|
||||
PasswordHash *string `gorm:"-" json:"password_hash"` //
|
||||
VerificationToken *string `gorm:"-" json:"verification_token"` //
|
||||
PasswordResetToken *string `gorm:"-" json:"password_reset_token"` //
|
||||
Email *string `gorm:"-" json:"email"` // 邮箱
|
||||
Type *int64 `gorm:"-" json:"type"` // 1普通餐厅 2连锁餐厅
|
||||
Status *int64 `gorm:"-" json:"status"` // 1正常 0不正常
|
||||
IsDel *int64 `gorm:"-" json:"is_del"` // 是否删除 1删除
|
||||
CreatedAt *int64 `gorm:"-" json:"created_at"` // 添加时间
|
||||
UpdatedAt *int64 `gorm:"-" json:"updated_at"` // 更新时间
|
||||
IsOrderStatusEmail *int64 `gorm:"-" json:"is_order_status_email"` // 订单状态改变时是否接收邮件
|
||||
IsEmailAdvertisement *int64 `gorm:"-" json:"is_email_advertisement"` // 是否接收邮件广告
|
||||
IsOrderStatusPhone *int64 `gorm:"-" json:"is_order_status_phone"` // 订单状态改变是是否接收电话
|
||||
IsPhoneAdvertisement *int64 `gorm:"-" json:"is_phone_advertisement"` // 是否接收短信广告
|
||||
IsOpenRender *int64 `gorm:"-" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
||||
IsThousandFace *int64 `gorm:"-" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
||||
IsLowRendering *int64 `gorm:"-" json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
||||
IsRemoveBg *int64 `gorm:"-" json:"is_remove_bg"` // 用户上传logo是否去除背景
|
||||
}
|
||||
type FsUserModel struct{ db *gorm.DB }
|
||||
|
||||
|
|
|
@ -30,12 +30,7 @@ func (l *UserAddressListLogic) UserAddressList(req *types.Request, userinfo *aut
|
|||
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
|
||||
m := gmodel.NewFsAddressModel(l.svcCtx.MysqlConn)
|
||||
userinfo.GetIdType()
|
||||
// user := auth.GetUserInfoFormCtx(l.ctx)
|
||||
// if user.UserId == 0 {
|
||||
// return resp.SetStatus(basic.CodeUnAuth)
|
||||
// }
|
||||
// user.UserId = 22
|
||||
// model里设置了 返回值. 和 types 里的一至可以直接返回
|
||||
|
||||
data, err := m.GetUserAllAddress(l.ctx, 22)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
|
|
|
@ -40,15 +40,6 @@ func (l *UserBasicInfoLogic) UserBasicInfo(req *types.Request, userinfo *auth.Us
|
|||
return resp.SetStatus(basic.CodeServiceErr)
|
||||
}
|
||||
|
||||
// $userInfo->type = $userInfo->type != 0 ? $userInfo->type : '';
|
||||
// $userInfo->is_order_status_email = (boolean)$userInfo->is_order_status_email;
|
||||
// $userInfo->is_email_advertisement = (boolean)$userInfo->is_email_advertisement;
|
||||
// $userInfo->is_order_status_phone = (boolean)$userInfo->is_order_status_phone;
|
||||
// $userInfo->is_phone_advertisement = (boolean)$userInfo->is_phone_advertisement;
|
||||
// $userInfo->is_open_render = (boolean)$userInfo->is_open_render;
|
||||
// $userInfo->is_low_rendering = (boolean)$userInfo->is_low_rendering;
|
||||
// $userInfo->is_remove_bg = (boolean)$userInfo->is_remove_bg;
|
||||
|
||||
return resp.SetStatus(basic.CodeOK, types.DataUserBasicInfo{
|
||||
Type: *user.Type,
|
||||
IsOrderStatusEmail: *user.IsOrderStatusEmail > 0,
|
||||
|
|
45
server/home-user-auth/test/acceptcookielogic_test.go
Normal file
45
server/home-user-auth/test/acceptcookielogic_test.go
Normal file
|
@ -0,0 +1,45 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/requests"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
func TestAcceptCookieLogic(t *testing.T) {
|
||||
var err error
|
||||
var resp *requests.Response
|
||||
var result gjson.Result
|
||||
|
||||
// 获取 session,并携带 JWT token
|
||||
ses := GetSesssion(t, gserver)
|
||||
|
||||
// 向服务器发送 GET 请求,获取 cookie 信息
|
||||
resp, err = ses.Post(fmt.Sprintf("http://%s:%d/user/accept-cookie", cnf.Host, cnf.Port)).TestInServer(gserver)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
// 使用 gjson 解析返回的 json 数据
|
||||
result = resp.Json() // gjson
|
||||
|
||||
// 检查返回值中的 code 字段是否存在,并且值是否为 200
|
||||
code := result.Get("code").Int()
|
||||
if code != 200 {
|
||||
t.Errorf("Invalid code value: %d", code)
|
||||
}
|
||||
|
||||
// 检查返回值中的 msg 字段是否存在,并且值是否为 "success"
|
||||
msg := result.Get("msg").String()
|
||||
if msg != "success" {
|
||||
t.Errorf(`Invalid msg value: "%s"`, msg)
|
||||
}
|
||||
|
||||
// 检查返回值中的 data 字段是否存在,并且值是否符合预期
|
||||
token := result.Get("data.token").String()
|
||||
if len(token) == 0 {
|
||||
t.Error("Missing token field")
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package logic_test
|
||||
package logic
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -34,6 +34,11 @@ func GetTestServer() *rest.Server {
|
|||
return server
|
||||
}
|
||||
|
||||
func GetSesssion(t *testing.T, server requests.ITestServer) *requests.Session {
|
||||
ses := requests.NewSession()
|
||||
return ses
|
||||
}
|
||||
|
||||
func GetSesssionWithJwtToken(t *testing.T, server requests.ITestServer) *requests.Session {
|
||||
ses := requests.NewSession()
|
||||
tp := ses.Post(fmt.Sprintf("http://%s:%d/user/login", cnf.Host, cnf.Port))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package logic_test
|
||||
package logic
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package logic_test
|
||||
package logic
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
59
server/home-user-auth/test/userfontslogic_test.go
Normal file
59
server/home-user-auth/test/userfontslogic_test.go
Normal file
|
@ -0,0 +1,59 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/474420502/requests"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
func TestCaseUserFontsLogic(t *testing.T) {
|
||||
var err error
|
||||
var resp *requests.Response
|
||||
var result gjson.Result
|
||||
|
||||
// 获取 session,并携带 JWT token
|
||||
ses := GetSesssionWithJwtToken(t, gserver)
|
||||
|
||||
// 向服务器发送 GET 请求,获取字体列表
|
||||
resp, err = ses.Get(fmt.Sprintf("http://%s:%d/user/fonts", cnf.Host, cnf.Port)).TestInServer(gserver)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
// 使用 gjson 解析返回的 json 数据
|
||||
result = gjson.Parse(resp.ContentString())
|
||||
|
||||
// 检查返回值中的 code 字段是否存在,并且值是否为 200
|
||||
code := result.Get("code").Int()
|
||||
if code != 200 {
|
||||
t.Errorf("Invalid code value: %d", code)
|
||||
}
|
||||
|
||||
// 检查返回值中的 msg 字段是否存在,并且值是否为 "success"
|
||||
msg := result.Get("msg").String()
|
||||
if msg != "success" {
|
||||
t.Errorf(`Invalid msg value: "%s"`, msg)
|
||||
}
|
||||
|
||||
// 检查返回值中的 data 字段是否存在,并且值是否为数组类型
|
||||
dataArray := result.Get("data").Array()
|
||||
if len(dataArray) == 0 {
|
||||
t.Error("Empty data field")
|
||||
}
|
||||
|
||||
// 遍历每个元素,检查其 key 和 name 字段是否存在,并且值是否符合预期
|
||||
for i, item := range dataArray {
|
||||
key := item.Get("key").Int()
|
||||
name := item.Get("name").String()
|
||||
|
||||
if key != int64(i+1) {
|
||||
t.Errorf("Unexpected key value at index %d: %d", i, key)
|
||||
}
|
||||
|
||||
if len(name) == 0 {
|
||||
t.Errorf("Missing name value at index %d", i)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package logic_test
|
||||
package logic
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
Loading…
Reference in New Issue
Block a user