From 5934017dbf871a0f5411c1dd25a694676b006840 Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Mon, 3 Jul 2023 14:47:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20model=20=E5=BA=8F=E5=88=97?= =?UTF-8?q?=E5=8C=96=E6=8F=90=E7=A4=BA,=20=E9=98=B2=E6=AD=A2=E7=A9=BA?= =?UTF-8?q?=E5=80=BC=E4=BC=A0=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fs_gen_mysql_model.sh | 9 +++++++-- model/gmodel/fs_web_set_gen.go | 2 +- model/gmodel/var_gen.go | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/fs_gen_mysql_model.sh b/fs_gen_mysql_model.sh index e6347e26..5d6bbc3c 100755 --- a/fs_gen_mysql_model.sh +++ b/fs_gen_mysql_model.sh @@ -1,4 +1,9 @@ #! /bin/bash # goctl model mysql ddl --src ./ddl/$1.sql --dir model/ --home ./goctl_template -name=${1%%\\*} -go run generator/main.go -name $name \ No newline at end of file +if [ $# -gt 0 ] +then + name=${1%%\\*} + go run generator/main.go -name $name +else + echo "输入: - 表示所有表. 或者 单表名" +fi diff --git a/model/gmodel/fs_web_set_gen.go b/model/gmodel/fs_web_set_gen.go index 457d7252..49fd2152 100644 --- a/model/gmodel/fs_web_set_gen.go +++ b/model/gmodel/fs_web_set_gen.go @@ -10,7 +10,7 @@ type FsWebSet struct { Key *string `gorm:"index;default:'';" json:"key"` // key值 Value *string `gorm:"default:'';" json:"value"` // 具体内容 Ctime *int64 `gorm:"default:0;" json:"ctime"` // 创建时间 - ExpTime *int64 `gorm:"default:0;" json:"exp_time"` // + ExpTime *int64 `gorm:"default:0;" json:"exp_time"` // 过期时间 } type FsWebSetModel struct{ db *gorm.DB } diff --git a/model/gmodel/var_gen.go b/model/gmodel/var_gen.go index 01ef144f..192e34c8 100644 --- a/model/gmodel/var_gen.go +++ b/model/gmodel/var_gen.go @@ -17,12 +17,16 @@ type AllModelsGen struct { FsCart *FsCartModel // fs_cart 购物车 FsChangeCode *FsChangeCodeModel // fs_change_code 忘记密码code表 FsCloud *FsCloudModel // fs_cloud 云仓表 + FsCloudDeliverEveryTmp *FsCloudDeliverEveryTmpModel // fs_cloud_deliver_every_tmp + FsCloudDeliverTmp *FsCloudDeliverTmpModel // fs_cloud_deliver_tmp FsCloudPickUp *FsCloudPickUpModel // fs_cloud_pick_up 云仓提货单 FsCloudPickUpDetail *FsCloudPickUpDetailModel // fs_cloud_pick_up_detail 云仓提货单-详情 FsCloudReceive *FsCloudReceiveModel // fs_cloud_receive 云仓接收工厂总单 + FsCloudReceiveEvery *FsCloudReceiveEveryModel // fs_cloud_receive_every FsCloudRenderLog *FsCloudRenderLogModel // fs_cloud_render_log 云渲染日志表 FsCloudUserApplyBack *FsCloudUserApplyBackModel // fs_cloud_user_apply_back 该表废弃 FsContact *FsContactModel // fs_contact 该表暂未使用 + FsContactService *FsContactServiceModel // fs_contact_service FsCoupon *FsCouponModel // fs_coupon 代金券(暂未使用) FsDeliver *FsDeliverModel // fs_deliver 发货表 云仓 直发 通用(已废弃) FsDeliverEvery *FsDeliverEveryModel // fs_deliver_every 发货详细表(已废弃) @@ -33,6 +37,7 @@ type AllModelsGen struct { FsFactoryDeliver *FsFactoryDeliverModel // fs_factory_deliver 工厂发货主表(废弃) FsFactoryDeliverEvery *FsFactoryDeliverEveryModel // fs_factory_deliver_every 该表废弃 FsFactoryProduct *FsFactoryProductModel // fs_factory_product 工厂生产表(废弃) + FsFactoryShipTmp *FsFactoryShipTmpModel // fs_factory_ship_tmp FsFaq *FsFaqModel // fs_faq 常见问题 FsFont *FsFontModel // fs_font 字体配置 FsGerent *FsGerentModel // fs_gerent 管理员表 @@ -50,10 +55,12 @@ type AllModelsGen struct { FsProduct *FsProductModel // fs_product 产品表 FsProductCopy1 *FsProductCopy1Model // fs_product_copy1 产品表 FsProductDesign *FsProductDesignModel // fs_product_design 产品设计表 + FsProductDesignGather *FsProductDesignGatherModel // fs_product_design_gather FsProductModel3d *FsProductModel3dModel // fs_product_model3d 产品模型表 FsProductModel3dLight *FsProductModel3dLightModel // fs_product_model3d_light 模型-灯光组表 FsProductOption *FsProductOptionModel // fs_product_option 产品选项表(已废弃) FsProductPrice *FsProductPriceModel // fs_product_price 阶梯价格表 + FsProductRenderDesign *FsProductRenderDesignModel // fs_product_render_design FsProductScene *FsProductSceneModel // fs_product_scene 产品场景表 FsProductSize *FsProductSizeModel // fs_product_size 产品尺寸表 FsProductTemplate *FsProductTemplateModel // fs_product_template 产品模板表(已废弃) @@ -62,6 +69,7 @@ type AllModelsGen struct { FsProductTemplateTags *FsProductTemplateTagsModel // fs_product_template_tags 模板标签表 FsProductTemplateV2 *FsProductTemplateV2Model // fs_product_template_v2 产品-模型-模板表 FsProductV2Tmp *FsProductV2TmpModel // fs_product_v2_tmp 产品表 + FsQrcode *FsQrcodeModel // fs_qrcode FsQrcodeLog *FsQrcodeLogModel // fs_qrcode_log 二维码扫描日志 FsQrcodeSet *FsQrcodeSetModel // fs_qrcode_set 二维码边框配置表 FsQrcodeUser *FsQrcodeUserModel // fs_qrcode_user 二维码-用户名表 @@ -69,11 +77,13 @@ type AllModelsGen struct { FsQuotationProduct *FsQuotationProductModel // fs_quotation_product 报价单产品表 FsQuotationRemarkTemplate *FsQuotationRemarkTemplateModel // fs_quotation_remark_template 报价单备注模板 FsQuotationSaler *FsQuotationSalerModel // fs_quotation_saler 报价单业务员表 + FsRefundReason *FsRefundReasonModel // fs_refund_reason FsStandardLogo *FsStandardLogoModel // fs_standard_logo 标准logo FsTags *FsTagsModel // fs_tags 产品分类表 FsToolLogs *FsToolLogsModel // fs_tool_logs 3d设计工具日志表 FsToolTemplate *FsToolTemplateModel // fs_tool_template 设计工具模板(废弃) FsToolUser *FsToolUserModel // fs_tool_user 3d设计工具用户表 + FsTrade *FsTradeModel // fs_trade FsUser *FsUserModel // fs_user 用户表 FsUserDesign *FsUserDesignModel // fs_user_design 废弃表 FsUserStock *FsUserStockModel // fs_user_stock 用户云仓库存 @@ -96,12 +106,16 @@ func NewAllModels(gdb *gorm.DB) *AllModelsGen { FsCart: NewFsCartModel(gdb), FsChangeCode: NewFsChangeCodeModel(gdb), FsCloud: NewFsCloudModel(gdb), + FsCloudDeliverEveryTmp: NewFsCloudDeliverEveryTmpModel(gdb), + FsCloudDeliverTmp: NewFsCloudDeliverTmpModel(gdb), FsCloudPickUp: NewFsCloudPickUpModel(gdb), FsCloudPickUpDetail: NewFsCloudPickUpDetailModel(gdb), FsCloudReceive: NewFsCloudReceiveModel(gdb), + FsCloudReceiveEvery: NewFsCloudReceiveEveryModel(gdb), FsCloudRenderLog: NewFsCloudRenderLogModel(gdb), FsCloudUserApplyBack: NewFsCloudUserApplyBackModel(gdb), FsContact: NewFsContactModel(gdb), + FsContactService: NewFsContactServiceModel(gdb), FsCoupon: NewFsCouponModel(gdb), FsDeliver: NewFsDeliverModel(gdb), FsDeliverEvery: NewFsDeliverEveryModel(gdb), @@ -112,6 +126,7 @@ func NewAllModels(gdb *gorm.DB) *AllModelsGen { FsFactoryDeliver: NewFsFactoryDeliverModel(gdb), FsFactoryDeliverEvery: NewFsFactoryDeliverEveryModel(gdb), FsFactoryProduct: NewFsFactoryProductModel(gdb), + FsFactoryShipTmp: NewFsFactoryShipTmpModel(gdb), FsFaq: NewFsFaqModel(gdb), FsFont: NewFsFontModel(gdb), FsGerent: NewFsGerentModel(gdb), @@ -129,10 +144,12 @@ func NewAllModels(gdb *gorm.DB) *AllModelsGen { FsProduct: NewFsProductModel(gdb), FsProductCopy1: NewFsProductCopy1Model(gdb), FsProductDesign: NewFsProductDesignModel(gdb), + FsProductDesignGather: NewFsProductDesignGatherModel(gdb), FsProductModel3d: NewFsProductModel3dModel(gdb), FsProductModel3dLight: NewFsProductModel3dLightModel(gdb), FsProductOption: NewFsProductOptionModel(gdb), FsProductPrice: NewFsProductPriceModel(gdb), + FsProductRenderDesign: NewFsProductRenderDesignModel(gdb), FsProductScene: NewFsProductSceneModel(gdb), FsProductSize: NewFsProductSizeModel(gdb), FsProductTemplate: NewFsProductTemplateModel(gdb), @@ -141,6 +158,7 @@ func NewAllModels(gdb *gorm.DB) *AllModelsGen { FsProductTemplateTags: NewFsProductTemplateTagsModel(gdb), FsProductTemplateV2: NewFsProductTemplateV2Model(gdb), FsProductV2Tmp: NewFsProductV2TmpModel(gdb), + FsQrcode: NewFsQrcodeModel(gdb), FsQrcodeLog: NewFsQrcodeLogModel(gdb), FsQrcodeSet: NewFsQrcodeSetModel(gdb), FsQrcodeUser: NewFsQrcodeUserModel(gdb), @@ -148,11 +166,13 @@ func NewAllModels(gdb *gorm.DB) *AllModelsGen { FsQuotationProduct: NewFsQuotationProductModel(gdb), FsQuotationRemarkTemplate: NewFsQuotationRemarkTemplateModel(gdb), FsQuotationSaler: NewFsQuotationSalerModel(gdb), + FsRefundReason: NewFsRefundReasonModel(gdb), FsStandardLogo: NewFsStandardLogoModel(gdb), FsTags: NewFsTagsModel(gdb), FsToolLogs: NewFsToolLogsModel(gdb), FsToolTemplate: NewFsToolTemplateModel(gdb), FsToolUser: NewFsToolUserModel(gdb), + FsTrade: NewFsTradeModel(gdb), FsUser: NewFsUserModel(gdb), FsUserDesign: NewFsUserDesignModel(gdb), FsUserStock: NewFsUserStockModel(gdb),