From a3f8e0e250d9157936736aeec29477863c7dcac4 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 28 Aug 2023 14:57:01 +0800 Subject: [PATCH] 1 --- model/gmodel/casbin_rule_gen.go | 24 ++++++++++++++++ model/gmodel/casbin_rule_logic.go | 2 ++ model/gmodel/fs_admin_auth_role_gen.go | 33 +++++++++++++++++++++ model/gmodel/fs_admin_auth_role_logic.go | 2 ++ model/gmodel/fs_admin_department_gen.go | 35 +++++++++++++++++++++++ model/gmodel/fs_admin_department_logic.go | 2 ++ model/gmodel/fs_admin_menu_gen.go | 33 +++++++++++++++++++++ model/gmodel/fs_admin_menu_logic.go | 2 ++ 8 files changed, 133 insertions(+) create mode 100644 model/gmodel/casbin_rule_gen.go create mode 100644 model/gmodel/casbin_rule_logic.go create mode 100644 model/gmodel/fs_admin_auth_role_gen.go create mode 100644 model/gmodel/fs_admin_auth_role_logic.go create mode 100644 model/gmodel/fs_admin_department_gen.go create mode 100644 model/gmodel/fs_admin_department_logic.go create mode 100644 model/gmodel/fs_admin_menu_gen.go create mode 100644 model/gmodel/fs_admin_menu_logic.go diff --git a/model/gmodel/casbin_rule_gen.go b/model/gmodel/casbin_rule_gen.go new file mode 100644 index 00000000..57bd8599 --- /dev/null +++ b/model/gmodel/casbin_rule_gen.go @@ -0,0 +1,24 @@ +package gmodel + +import ( + "gorm.io/gorm" +) + +// casbin_rule +type CasbinRule struct { + PType *string `gorm:"default:'';" json:"p_type"` // + V0 *string `gorm:"default:'';" json:"v0"` // + V1 *string `gorm:"default:'';" json:"v1"` // + V2 *string `gorm:"default:'';" json:"v2"` // + V3 *string `gorm:"default:'';" json:"v3"` // + V4 *string `gorm:"default:'';" json:"v4"` // + V5 *string `gorm:"default:'';" json:"v5"` // +} +type CasbinRuleModel struct { + db *gorm.DB + name string +} + +func NewCasbinRuleModel(db *gorm.DB) *CasbinRuleModel { + return &CasbinRuleModel{db: db, name: "casbin_rule"} +} diff --git a/model/gmodel/casbin_rule_logic.go b/model/gmodel/casbin_rule_logic.go new file mode 100644 index 00000000..e68225aa --- /dev/null +++ b/model/gmodel/casbin_rule_logic.go @@ -0,0 +1,2 @@ +package gmodel +// TODO: 使用model的属性做你想做的 \ No newline at end of file diff --git a/model/gmodel/fs_admin_auth_role_gen.go b/model/gmodel/fs_admin_auth_role_gen.go new file mode 100644 index 00000000..f9075654 --- /dev/null +++ b/model/gmodel/fs_admin_auth_role_gen.go @@ -0,0 +1,33 @@ +package gmodel + +import ( + "gorm.io/gorm" + "time" +) + +// fs_admin_auth_role 后台--角色表 +type FsAdminAuthRole struct { + Id int64 `gorm:"primary_key;default:0;" json:"id"` // 序号 + RolePid *int64 `gorm:"default:0;" json:"role_pid"` // 上级角色 + RoleName *string `gorm:"default:'';" json:"role_name"` // + DataAuthType *int64 `gorm:"default:1;" json:"data_auth_type"` // 数据权限类型 + DataAuth *string `gorm:"default:'';" json:"data_auth"` // + Status *int64 `gorm:"default:2;" json:"status"` // 状态:1=启用,2=停用 + Remark *string `gorm:"default:'';" json:"remark"` // + Sort *int64 `gorm:"default:0;" json:"sort"` // 排序权重 + CreateTime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"create_time"` // + UpdateTime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"update_time"` // + DeleteTime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"delete_time"` // + CreateUid *int64 `gorm:"default:0;" json:"create_uid"` // 创建人 + UpdateUid *int64 `gorm:"default:0;" json:"update_uid"` // 更新人 + DeleteUid *int64 `gorm:"default:0;" json:"delete_uid"` // 删除人 + IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除:1=是 0=否 +} +type FsAdminAuthRoleModel struct { + db *gorm.DB + name string +} + +func NewFsAdminAuthRoleModel(db *gorm.DB) *FsAdminAuthRoleModel { + return &FsAdminAuthRoleModel{db: db, name: "fs_admin_auth_role"} +} diff --git a/model/gmodel/fs_admin_auth_role_logic.go b/model/gmodel/fs_admin_auth_role_logic.go new file mode 100644 index 00000000..e68225aa --- /dev/null +++ b/model/gmodel/fs_admin_auth_role_logic.go @@ -0,0 +1,2 @@ +package gmodel +// TODO: 使用model的属性做你想做的 \ No newline at end of file diff --git a/model/gmodel/fs_admin_department_gen.go b/model/gmodel/fs_admin_department_gen.go new file mode 100644 index 00000000..25349b64 --- /dev/null +++ b/model/gmodel/fs_admin_department_gen.go @@ -0,0 +1,35 @@ +package gmodel + +import ( + "gorm.io/gorm" + "time" +) + +// fs_admin_department 后台--部门表 +type FsAdminDepartment struct { + Id int64 `gorm:"primary_key;default:0;" json:"id"` // 序号 + DeptPid *int64 `gorm:"default:0;" json:"dept_pid"` // 上级部门 + DeptNo *string `gorm:"default:'';" json:"dept_no"` // + DeptName *string `gorm:"default:'';" json:"dept_name"` // + ShortName *string `gorm:"default:'';" json:"short_name"` // + UserId *int64 `gorm:"default:0;" json:"user_id"` // 部门负责人 + Phone *string `gorm:"default:'';" json:"phone"` // + Status *int64 `gorm:"default:2;" json:"status"` // 状态:1=启用,2=停用 + Remark *string `gorm:"default:'';" json:"remark"` // + Sort *int64 `gorm:"default:0;" json:"sort"` // 排序权重 + CreateTime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"create_time"` // + UpdateTime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"update_time"` // + DeleteTime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"delete_time"` // + CreateUid *int64 `gorm:"default:0;" json:"create_uid"` // 创建人 + UpdateUid *int64 `gorm:"default:0;" json:"update_uid"` // 更新人 + DeleteUid *int64 `gorm:"default:0;" json:"delete_uid"` // 删除人 + IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除:1=是 0=否 +} +type FsAdminDepartmentModel struct { + db *gorm.DB + name string +} + +func NewFsAdminDepartmentModel(db *gorm.DB) *FsAdminDepartmentModel { + return &FsAdminDepartmentModel{db: db, name: "fs_admin_department"} +} diff --git a/model/gmodel/fs_admin_department_logic.go b/model/gmodel/fs_admin_department_logic.go new file mode 100644 index 00000000..e68225aa --- /dev/null +++ b/model/gmodel/fs_admin_department_logic.go @@ -0,0 +1,2 @@ +package gmodel +// TODO: 使用model的属性做你想做的 \ No newline at end of file diff --git a/model/gmodel/fs_admin_menu_gen.go b/model/gmodel/fs_admin_menu_gen.go new file mode 100644 index 00000000..230ea1b4 --- /dev/null +++ b/model/gmodel/fs_admin_menu_gen.go @@ -0,0 +1,33 @@ +package gmodel + +import ( + "gorm.io/gorm" + "time" +) + +// fs_admin_menu 后台--菜单表 +type FsAdminMenu struct { + Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // 序号 + Pid *int64 `gorm:"default:0;" json:"pid"` // 上级菜单 + Name *string `gorm:"default:'';" json:"name"` // + Path *string `gorm:"default:'';" json:"path"` // + Hide *string `gorm:"default:'';" json:"hide"` // + Metadata *[]byte `gorm:"default:'';" json:"metadata"` // 元数据,json格式 + Remark *string `gorm:"default:'';" json:"remark"` // + Sort *int64 `gorm:"default:0;" json:"sort"` // 排序权重 + CreateTime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"create_time"` // + UpdateTime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"update_time"` // + DeleteTime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"delete_time"` // + CreateUid *int64 `gorm:"default:0;" json:"create_uid"` // 创建人 + UpdateUid *int64 `gorm:"default:0;" json:"update_uid"` // 更新人 + DeleteUid *int64 `gorm:"default:0;" json:"delete_uid"` // 删除人 + IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除:1=是 0=否 +} +type FsAdminMenuModel struct { + db *gorm.DB + name string +} + +func NewFsAdminMenuModel(db *gorm.DB) *FsAdminMenuModel { + return &FsAdminMenuModel{db: db, name: "fs_admin_menu"} +} diff --git a/model/gmodel/fs_admin_menu_logic.go b/model/gmodel/fs_admin_menu_logic.go new file mode 100644 index 00000000..e68225aa --- /dev/null +++ b/model/gmodel/fs_admin_menu_logic.go @@ -0,0 +1,2 @@ +package gmodel +// TODO: 使用model的属性做你想做的 \ No newline at end of file