From b81a3682c228fe88ccefa9b87310441ba5cbca2c Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Thu, 19 Oct 2023 15:55:12 +0800 Subject: [PATCH] fix --- model/gmodel/fs_logo_preprocess_gen.go | 18 ++++++++ model/gmodel/fs_logo_preprocess_logic.go | 2 + .../gmodel/fs_product_history_template_gen.go | 23 ++++++++++ .../fs_product_history_template_logic.go | 2 + model/gmodel/fs_product_template_v2_gen.go | 42 +++++++++---------- 5 files changed, 66 insertions(+), 21 deletions(-) create mode 100644 model/gmodel/fs_logo_preprocess_gen.go create mode 100644 model/gmodel/fs_logo_preprocess_logic.go create mode 100644 model/gmodel/fs_product_history_template_gen.go create mode 100644 model/gmodel/fs_product_history_template_logic.go diff --git a/model/gmodel/fs_logo_preprocess_gen.go b/model/gmodel/fs_logo_preprocess_gen.go new file mode 100644 index 00000000..66b3caba --- /dev/null +++ b/model/gmodel/fs_logo_preprocess_gen.go @@ -0,0 +1,18 @@ +package gmodel + +import ( + "gorm.io/gorm" +) + +// fs_logo_preprocess +type FsLogoPreprocess struct { + RestaurantName *string `gorm:"index;default:'';" json:"restaurant_name"` // 餐厅名字 +} +type FsLogoPreprocessModel struct { + db *gorm.DB + name string +} + +func NewFsLogoPreprocessModel(db *gorm.DB) *FsLogoPreprocessModel { + return &FsLogoPreprocessModel{db: db, name: "fs_logo_preprocess"} +} diff --git a/model/gmodel/fs_logo_preprocess_logic.go b/model/gmodel/fs_logo_preprocess_logic.go new file mode 100644 index 00000000..e68225aa --- /dev/null +++ b/model/gmodel/fs_logo_preprocess_logic.go @@ -0,0 +1,2 @@ +package gmodel +// TODO: 使用model的属性做你想做的 \ No newline at end of file diff --git a/model/gmodel/fs_product_history_template_gen.go b/model/gmodel/fs_product_history_template_gen.go new file mode 100644 index 00000000..34b50370 --- /dev/null +++ b/model/gmodel/fs_product_history_template_gen.go @@ -0,0 +1,23 @@ +package gmodel + +import ( + "gorm.io/gorm" + "time" +) + +// fs_product_history_template 模板历史表 +type FsProductHistoryTemplate struct { + Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // + TemplateId *int64 `gorm:"index;default:0;" json:"template_id"` // 模板id + TemplateInfo *string `gorm:"default:'';" json:"template_info"` // + RelativePublicTemplateId *int64 `gorm:"default:0;" json:"relative_public_template_id"` // 变更之前关联的公共模板id(仅供查看) + Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` // +} +type FsProductHistoryTemplateModel struct { + db *gorm.DB + name string +} + +func NewFsProductHistoryTemplateModel(db *gorm.DB) *FsProductHistoryTemplateModel { + return &FsProductHistoryTemplateModel{db: db, name: "fs_product_history_template"} +} diff --git a/model/gmodel/fs_product_history_template_logic.go b/model/gmodel/fs_product_history_template_logic.go new file mode 100644 index 00000000..e68225aa --- /dev/null +++ b/model/gmodel/fs_product_history_template_logic.go @@ -0,0 +1,2 @@ +package gmodel +// TODO: 使用model的属性做你想做的 \ No newline at end of file diff --git a/model/gmodel/fs_product_template_v2_gen.go b/model/gmodel/fs_product_template_v2_gen.go index 62cf8a19..fc297d40 100644 --- a/model/gmodel/fs_product_template_v2_gen.go +++ b/model/gmodel/fs_product_template_v2_gen.go @@ -6,27 +6,27 @@ import ( // fs_product_template_v2 产品-模型- 模板表 type FsProductTemplateV2 struct { - Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // - ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID - ModelId *int64 `gorm:"default:0;" json:"model_id"` // 模型ID - Title *string `gorm:"default:'';" json:"title"` // 模板(sku),预留字段 - Name *string `gorm:"default:'';" json:"name"` // 名称 - CoverImg *string `gorm:"default:'';" json:"cover_img"` // 模板背景图 - TemplateInfo *string `gorm:"default:'';" json:"template_info"` // 模板详情 - MaterialImg *string `gorm:"default:'';" json:"material_img"` // 合成好的贴图 - Sort *int64 `gorm:"default:0;" json:"sort"` // 排序 - LogoWidth *int64 `gorm:"default:0;" json:"logo_width"` // logo图最大宽度 - LogoHeight *int64 `gorm:"default:0;" json:"logo_height"` // logo图最大高度 - IsPublic *int64 `gorm:"default:0;" json:"is_public"` // 是否可公用(1:可以,0:不可以,仅供模型关联) - IsPublicTemplate *int64 `gorm:"default:0;" json:"is_public_template"` // 是否是公共模板0非1是(仅针对模板之间) - RelativePublicTemplateLevelPrefix *string `gorm:"default:'';" json:"relative_public_template_level_prefix"` // - Status *int64 `gorm:"default:0;" json:"status"` // 状态1正常 2异常 - TemplateTag *string `gorm:"default:'';" json:"template_tag"` // - IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除 1删除 - SwitchInfo *string `gorm:"default:'';" json:"switch_info"` // 开关信息 - Version *int64 `gorm:"default:0;" json:"version"` // 默认1 - ElementModelId *int64 `gorm:"default:0;" json:"element_model_id"` // 云渲染对应模型id - Ctime *int64 `gorm:"default:0;" json:"ctime"` // 添加时间 + Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // + ProductId *int64 `gorm:"index;default:0;" json:"product_id"` // 产品ID + ModelId *int64 `gorm:"default:0;" json:"model_id"` // 模型ID + Title *string `gorm:"default:'';" json:"title"` // 模板(sku),预留字段 + Name *string `gorm:"default:'';" json:"name"` // 名称 + CoverImg *string `gorm:"default:'';" json:"cover_img"` // 模板背景图 + TemplateInfo *string `gorm:"default:'';" json:"template_info"` // 模板详情 + MaterialImg *string `gorm:"default:'';" json:"material_img"` // 合成好的贴图 + Sort *int64 `gorm:"default:0;" json:"sort"` // 排序 + LogoWidth *int64 `gorm:"default:0;" json:"logo_width"` // logo图最大宽度 + LogoHeight *int64 `gorm:"default:0;" json:"logo_height"` // logo图最大高度 + IsPublic *int64 `gorm:"default:0;" json:"is_public"` // 是否可公用(1:可以,0:不可以,仅供模型关联) + IsPublicTemplate *int64 `gorm:"default:0;" json:"is_public_template"` // 是否是公共模板0非1是(仅针对模板之间) + RelativePublicTemplateId *int64 `gorm:"default:0;" json:"relative_public_template_id"` // 模板间关联的公共模板id + Status *int64 `gorm:"default:0;" json:"status"` // 状态1正常 2异常 + TemplateTag *string `gorm:"default:'';" json:"template_tag"` // + IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除 1删除 + SwitchInfo *string `gorm:"default:'';" json:"switch_info"` // 开关信息 + Version *int64 `gorm:"default:0;" json:"version"` // 默认1 + ElementModelId *int64 `gorm:"default:0;" json:"element_model_id"` // 云渲染对应模型id + Ctime *int64 `gorm:"default:0;" json:"ctime"` // 添加时间 } type FsProductTemplateV2Model struct { db *gorm.DB