添加自增控制
This commit is contained in:
parent
05363b1849
commit
640d3261e0
|
@ -162,6 +162,10 @@ func GenFromPath(mdir string, cols []Column, tableName string, tableComment stri
|
||||||
typeName = typeName[1:]
|
typeName = typeName[1:]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if col.AutoIncrement {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
tagstr := "`gorm:"
|
tagstr := "`gorm:"
|
||||||
|
|
||||||
gormTag := ""
|
gormTag := ""
|
||||||
|
@ -170,6 +174,10 @@ func GenFromPath(mdir string, cols []Column, tableName string, tableComment stri
|
||||||
}
|
}
|
||||||
|
|
||||||
gormTag += defaultString
|
gormTag += defaultString
|
||||||
|
|
||||||
|
if col.AutoIncrement {
|
||||||
|
gormTag += "auto_increment;"
|
||||||
|
}
|
||||||
// if col.DefaultValue == "" {
|
// if col.DefaultValue == "" {
|
||||||
// log.Panic(col, "需要默认值")
|
// log.Panic(col, "需要默认值")
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_address 用户地址表
|
// fs_address 用户地址表
|
||||||
type FsAddress struct {
|
type FsAddress struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
|
||||||
Name *string `gorm:"default:'';" json:"name"` // 地址名称
|
Name *string `gorm:"default:'';" json:"name"` // 地址名称
|
||||||
FirstName *string `gorm:"default:'';" json:"first_name"` // FirstName
|
FirstName *string `gorm:"default:'';" json:"first_name"` // FirstName
|
||||||
|
|
|
@ -8,13 +8,43 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *FsAddressModel) GetOne(ctx context.Context, id int64, userId int64) (resp FsAddress, err error) {
|
func (a *FsAddressModel) GetOne(ctx context.Context, id int64, userId int64) (resp FsAddress, err error) {
|
||||||
err = a.db.WithContext(ctx).Model(&FsAddress{}).Where("`id` = ? and `user_id` = ? and `status` = ? ", id, userId, 1).First(&resp).Error
|
err = a.db.WithContext(ctx).Model(&FsAddress{}).Where("`id` = ? and `user_id` = ? and `status` = ? ", id, userId, 1).Take(&resp).Error
|
||||||
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
|
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
return FsAddress{}, err
|
return FsAddress{}, err
|
||||||
}
|
}
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *FsAddressModel) CreateOne(ctx context.Context, address *FsAddress) (resp *FsAddress, err error) {
|
||||||
|
|
||||||
|
err = a.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
|
||||||
|
// now := time.Now().Unix()
|
||||||
|
resp = &FsAddress{
|
||||||
|
UserId: address.UserId,
|
||||||
|
Name: address.Name,
|
||||||
|
FirstName: address.FirstName,
|
||||||
|
LastName: address.LastName,
|
||||||
|
Mobile: address.Mobile,
|
||||||
|
Street: address.Street,
|
||||||
|
Suite: address.Suite,
|
||||||
|
City: address.City,
|
||||||
|
State: address.State,
|
||||||
|
Country: address.Country,
|
||||||
|
ZipCode: address.ZipCode,
|
||||||
|
Status: address.Status,
|
||||||
|
IsDefault: address.IsDefault,
|
||||||
|
}
|
||||||
|
|
||||||
|
return tx.Create(resp).Error
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (a *FsAddressModel) GetUserAllAddress(ctx context.Context, userId int64) (resp []FsAddress, err error) {
|
func (a *FsAddressModel) GetUserAllAddress(ctx context.Context, userId int64) (resp []FsAddress, err error) {
|
||||||
err = a.db.WithContext(ctx).Model(&FsAddress{}).Where("`user_id` = ? and `status` = ?", userId, 1).Order("`id` DESC").Find(&resp).Error
|
err = a.db.WithContext(ctx).Model(&FsAddress{}).Where("`user_id` = ? and `status` = ?", userId, 1).Order("`id` DESC").Find(&resp).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
2
model/gmodel/fs_auth_assignment_logic.go
Normal file
2
model/gmodel/fs_auth_assignment_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
2
model/gmodel/fs_auth_item_child_logic.go
Normal file
2
model/gmodel/fs_auth_item_child_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
2
model/gmodel/fs_auth_item_logic.go
Normal file
2
model/gmodel/fs_auth_item_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
2
model/gmodel/fs_auth_rule_logic.go
Normal file
2
model/gmodel/fs_auth_rule_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_canteen_product 餐厅类别产品对应表
|
// fs_canteen_product 餐厅类别产品对应表
|
||||||
type FsCanteenProduct struct {
|
type FsCanteenProduct struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // ID
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
|
||||||
CanteenType *int64 `gorm:"index;default:0;" json:"canteen_type"` // 餐厅类别id
|
CanteenType *int64 `gorm:"index;default:0;" json:"canteen_type"` // 餐厅类别id
|
||||||
ProductId *int64 `gorm:"default:0;" json:"product_id"` // 产品id
|
ProductId *int64 `gorm:"default:0;" json:"product_id"` // 产品id
|
||||||
SizeId *int64 `gorm:"default:0;" json:"size_id"` // 尺寸id
|
SizeId *int64 `gorm:"default:0;" json:"size_id"` // 尺寸id
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_canteen_type 餐厅类型表
|
// fs_canteen_type 餐厅类型表
|
||||||
type FsCanteenType struct {
|
type FsCanteenType struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // ID
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
|
||||||
Name *string `gorm:"default:'';" json:"name"` // 餐厅名字
|
Name *string `gorm:"default:'';" json:"name"` // 餐厅名字
|
||||||
Sort *int64 `gorm:"default:0;" json:"sort"` // 排序
|
Sort *int64 `gorm:"default:0;" json:"sort"` // 排序
|
||||||
Status *int64 `gorm:"default:0;" json:"status"` // 状态位 1启用0停用
|
Status *int64 `gorm:"default:0;" json:"status"` // 状态位 1启用0停用
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_card 卡号表
|
// fs_card 卡号表
|
||||||
type FsCard struct {
|
type FsCard struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // Id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // Id
|
||||||
CardNo *string `gorm:"default:'';" json:"card_no"` // 卡号
|
CardNo *string `gorm:"default:'';" json:"card_no"` // 卡号
|
||||||
GroupId *int64 `gorm:"default:0;" json:"group_id"` // 分组id
|
GroupId *int64 `gorm:"default:0;" json:"group_id"` // 分组id
|
||||||
Ctime *int64 `gorm:"default:0;" json:"ctime"` // 创建时间
|
Ctime *int64 `gorm:"default:0;" json:"ctime"` // 创建时间
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_card_group 卡号分组表
|
// fs_card_group 卡号分组表
|
||||||
type FsCardGroup struct {
|
type FsCardGroup struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
|
||||||
GroupName *string `gorm:"default:'';" json:"group_name"` // 分组名字
|
GroupName *string `gorm:"default:'';" json:"group_name"` // 分组名字
|
||||||
PreNo *string `gorm:"default:'';" json:"pre_no"` // 规则前几位数
|
PreNo *string `gorm:"default:'';" json:"pre_no"` // 规则前几位数
|
||||||
Num *int64 `gorm:"default:0;" json:"num"` // 生成数量
|
Num *int64 `gorm:"default:0;" json:"num"` // 生成数量
|
||||||
|
|
2
model/gmodel/fs_card_group_logic.go
Normal file
2
model/gmodel/fs_card_group_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
2
model/gmodel/fs_card_logic.go
Normal file
2
model/gmodel/fs_card_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
// fs_cart 购物车
|
// fs_cart 购物车
|
||||||
type FsCart struct {
|
type FsCart struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
|
||||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` //
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` //
|
||||||
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
||||||
TemplateId *int64 `gorm:"index;default:0;" json:"template_id"` // 模板ID
|
TemplateId *int64 `gorm:"index;default:0;" json:"template_id"` // 模板ID
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_change_code 忘记密码code表
|
// fs_change_code 忘记密码code表
|
||||||
type FsChangeCode struct {
|
type FsChangeCode struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
|
||||||
Email *string `gorm:"default:'';" json:"email"` //
|
Email *string `gorm:"default:'';" json:"email"` //
|
||||||
Code *string `gorm:"default:'';" json:"code"` //
|
Code *string `gorm:"default:'';" json:"code"` //
|
||||||
CreatedAt *int64 `gorm:"default:0;" json:"created_at"` // 创建时间
|
CreatedAt *int64 `gorm:"default:0;" json:"created_at"` // 创建时间
|
||||||
|
|
2
model/gmodel/fs_change_code_logic.go
Normal file
2
model/gmodel/fs_change_code_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_cloud_deliver_every_tmp
|
// fs_cloud_deliver_every_tmp
|
||||||
type FsCloudDeliverEveryTmp struct {
|
type FsCloudDeliverEveryTmp struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
AdminId *int64 `gorm:"default:0;" json:"admin_id"` // 管理员
|
AdminId *int64 `gorm:"default:0;" json:"admin_id"` // 管理员
|
||||||
CloudId *int64 `gorm:"default:0;" json:"cloud_id"` // 云仓ID 暂且只有一个默认为 1
|
CloudId *int64 `gorm:"default:0;" json:"cloud_id"` // 云仓ID 暂且只有一个默认为 1
|
||||||
OrderDetailTemplateSn *string `gorm:"default:'';" json:"order_detail_template_sn"` // 详情modelSn
|
OrderDetailTemplateSn *string `gorm:"default:'';" json:"order_detail_template_sn"` // 详情modelSn
|
||||||
|
|
2
model/gmodel/fs_cloud_deliver_every_tmp_logic.go
Normal file
2
model/gmodel/fs_cloud_deliver_every_tmp_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_cloud_deliver_tmp
|
// fs_cloud_deliver_tmp
|
||||||
type FsCloudDeliverTmp struct {
|
type FsCloudDeliverTmp struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
|
||||||
CloudId *int64 `gorm:"default:0;" json:"cloud_id"` // 云仓id
|
CloudId *int64 `gorm:"default:0;" json:"cloud_id"` // 云仓id
|
||||||
UserId *int64 `gorm:"default:0;" json:"user_id"` // 用户id
|
UserId *int64 `gorm:"default:0;" json:"user_id"` // 用户id
|
||||||
AdminId *int64 `gorm:"default:0;" json:"admin_id"` // 操作员id
|
AdminId *int64 `gorm:"default:0;" json:"admin_id"` // 操作员id
|
||||||
|
|
2
model/gmodel/fs_cloud_deliver_tmp_logic.go
Normal file
2
model/gmodel/fs_cloud_deliver_tmp_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_cloud 云仓表
|
// fs_cloud 云仓表
|
||||||
type FsCloud struct {
|
type FsCloud struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
|
||||||
Address *string `gorm:"default:'';" json:"address"` // 云仓地址
|
Address *string `gorm:"default:'';" json:"address"` // 云仓地址
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 云仓名称
|
Title *string `gorm:"default:'';" json:"title"` // 云仓名称
|
||||||
}
|
}
|
||||||
|
|
2
model/gmodel/fs_cloud_logic.go
Normal file
2
model/gmodel/fs_cloud_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_cloud_pick_up_detail 云仓提货单-详情
|
// fs_cloud_pick_up_detail 云仓提货单-详情
|
||||||
type FsCloudPickUpDetail struct {
|
type FsCloudPickUpDetail struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // Id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // Id
|
||||||
PickId *int64 `gorm:"index;default:0;" json:"pick_id"` // 提货单id
|
PickId *int64 `gorm:"index;default:0;" json:"pick_id"` // 提货单id
|
||||||
StockId *int64 `gorm:"default:0;" json:"stock_id"` // 用户云仓记录id
|
StockId *int64 `gorm:"default:0;" json:"stock_id"` // 用户云仓记录id
|
||||||
Num *int64 `gorm:"default:0;" json:"num"` // 提取数量
|
Num *int64 `gorm:"default:0;" json:"num"` // 提取数量
|
||||||
|
|
2
model/gmodel/fs_cloud_pick_up_detail_logic.go
Normal file
2
model/gmodel/fs_cloud_pick_up_detail_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_cloud_pick_up 云仓提货单
|
// fs_cloud_pick_up 云仓提货单
|
||||||
type FsCloudPickUp struct {
|
type FsCloudPickUp struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // Id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // Id
|
||||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户id
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户id
|
||||||
TrackNum *string `gorm:"default:'';" json:"track_num"` // 运输号
|
TrackNum *string `gorm:"default:'';" json:"track_num"` // 运输号
|
||||||
AddressId *int64 `gorm:"default:0;" json:"address_id"` // 地址id
|
AddressId *int64 `gorm:"default:0;" json:"address_id"` // 地址id
|
||||||
|
|
2
model/gmodel/fs_cloud_pick_up_logic.go
Normal file
2
model/gmodel/fs_cloud_pick_up_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_cloud_receive_every
|
// fs_cloud_receive_every
|
||||||
type FsCloudReceiveEvery struct {
|
type FsCloudReceiveEvery struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
DeliveryId *int64 `gorm:"index;default:0;" json:"delivery_id"` // 云仓收货单id
|
DeliveryId *int64 `gorm:"index;default:0;" json:"delivery_id"` // 云仓收货单id
|
||||||
OrderDetailTemplateSn *string `gorm:"index;default:'';" json:"order_detail_template_sn"` // 详情modelSn
|
OrderDetailTemplateSn *string `gorm:"index;default:'';" json:"order_detail_template_sn"` // 详情modelSn
|
||||||
Num *int64 `gorm:"default:0;" json:"num"` // 收到的数量
|
Num *int64 `gorm:"default:0;" json:"num"` // 收到的数量
|
||||||
|
|
2
model/gmodel/fs_cloud_receive_every_logic.go
Normal file
2
model/gmodel/fs_cloud_receive_every_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_cloud_receive 云仓接收工厂总单
|
// fs_cloud_receive 云仓接收工厂总单
|
||||||
type FsCloudReceive struct {
|
type FsCloudReceive struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
CloudId *int64 `gorm:"index;default:0;" json:"cloud_id"` // 入库云仓id
|
CloudId *int64 `gorm:"index;default:0;" json:"cloud_id"` // 入库云仓id
|
||||||
AdminId *int64 `gorm:"index;default:0;" json:"admin_id"` // 操作员id
|
AdminId *int64 `gorm:"index;default:0;" json:"admin_id"` // 操作员id
|
||||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户id
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户id
|
||||||
|
|
2
model/gmodel/fs_cloud_receive_logic.go
Normal file
2
model/gmodel/fs_cloud_receive_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_cloud_render_log 云渲染日志表
|
// fs_cloud_render_log 云渲染日志表
|
||||||
type FsCloudRenderLog struct {
|
type FsCloudRenderLog struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // ID
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
|
||||||
UserId *int64 `gorm:"default:0;" json:"user_id"` // 用户id
|
UserId *int64 `gorm:"default:0;" json:"user_id"` // 用户id
|
||||||
PostData *string `gorm:"default:'';" json:"post_data"` //
|
PostData *string `gorm:"default:'';" json:"post_data"` //
|
||||||
PostUrl *string `gorm:"default:'';" json:"post_url"` //
|
PostUrl *string `gorm:"default:'';" json:"post_url"` //
|
||||||
|
|
2
model/gmodel/fs_cloud_render_log_logic.go
Normal file
2
model/gmodel/fs_cloud_render_log_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_cloud_user_apply_back 该表废弃
|
// fs_cloud_user_apply_back 该表废弃
|
||||||
type FsCloudUserApplyBack struct {
|
type FsCloudUserApplyBack struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
UserHash *string `gorm:"default:'';" json:"user_hash"` //
|
UserHash *string `gorm:"default:'';" json:"user_hash"` //
|
||||||
OrderDetailTemplateId *int64 `gorm:"default:0;" json:"order_detail_template_id"` // 详情modelID
|
OrderDetailTemplateId *int64 `gorm:"default:0;" json:"order_detail_template_id"` // 详情modelID
|
||||||
Num *int64 `gorm:"default:0;" json:"num"` // 发货数量
|
Num *int64 `gorm:"default:0;" json:"num"` // 发货数量
|
||||||
|
|
2
model/gmodel/fs_cloud_user_apply_back_logic.go
Normal file
2
model/gmodel/fs_cloud_user_apply_back_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_contact 该表暂未使用
|
// fs_contact 该表暂未使用
|
||||||
type FsContact struct {
|
type FsContact struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Name *string `gorm:"default:'';" json:"name"` // 名字
|
Name *string `gorm:"default:'';" json:"name"` // 名字
|
||||||
Email *string `gorm:"index;default:'';" json:"email"` // 邮箱
|
Email *string `gorm:"index;default:'';" json:"email"` // 邮箱
|
||||||
Subject *int64 `gorm:"default:0;" json:"subject"` // 主题
|
Subject *int64 `gorm:"default:0;" json:"subject"` // 主题
|
||||||
|
|
2
model/gmodel/fs_contact_logic.go
Normal file
2
model/gmodel/fs_contact_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_contact_service
|
// fs_contact_service
|
||||||
type FsContactService struct {
|
type FsContactService struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Type *string `gorm:"default:'';" json:"type"` // 类型
|
Type *string `gorm:"default:'';" json:"type"` // 类型
|
||||||
RelationId *int64 `gorm:"index;default:0;" json:"relation_id"` // 关联id
|
RelationId *int64 `gorm:"index;default:0;" json:"relation_id"` // 关联id
|
||||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户id
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户id
|
||||||
|
|
2
model/gmodel/fs_contact_service_logic.go
Normal file
2
model/gmodel/fs_contact_service_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_coupon 代金券(暂未使用)
|
// fs_coupon 代金券(暂未使用)
|
||||||
type FsCoupon struct {
|
type FsCoupon struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
UserId *int64 `gorm:"default:0;" json:"user_id"` //
|
UserId *int64 `gorm:"default:0;" json:"user_id"` //
|
||||||
Sn *string `gorm:"default:'';" json:"sn"` // 优惠券码
|
Sn *string `gorm:"default:'';" json:"sn"` // 优惠券码
|
||||||
Type *int64 `gorm:"default:0;" json:"type"` // 类型 1:代金券 2:折扣券 3:满减券
|
Type *int64 `gorm:"default:0;" json:"type"` // 类型 1:代金券 2:折扣券 3:满减券
|
||||||
|
|
2
model/gmodel/fs_coupon_logic.go
Normal file
2
model/gmodel/fs_coupon_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_deliver_every 发货详细表(已废弃)
|
// fs_deliver_every 发货详细表(已废弃)
|
||||||
type FsDeliverEvery struct {
|
type FsDeliverEvery struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
DeliverId *int64 `gorm:"index;default:0;" json:"deliver_id"` // 发货ID
|
DeliverId *int64 `gorm:"index;default:0;" json:"deliver_id"` // 发货ID
|
||||||
OrderDetailTemplateSn *string `gorm:"index;default:'';" json:"order_detail_template_sn"` // 订单详情模板sn
|
OrderDetailTemplateSn *string `gorm:"index;default:'';" json:"order_detail_template_sn"` // 订单详情模板sn
|
||||||
Num *int64 `gorm:"default:0;" json:"num"` //
|
Num *int64 `gorm:"default:0;" json:"num"` //
|
||||||
|
|
2
model/gmodel/fs_deliver_every_logic.go
Normal file
2
model/gmodel/fs_deliver_every_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
// fs_deliver 发货表 云仓 直发 通用(已废弃)
|
// fs_deliver 发货表 云仓 直发 通用(已废弃)
|
||||||
type FsDeliver struct {
|
type FsDeliver struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Type *int64 `gorm:"default:0;" json:"type"` // 1直接发货,2云仓发货
|
Type *int64 `gorm:"default:0;" json:"type"` // 1直接发货,2云仓发货
|
||||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
|
||||||
AdminId *int64 `gorm:"index;default:0;" json:"admin_id"` // 操作人id
|
AdminId *int64 `gorm:"index;default:0;" json:"admin_id"` // 操作人id
|
||||||
|
|
2
model/gmodel/fs_deliver_logic.go
Normal file
2
model/gmodel/fs_deliver_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_department 部门表
|
// fs_department 部门表
|
||||||
type FsDepartment struct {
|
type FsDepartment struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
|
||||||
Name *string `gorm:"default:'';" json:"name"` // 部门名称
|
Name *string `gorm:"default:'';" json:"name"` // 部门名称
|
||||||
Status *int64 `gorm:"default:0;" json:"status"` // 状态 1正常0停用
|
Status *int64 `gorm:"default:0;" json:"status"` // 状态 1正常0停用
|
||||||
Ctime *int64 `gorm:"default:0;" json:"ctime"` // 添加时间
|
Ctime *int64 `gorm:"default:0;" json:"ctime"` // 添加时间
|
||||||
|
|
2
model/gmodel/fs_department_logic.go
Normal file
2
model/gmodel/fs_department_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_email_logs 邮件日志表
|
// fs_email_logs 邮件日志表
|
||||||
type FsEmailLogs struct {
|
type FsEmailLogs struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // ID
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
|
||||||
Type *int64 `gorm:"default:0;" json:"type"` // 邮件分类
|
Type *int64 `gorm:"default:0;" json:"type"` // 邮件分类
|
||||||
Ctime *int64 `gorm:"default:0;" json:"ctime"` // 发送时间
|
Ctime *int64 `gorm:"default:0;" json:"ctime"` // 发送时间
|
||||||
Email *string `gorm:"default:'';" json:"email"` // 发送邮箱
|
Email *string `gorm:"default:'';" json:"email"` // 发送邮箱
|
||||||
|
|
2
model/gmodel/fs_email_logs_logic.go
Normal file
2
model/gmodel/fs_email_logs_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_email_template 邮件模板表(暂未使用)
|
// fs_email_template 邮件模板表(暂未使用)
|
||||||
type FsEmailTemplate struct {
|
type FsEmailTemplate struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Type *int64 `gorm:"default:0;" json:"type"` // 模板类型
|
Type *int64 `gorm:"default:0;" json:"type"` // 模板类型
|
||||||
Name *string `gorm:"default:'';" json:"name"` // 模板名称
|
Name *string `gorm:"default:'';" json:"name"` // 模板名称
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 模板标题
|
Title *string `gorm:"default:'';" json:"title"` // 模板标题
|
||||||
|
|
2
model/gmodel/fs_email_template_logic.go
Normal file
2
model/gmodel/fs_email_template_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_factory_deliver_every 该表废弃
|
// fs_factory_deliver_every 该表废弃
|
||||||
type FsFactoryDeliverEvery struct {
|
type FsFactoryDeliverEvery struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
FactoryDeliverId *int64 `gorm:"index;default:0;" json:"factory_deliver_id"` // 工厂发货表ID
|
FactoryDeliverId *int64 `gorm:"index;default:0;" json:"factory_deliver_id"` // 工厂发货表ID
|
||||||
OrderDetailTemplateSn *string `gorm:"index;default:'';" json:"order_detail_template_sn"` // 订单产品模板sn
|
OrderDetailTemplateSn *string `gorm:"index;default:'';" json:"order_detail_template_sn"` // 订单产品模板sn
|
||||||
Num *int64 `gorm:"default:0;" json:"num"` // 发货数量
|
Num *int64 `gorm:"default:0;" json:"num"` // 发货数量
|
||||||
|
|
2
model/gmodel/fs_factory_deliver_every_logic.go
Normal file
2
model/gmodel/fs_factory_deliver_every_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_factory_deliver 工厂发货主表(废弃)
|
// fs_factory_deliver 工厂发货主表(废弃)
|
||||||
type FsFactoryDeliver struct {
|
type FsFactoryDeliver struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Sn *string `gorm:"index;default:'';" json:"sn"` // 工厂发货编号sn
|
Sn *string `gorm:"index;default:'';" json:"sn"` // 工厂发货编号sn
|
||||||
Ctime *int64 `gorm:"default:0;" json:"ctime"` // 创建时间
|
Ctime *int64 `gorm:"default:0;" json:"ctime"` // 创建时间
|
||||||
DeliveryMethod *int64 `gorm:"default:0;" json:"delivery_method"` // 发货方式( 1:直接发货到收获地址 2:云仓)
|
DeliveryMethod *int64 `gorm:"default:0;" json:"delivery_method"` // 发货方式( 1:直接发货到收获地址 2:云仓)
|
||||||
|
|
2
model/gmodel/fs_factory_deliver_logic.go
Normal file
2
model/gmodel/fs_factory_deliver_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_factory 该表废弃
|
// fs_factory 该表废弃
|
||||||
type FsFactory struct {
|
type FsFactory struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Name *string `gorm:"default:'';" json:"name"` // 名字
|
Name *string `gorm:"default:'';" json:"name"` // 名字
|
||||||
Addr *string `gorm:"default:'';" json:"addr"` // 地址
|
Addr *string `gorm:"default:'';" json:"addr"` // 地址
|
||||||
Contact *string `gorm:"default:'';" json:"contact"` // 联系人
|
Contact *string `gorm:"default:'';" json:"contact"` // 联系人
|
||||||
|
|
2
model/gmodel/fs_factory_logic.go
Normal file
2
model/gmodel/fs_factory_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_factory_product 工厂生产表(废弃)
|
// fs_factory_product 工厂生产表(废弃)
|
||||||
type FsFactoryProduct struct {
|
type FsFactoryProduct struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
FactoryId *int64 `gorm:"index;default:0;" json:"factory_id"` // 工厂id
|
FactoryId *int64 `gorm:"index;default:0;" json:"factory_id"` // 工厂id
|
||||||
OrderId *int64 `gorm:"index;default:0;" json:"order_id"` // 订单id
|
OrderId *int64 `gorm:"index;default:0;" json:"order_id"` // 订单id
|
||||||
OrderDetailTemplateSn *string `gorm:"index;default:'';" json:"order_detail_template_sn"` // 产品模板sn
|
OrderDetailTemplateSn *string `gorm:"index;default:'';" json:"order_detail_template_sn"` // 产品模板sn
|
||||||
|
|
2
model/gmodel/fs_factory_product_logic.go
Normal file
2
model/gmodel/fs_factory_product_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_factory_ship_tmp
|
// fs_factory_ship_tmp
|
||||||
type FsFactoryShipTmp struct {
|
type FsFactoryShipTmp struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Sn *string `gorm:"default:'';" json:"sn"` // 运单号码
|
Sn *string `gorm:"default:'';" json:"sn"` // 运单号码
|
||||||
FactoryId *int64 `gorm:"default:0;" json:"factory_id"` // 工厂ID
|
FactoryId *int64 `gorm:"default:0;" json:"factory_id"` // 工厂ID
|
||||||
OrderDetailTemplateSn *string `gorm:"default:'';" json:"order_detail_template_sn"` // 详情modelSn
|
OrderDetailTemplateSn *string `gorm:"default:'';" json:"order_detail_template_sn"` // 详情modelSn
|
||||||
|
|
2
model/gmodel/fs_factory_ship_tmp_logic.go
Normal file
2
model/gmodel/fs_factory_ship_tmp_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_faq 常见问题
|
// fs_faq 常见问题
|
||||||
type FsFaq struct {
|
type FsFaq struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
TagId *int64 `gorm:"default:0;" json:"tag_id"` // 分类ID
|
TagId *int64 `gorm:"default:0;" json:"tag_id"` // 分类ID
|
||||||
TagName *string `gorm:"default:'';" json:"tag_name"` // 分类名称
|
TagName *string `gorm:"default:'';" json:"tag_name"` // 分类名称
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 标题
|
Title *string `gorm:"default:'';" json:"title"` // 标题
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_font 字体配置
|
// fs_font 字体配置
|
||||||
type FsFont struct {
|
type FsFont struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 字体名字
|
Title *string `gorm:"default:'';" json:"title"` // 字体名字
|
||||||
LinuxFontname *string `gorm:"default:'';" json:"linux_fontname"` // linux对应字体名
|
LinuxFontname *string `gorm:"default:'';" json:"linux_fontname"` // linux对应字体名
|
||||||
FilePath *string `gorm:"default:'';" json:"file_path"` // 字体文件路径
|
FilePath *string `gorm:"default:'';" json:"file_path"` // 字体文件路径
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_gerent 管理员表
|
// fs_gerent 管理员表
|
||||||
type FsGerent struct {
|
type FsGerent struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // ID
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
|
||||||
Username *string `gorm:"unique_key;default:'';" json:"username"` // 用户名
|
Username *string `gorm:"unique_key;default:'';" json:"username"` // 用户名
|
||||||
AuthKey *string `gorm:"default:'';" json:"auth_key"` // token
|
AuthKey *string `gorm:"default:'';" json:"auth_key"` // token
|
||||||
PasswordHash *string `gorm:"default:'';" json:"password_hash"` // 加密密码
|
PasswordHash *string `gorm:"default:'';" json:"password_hash"` // 加密密码
|
||||||
|
|
2
model/gmodel/fs_gerent_logic.go
Normal file
2
model/gmodel/fs_gerent_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_guest 游客表
|
// fs_guest 游客表
|
||||||
type FsGuest struct {
|
type FsGuest struct {
|
||||||
GuestId int64 `gorm:"primary_key;default:0;" json:"guest_id"` // ID
|
GuestId int64 `gorm:"primary_key;default:0;auto_increment;" json:"guest_id"` // ID
|
||||||
AuthKey *string `gorm:"default:'';" json:"auth_key"` // jwt token
|
AuthKey *string `gorm:"default:'';" json:"auth_key"` // jwt token
|
||||||
Status *int64 `gorm:"index;default:1;" json:"status"` // 1正常 0不正常
|
Status *int64 `gorm:"index;default:1;" json:"status"` // 1正常 0不正常
|
||||||
IsDel *int64 `gorm:"index;default:0;" json:"is_del"` // 是否删除 1删除
|
IsDel *int64 `gorm:"index;default:0;" json:"is_del"` // 是否删除 1删除
|
||||||
|
|
|
@ -10,11 +10,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (m *FsGuestModel) GenerateGuestID(ctx context.Context, AccessSecret *string) (authKey string, err error) {
|
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 {
|
err = m.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
|
||||||
now := time.Now().Unix()
|
now := time.Now().Unix()
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_log 日志表
|
// fs_log 日志表
|
||||||
type FsLog struct {
|
type FsLog struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // ID
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
|
||||||
Action *string `gorm:"default:'';" json:"action"` // 执行的动作
|
Action *string `gorm:"default:'';" json:"action"` // 执行的动作
|
||||||
Table *string `gorm:"default:'';" json:"table"` // 表明
|
Table *string `gorm:"default:'';" json:"table"` // 表明
|
||||||
DataChanged *string `gorm:"default:'';" json:"data_changed"` // 修改后的数据
|
DataChanged *string `gorm:"default:'';" json:"data_changed"` // 修改后的数据
|
||||||
|
|
2
model/gmodel/fs_log_logic.go
Normal file
2
model/gmodel/fs_log_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_map_library 贴图库
|
// fs_map_library 贴图库
|
||||||
type FsMapLibrary struct {
|
type FsMapLibrary struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // Id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // Id
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 名称
|
Title *string `gorm:"default:'';" json:"title"` // 名称
|
||||||
Info *string `gorm:"default:'';" json:"info"` // 贴图数据
|
Info *string `gorm:"default:'';" json:"info"` // 贴图数据
|
||||||
Sort *int64 `gorm:"default:0;" json:"sort"` // 排序
|
Sort *int64 `gorm:"default:0;" json:"sort"` // 排序
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_menu 后台菜单
|
// fs_menu 后台菜单
|
||||||
type FsMenu struct {
|
type FsMenu struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
|
||||||
Name *string `gorm:"default:'';" json:"name"` // 菜单名
|
Name *string `gorm:"default:'';" json:"name"` // 菜单名
|
||||||
Parent *int64 `gorm:"index;default:0;" json:"parent"` //
|
Parent *int64 `gorm:"index;default:0;" json:"parent"` //
|
||||||
Route *string `gorm:"default:'';" json:"route"` //
|
Route *string `gorm:"default:'';" json:"route"` //
|
||||||
|
|
2
model/gmodel/fs_menu_logic.go
Normal file
2
model/gmodel/fs_menu_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
2
model/gmodel/fs_migration_logic.go
Normal file
2
model/gmodel/fs_migration_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_order_affiliate 订单附属表-流程控制时间等
|
// fs_order_affiliate 订单附属表-流程控制时间等
|
||||||
type FsOrderAffiliate struct {
|
type FsOrderAffiliate struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
|
||||||
OrderId *int64 `gorm:"unique_key;default:0;" json:"order_id"` // 订单id
|
OrderId *int64 `gorm:"unique_key;default:0;" json:"order_id"` // 订单id
|
||||||
SureTime *int64 `gorm:"default:0;" json:"sure_time"` // 确认时间
|
SureTime *int64 `gorm:"default:0;" json:"sure_time"` // 确认时间
|
||||||
ProductTime *int64 `gorm:"default:0;" json:"product_time"` // 生产时间
|
ProductTime *int64 `gorm:"default:0;" json:"product_time"` // 生产时间
|
||||||
|
|
2
model/gmodel/fs_order_affiliate_logic.go
Normal file
2
model/gmodel/fs_order_affiliate_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_order_detail 订单详细表
|
// fs_order_detail 订单详细表
|
||||||
type FsOrderDetail struct {
|
type FsOrderDetail struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Sn *string `gorm:"unique_key;default:'';" json:"sn"` // 唯一编码
|
Sn *string `gorm:"unique_key;default:'';" json:"sn"` // 唯一编码
|
||||||
OrderId *int64 `gorm:"index;default:0;" json:"order_id"` // 订单ID
|
OrderId *int64 `gorm:"index;default:0;" json:"order_id"` // 订单ID
|
||||||
UserId *int64 `gorm:"default:0;" json:"user_id"` //
|
UserId *int64 `gorm:"default:0;" json:"user_id"` //
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_order_detail_template 订单模板详细表
|
// fs_order_detail_template 订单模板详细表
|
||||||
type FsOrderDetailTemplate struct {
|
type FsOrderDetailTemplate struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Sn *string `gorm:"unique_key;default:'';" json:"sn"` // 唯一编码
|
Sn *string `gorm:"unique_key;default:'';" json:"sn"` // 唯一编码
|
||||||
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
||||||
ModelId *int64 `gorm:"default:0;" json:"model_id"` // 模型ID
|
ModelId *int64 `gorm:"default:0;" json:"model_id"` // 模型ID
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
// fs_order
|
// fs_order
|
||||||
type FsOrder struct {
|
type FsOrder struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Sn *string `gorm:"unique_key;default:'';" json:"sn"` // 订单编号 FS211224OL2XDKNP
|
Sn *string `gorm:"unique_key;default:'';" json:"sn"` // 订单编号 FS211224OL2XDKNP
|
||||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` //
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` //
|
||||||
SellerUserId *int64 `gorm:"default:0;" json:"seller_user_id"` //
|
SellerUserId *int64 `gorm:"default:0;" json:"seller_user_id"` //
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_order_remark 订单备注表
|
// fs_order_remark 订单备注表
|
||||||
type FsOrderRemark struct {
|
type FsOrderRemark struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
|
||||||
OrderId *int64 `gorm:"index;default:0;" json:"order_id"` // 订单id
|
OrderId *int64 `gorm:"index;default:0;" json:"order_id"` // 订单id
|
||||||
Remark *string `gorm:"default:'';" json:"remark"` // 订单备注
|
Remark *string `gorm:"default:'';" json:"remark"` // 订单备注
|
||||||
AdminId *int64 `gorm:"default:0;" json:"admin_id"` // 后台操作人员
|
AdminId *int64 `gorm:"default:0;" json:"admin_id"` // 后台操作人员
|
||||||
|
|
2
model/gmodel/fs_order_remark_logic.go
Normal file
2
model/gmodel/fs_order_remark_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_pay 支付记录
|
// fs_pay 支付记录
|
||||||
type FsPay struct {
|
type FsPay struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户id
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户id
|
||||||
OrderNumber *string `gorm:"default:'';" json:"order_number"` // 订单编号
|
OrderNumber *string `gorm:"default:'';" json:"order_number"` // 订单编号
|
||||||
TradeNo *string `gorm:"index;default:'';" json:"trade_no"` // 第三方支付编号
|
TradeNo *string `gorm:"index;default:'';" json:"trade_no"` // 第三方支付编号
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product_copy1 产品表
|
// fs_product_copy1 产品表
|
||||||
type FsProductCopy1 struct {
|
type FsProductCopy1 struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Sn *string `gorm:"unique_key;default:'';" json:"sn"` // 商品编号 P98f087j
|
Sn *string `gorm:"unique_key;default:'';" json:"sn"` // 商品编号 P98f087j
|
||||||
Type *int64 `gorm:"default:0;" json:"type"` // 分类ID
|
Type *int64 `gorm:"default:0;" json:"type"` // 分类ID
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 名称
|
Title *string `gorm:"default:'';" json:"title"` // 名称
|
||||||
|
|
2
model/gmodel/fs_product_copy1_logic.go
Normal file
2
model/gmodel/fs_product_copy1_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product_design_gather
|
// fs_product_design_gather
|
||||||
type FsProductDesignGather struct {
|
type FsProductDesignGather struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Sn *string `gorm:"index;default:'';" json:"sn"` // 唯一标识
|
Sn *string `gorm:"index;default:'';" json:"sn"` // 唯一标识
|
||||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` //
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` //
|
||||||
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
||||||
|
|
2
model/gmodel/fs_product_design_gather_logic.go
Normal file
2
model/gmodel/fs_product_design_gather_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
// fs_product_design 产品设计表
|
// fs_product_design 产品设计表
|
||||||
type FsProductDesign struct {
|
type FsProductDesign struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Sn *string `gorm:"index;default:'';" json:"sn"` // 唯一标识
|
Sn *string `gorm:"index;default:'';" json:"sn"` // 唯一标识
|
||||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户ID
|
||||||
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product 产品表
|
// fs_product 产品表
|
||||||
type FsProduct struct {
|
type FsProduct struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Sn *string `gorm:"unique_key;default:'';" json:"sn"` // 商品编号 P98f087j
|
Sn *string `gorm:"unique_key;default:'';" json:"sn"` // 商品编号 P98f087j
|
||||||
Type *int64 `gorm:"default:0;" json:"type"` // 分类ID
|
Type *int64 `gorm:"default:0;" json:"type"` // 分类ID
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 名称
|
Title *string `gorm:"default:'';" json:"title"` // 名称
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product_model3d 产品模型表
|
// fs_product_model3d 产品模型表
|
||||||
type FsProductModel3d struct {
|
type FsProductModel3d struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` //
|
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` //
|
||||||
Tag *int64 `gorm:"default:1;" json:"tag"` // 类别(1:模型,2:配件,3:场景)
|
Tag *int64 `gorm:"default:1;" json:"tag"` // 类别(1:模型,2:配件,3:场景)
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 标题
|
Title *string `gorm:"default:'';" json:"title"` // 标题
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product_model3d_light 模型-灯光组表
|
// fs_product_model3d_light 模型-灯光组表
|
||||||
type FsProductModel3dLight struct {
|
type FsProductModel3dLight struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Name *string `gorm:"default:'';" json:"name"` // 灯光名称
|
Name *string `gorm:"default:'';" json:"name"` // 灯光名称
|
||||||
Info *string `gorm:"default:'';" json:"info"` // 灯光数据(json格式)
|
Info *string `gorm:"default:'';" json:"info"` // 灯光数据(json格式)
|
||||||
Status *int64 `gorm:"default:1;" json:"status"` // 状态值(1:显示,0:删除)
|
Status *int64 `gorm:"default:1;" json:"status"` // 状态值(1:显示,0:删除)
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product_option 产品选项表(已废弃)
|
// fs_product_option 产品选项表(已废弃)
|
||||||
type FsProductOption struct {
|
type FsProductOption struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 名称
|
Title *string `gorm:"default:'';" json:"title"` // 名称
|
||||||
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品id
|
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品id
|
||||||
Price *int64 `gorm:"default:0;" json:"price"` // 产品单价
|
Price *int64 `gorm:"default:0;" json:"price"` // 产品单价
|
||||||
|
|
2
model/gmodel/fs_product_option_logic.go
Normal file
2
model/gmodel/fs_product_option_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product_price 阶梯价格表
|
// fs_product_price 阶梯价格表
|
||||||
type FsProductPrice struct {
|
type FsProductPrice struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Sn *string `gorm:"default:'';" json:"sn"` // 唯一编码
|
Sn *string `gorm:"default:'';" json:"sn"` // 唯一编码
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 标题描述
|
Title *string `gorm:"default:'';" json:"title"` // 标题描述
|
||||||
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product_render_design
|
// fs_product_render_design
|
||||||
type FsProductRenderDesign struct {
|
type FsProductRenderDesign struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
Sn *string `gorm:"index;default:'';" json:"sn"` // 唯一标识
|
Sn *string `gorm:"index;default:'';" json:"sn"` // 唯一标识
|
||||||
UserId *int64 `gorm:"index;default:0;" json:"user_id"` //
|
UserId *int64 `gorm:"index;default:0;" json:"user_id"` //
|
||||||
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
||||||
|
|
2
model/gmodel/fs_product_render_design_logic.go
Normal file
2
model/gmodel/fs_product_render_design_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product_scene 产品场景表
|
// fs_product_scene 产品场景表
|
||||||
type FsProductScene struct {
|
type FsProductScene struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // ID
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
|
||||||
Name *string `gorm:"default:'';" json:"name"` // 场景名
|
Name *string `gorm:"default:'';" json:"name"` // 场景名
|
||||||
Info *string `gorm:"default:'';" json:"info"` // 场景详情
|
Info *string `gorm:"default:'';" json:"info"` // 场景详情
|
||||||
ModelIds *string `gorm:"default:'';" json:"model_ids"` // 该场景涉及的模型id
|
ModelIds *string `gorm:"default:'';" json:"model_ids"` // 该场景涉及的模型id
|
||||||
|
|
2
model/gmodel/fs_product_scene_logic.go
Normal file
2
model/gmodel/fs_product_scene_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product_size 产品尺寸表
|
// fs_product_size 产品尺寸表
|
||||||
type FsProductSize struct {
|
type FsProductSize struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 标题 10*10*20
|
Title *string `gorm:"default:'';" json:"title"` // 标题 10*10*20
|
||||||
Cover *string `gorm:"default:'';" json:"cover"` //
|
Cover *string `gorm:"default:'';" json:"cover"` //
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product_template_basemap 模板底图表
|
// fs_product_template_basemap 模板底图表
|
||||||
type FsProductTemplateBasemap struct {
|
type FsProductTemplateBasemap struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // Id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // Id
|
||||||
Name *string `gorm:"default:'';" json:"name"` // 底图名称
|
Name *string `gorm:"default:'';" json:"name"` // 底图名称
|
||||||
Url *string `gorm:"default:'';" json:"url"` // 底图地址
|
Url *string `gorm:"default:'';" json:"url"` // 底图地址
|
||||||
Ctime *int64 `gorm:"default:0;" json:"ctime"` // 添加时间
|
Ctime *int64 `gorm:"default:0;" json:"ctime"` // 添加时间
|
||||||
|
|
2
model/gmodel/fs_product_template_basemap_logic.go
Normal file
2
model/gmodel/fs_product_template_basemap_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
// fs_product_template_element 云渲染配置表
|
// fs_product_template_element 云渲染配置表
|
||||||
type FsProductTemplateElement struct {
|
type FsProductTemplateElement struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;" json:"id"` // id
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
|
||||||
Title *string `gorm:"default:'';" json:"title"` // 产品模板名称
|
Title *string `gorm:"default:'';" json:"title"` // 产品模板名称
|
||||||
ProductTemplateId *int64 `gorm:"index;default:0;" json:"product_template_id"` // 产品模板id
|
ProductTemplateId *int64 `gorm:"index;default:0;" json:"product_template_id"` // 产品模板id
|
||||||
Main *string `gorm:"default:'';" json:"main"` //
|
Main *string `gorm:"default:'';" json:"main"` //
|
||||||
|
|
2
model/gmodel/fs_product_template_element_logic.go
Normal file
2
model/gmodel/fs_product_template_element_logic.go
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
package gmodel
|
||||||
|
// TODO: 使用model的属性做你想做的
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user