From 81bfb0dda8dac0980219d862d5c7eda568aed6a3 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 14 Aug 2023 15:07:12 +0800 Subject: [PATCH] fix --- model/gmodel/fs_user_info_gen.go | 25 +++++++++++++++++++++++++ model/gmodel/fs_user_info_logic.go | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 model/gmodel/fs_user_info_gen.go create mode 100644 model/gmodel/fs_user_info_logic.go diff --git a/model/gmodel/fs_user_info_gen.go b/model/gmodel/fs_user_info_gen.go new file mode 100644 index 00000000..71b1bd7a --- /dev/null +++ b/model/gmodel/fs_user_info_gen.go @@ -0,0 +1,25 @@ +package gmodel + +import ( + "gorm.io/gorm" +) + +// fs_user_info 用户信息表 +type FsUserInfo struct { + Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID + Module *string `gorm:"default:'';" json:"module"` // 所属模块 + UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户 ID + GuestId *int64 `gorm:"index;default:0;" json:"guest_id"` // 访客 ID + Metadata *string `gorm:"default:'';" json:"metadata"` // 元数据,json格式 + MetaKey1 *string `gorm:"default:'';" json:"meta_key1"` // 需要关键信息查询的自定义属性1,可以动态增加 + Ctime *int64 `gorm:"default:0;" json:"ctime"` // + Utime *int64 `gorm:"default:0;" json:"utime"` // +} +type FsUserInfoModel struct { + db *gorm.DB + name string +} + +func NewFsUserInfoModel(db *gorm.DB) *FsUserInfoModel { + return &FsUserInfoModel{db: db, name: "fs_user_info"} +} diff --git a/model/gmodel/fs_user_info_logic.go b/model/gmodel/fs_user_info_logic.go new file mode 100644 index 00000000..e68225aa --- /dev/null +++ b/model/gmodel/fs_user_info_logic.go @@ -0,0 +1,2 @@ +package gmodel +// TODO: 使用model的属性做你想做的 \ No newline at end of file