This commit is contained in:
laodaming
2023-10-07 16:58:22 +08:00
parent 66acaa6095
commit 560bc9a7d2
11 changed files with 32 additions and 455 deletions

View File

@@ -23,6 +23,7 @@ type FsAdminRole struct {
DeleteUid *int64 `gorm:"default:0;" json:"delete_uid"` // 删除人
IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除1=是 0=否
MenuAuth *[]byte `gorm:"default:'';" json:"menu_auth"` //
ApiAuth *[]byte `gorm:"default:'';" json:"api_auth"` //
}
type FsAdminRoleModel struct {
db *gorm.DB

View File

@@ -0,0 +1,27 @@
package gmodel
import (
"gorm.io/gorm"
"time"
)
// fs_product_collection 产品收藏表
type FsProductCollection struct {
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // id
UserId *int64 `gorm:"default:0;" json:"user_id"` // 用户id
GuestId *int64 `gorm:"default:0;" json:"guest_id"` // 游客id
ProductId *int64 `gorm:"default:0;" json:"product_id"` // 产品id
TemplateTag *string `gorm:"default:'';" json:"template_tag"` //
SelectColorIndex *int64 `gorm:"default:0;" json:"select_color_index"` // 选择的颜色索引
Logo *string `gorm:"default:'';" json:"logo"` // logo地址
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
}
type FsProductCollectionModel struct {
db *gorm.DB
name string
}
func NewFsProductCollectionModel(db *gorm.DB) *FsProductCollectionModel {
return &FsProductCollectionModel{db: db, name: "fs_product_collection"}
}

View File

@@ -0,0 +1,2 @@
package gmodel
// TODO: 使用model的属性做你想做的

View File

@@ -67,6 +67,7 @@ type AllModelsGen struct {
FsPay *FsPayModel // fs_pay 支付记录
FsPayEvent *FsPayEventModel // fs_pay_event 支付回调事件日志
FsProduct *FsProductModel // fs_product 产品表
FsProductCollection *FsProductCollectionModel // fs_product_collection 产品收藏表
FsProductCopy1 *FsProductCopy1Model // fs_product_copy1 产品表
FsProductDesign *FsProductDesignModel // fs_product_design 产品设计表
FsProductDesignGather *FsProductDesignGatherModel // fs_product_design_gather
@@ -178,6 +179,7 @@ func NewAllModels(gdb *gorm.DB) *AllModelsGen {
FsPay: NewFsPayModel(gdb),
FsPayEvent: NewFsPayEventModel(gdb),
FsProduct: NewFsProductModel(gdb),
FsProductCollection: NewFsProductCollectionModel(gdb),
FsProductCopy1: NewFsProductCopy1Model(gdb),
FsProductDesign: NewFsProductDesignModel(gdb),
FsProductDesignGather: NewFsProductDesignGatherModel(gdb),