From 14ebccce5fcf8eaa78b115d02f4cbc89bde3295a Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Fri, 10 Nov 2023 16:33:20 +0800 Subject: [PATCH] fix --- model/gmodel/ldap_apis_gen.go | 25 ++++++++++++++++++++++ model/gmodel/ldap_apis_logic.go | 2 ++ model/gmodel/ldap_casbin_rule_gen.go | 25 ++++++++++++++++++++++ model/gmodel/ldap_casbin_rule_logic.go | 2 ++ model/gmodel/ldap_menus_gen.go | 29 ++++++++++++++++++++++++++ model/gmodel/ldap_menus_logic.go | 2 ++ 6 files changed, 85 insertions(+) create mode 100644 model/gmodel/ldap_apis_gen.go create mode 100644 model/gmodel/ldap_apis_logic.go create mode 100644 model/gmodel/ldap_casbin_rule_gen.go create mode 100644 model/gmodel/ldap_casbin_rule_logic.go create mode 100644 model/gmodel/ldap_menus_gen.go create mode 100644 model/gmodel/ldap_menus_logic.go diff --git a/model/gmodel/ldap_apis_gen.go b/model/gmodel/ldap_apis_gen.go new file mode 100644 index 00000000..659107f3 --- /dev/null +++ b/model/gmodel/ldap_apis_gen.go @@ -0,0 +1,25 @@ +package gmodel + +import ( + "gorm.io/gorm" + "time" +) + +// ldap_apis +type LdapApis struct { + Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // + Method *string `gorm:"default:'';" json:"method"` // + Path *string `gorm:"default:'';" json:"path"` // + Category *string `gorm:"default:'';" json:"category"` // + Remark *string `gorm:"default:'';" json:"remark"` // + Creator *string `gorm:"default:'';" json:"creator"` // + 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"` // + Dtime *time.Time `gorm:"index;default:'0000-00-00 00:00:00';" json:"dtime"` // +} +type LdapApisModel struct { + db *gorm.DB + name string +} + +func NewLdapApisModel(db *gorm.DB) *LdapApisModel { return &LdapApisModel{db: db, name: "ldap_apis"} } diff --git a/model/gmodel/ldap_apis_logic.go b/model/gmodel/ldap_apis_logic.go new file mode 100644 index 00000000..e68225aa --- /dev/null +++ b/model/gmodel/ldap_apis_logic.go @@ -0,0 +1,2 @@ +package gmodel +// TODO: 使用model的属性做你想做的 \ No newline at end of file diff --git a/model/gmodel/ldap_casbin_rule_gen.go b/model/gmodel/ldap_casbin_rule_gen.go new file mode 100644 index 00000000..86bd35f5 --- /dev/null +++ b/model/gmodel/ldap_casbin_rule_gen.go @@ -0,0 +1,25 @@ +package gmodel + +import ( + "gorm.io/gorm" +) + +// ldap_casbin_rule 规则权限表 +type LdapCasbinRule struct { + Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // + Ptype *string `gorm:"default:'';" json:"ptype"` // + 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 LdapCasbinRuleModel struct { + db *gorm.DB + name string +} + +func NewLdapCasbinRuleModel(db *gorm.DB) *LdapCasbinRuleModel { + return &LdapCasbinRuleModel{db: db, name: "ldap_casbin_rule"} +} diff --git a/model/gmodel/ldap_casbin_rule_logic.go b/model/gmodel/ldap_casbin_rule_logic.go new file mode 100644 index 00000000..e68225aa --- /dev/null +++ b/model/gmodel/ldap_casbin_rule_logic.go @@ -0,0 +1,2 @@ +package gmodel +// TODO: 使用model的属性做你想做的 \ No newline at end of file diff --git a/model/gmodel/ldap_menus_gen.go b/model/gmodel/ldap_menus_gen.go new file mode 100644 index 00000000..ffdc6e6e --- /dev/null +++ b/model/gmodel/ldap_menus_gen.go @@ -0,0 +1,29 @@ +package gmodel + +import ( + "gorm.io/gorm" + "time" +) + +// ldap_menus +type LdapMenus struct { + Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // + Name *string `gorm:"default:'';" json:"name"` // + Title *string `gorm:"default:'';" json:"title"` // + Icon *string `gorm:"default:'';" json:"icon"` // + Path *string `gorm:"default:'';" json:"path"` // + Sort *int64 `gorm:"default:999;" json:"sort"` // + Status *int64 `gorm:"default:1;" json:"status"` // + Creator *string `gorm:"default:'';" json:"creator"` // + 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"` // + Dtime *time.Time `gorm:"index;default:'0000-00-00 00:00:00';" json:"dtime"` // +} +type LdapMenusModel struct { + db *gorm.DB + name string +} + +func NewLdapMenusModel(db *gorm.DB) *LdapMenusModel { + return &LdapMenusModel{db: db, name: "ldap_menus"} +} diff --git a/model/gmodel/ldap_menus_logic.go b/model/gmodel/ldap_menus_logic.go new file mode 100644 index 00000000..e68225aa --- /dev/null +++ b/model/gmodel/ldap_menus_logic.go @@ -0,0 +1,2 @@ +package gmodel +// TODO: 使用model的属性做你想做的 \ No newline at end of file