This commit is contained in:
laodaming
2023-11-10 16:31:10 +08:00
parent ad9d89a1bb
commit 41e650488d
30 changed files with 1 additions and 774 deletions

View File

@@ -1,25 +0,0 @@
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"} }

View File

@@ -1,2 +0,0 @@
package gmodel
// TODO: 使用model的属性做你想做的

View File

@@ -1,25 +0,0 @@
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"}
}

View File

@@ -1,2 +0,0 @@
package gmodel
// TODO: 使用model的属性做你想做的

View File

@@ -1,22 +0,0 @@
package gmodel
import (
"gorm.io/gorm"
)
// ldap_department 部门表
type LdapDepartment struct {
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
Source *string `gorm:"default:'';" json:"source"` //
AppId *string `gorm:"default:'';" json:"app_id"` //
Name *string `gorm:"default:'';" json:"name"` //
DepartmentId *string `gorm:"default:'';" json:"department_id"` //
}
type LdapDepartmentModel struct {
db *gorm.DB
name string
}
func NewLdapDepartmentModel(db *gorm.DB) *LdapDepartmentModel {
return &LdapDepartmentModel{db: db, name: "ldap_department"}
}

View File

@@ -1,2 +0,0 @@
package gmodel
// TODO: 使用model的属性做你想做的

View File

@@ -1,19 +0,0 @@
package gmodel
import (
"gorm.io/gorm"
)
// ldap_group_users
type LdapGroupUsers struct {
GroupId *int64 `gorm:"default:0;" json:"group_id"` // 分组id
UserId *int64 `gorm:"default:0;" json:"user_id"` // user表id
}
type LdapGroupUsersModel struct {
db *gorm.DB
name string
}
func NewLdapGroupUsersModel(db *gorm.DB) *LdapGroupUsersModel {
return &LdapGroupUsersModel{db: db, name: "ldap_group_users"}
}

View File

@@ -1,2 +0,0 @@
package gmodel
// TODO: 使用model的属性做你想做的

View File

@@ -1,31 +0,0 @@
package gmodel
import (
"gorm.io/gorm"
"time"
)
// ldap_groups
type LdapGroups struct {
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
GroupName *string `gorm:"default:'';" json:"group_name"` //
Remark *string `gorm:"default:'';" json:"remark"` //
Creator *string `gorm:"default:'';" json:"creator"` //
GroupType *string `gorm:"default:'';" json:"group_type"` //
ParentId *int64 `gorm:"default:0;" json:"parent_id"` //
DeptId *string `gorm:"default:'';" json:"dept_id"` //
DeptParentId *string `gorm:"default:'';" json:"dept_parent_id"` //
GroupDn *string `gorm:"default:'';" json:"group_dn"` //
SyncState *int64 `gorm:"default:0;" json:"sync_state"` //
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 LdapGroupsModel struct {
db *gorm.DB
name string
}
func NewLdapGroupsModel(db *gorm.DB) *LdapGroupsModel {
return &LdapGroupsModel{db: db, name: "ldap_groups"}
}

View File

@@ -1,2 +0,0 @@
package gmodel
// TODO: 使用model的属性做你想做的

View File

@@ -1,29 +0,0 @@
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"}
}

View File

@@ -1,2 +0,0 @@
package gmodel
// TODO: 使用model的属性做你想做的

View File

@@ -1,19 +0,0 @@
package gmodel
import (
"gorm.io/gorm"
)
// ldap_role_menus
type LdapRoleMenus struct {
MenuId *int64 `gorm:"default:0;" json:"menu_id"` // 菜单id
RoleId *int64 `gorm:"default:0;" json:"role_id"` // 角色id
}
type LdapRoleMenusModel struct {
db *gorm.DB
name string
}
func NewLdapRoleMenusModel(db *gorm.DB) *LdapRoleMenusModel {
return &LdapRoleMenusModel{db: db, name: "ldap_role_menus"}
}

View File

@@ -1,2 +0,0 @@
package gmodel
// TODO: 使用model的属性做你想做的

View File

@@ -1,28 +0,0 @@
package gmodel
import (
"gorm.io/gorm"
"time"
)
// ldap_roles
type LdapRoles struct {
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
Name *string `gorm:"unique_key;default:'';" json:"name"` //
Keyword *string `gorm:"unique_key;default:'';" json:"keyword"` //
Remark *string `gorm:"default:'';" json:"remark"` //
Status *int64 `gorm:"default:1;" json:"status"` //
Sort *int64 `gorm:"default:999;" json:"sort"` //
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 LdapRolesModel struct {
db *gorm.DB
name string
}
func NewLdapRolesModel(db *gorm.DB) *LdapRolesModel {
return &LdapRolesModel{db: db, name: "ldap_roles"}
}

View File

@@ -1,2 +0,0 @@
package gmodel
// TODO: 使用model的属性做你想做的

View File

@@ -1,19 +0,0 @@
package gmodel
import (
"gorm.io/gorm"
)
// ldap_user_roles
type LdapUserRoles struct {
RoleId *int64 `gorm:"default:0;" json:"role_id"` // 角色id
UserId *int64 `gorm:"default:0;" json:"user_id"` // 用户id
}
type LdapUserRolesModel struct {
db *gorm.DB
name string
}
func NewLdapUserRolesModel(db *gorm.DB) *LdapUserRolesModel {
return &LdapUserRolesModel{db: db, name: "ldap_user_roles"}
}

View File

@@ -1,2 +0,0 @@
package gmodel
// TODO: 使用model的属性做你想做的

View File

@@ -8,11 +8,7 @@ import (
// ldap_users
type LdapUsers struct {
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
UserId *string `gorm:"default:'';" json:"user_id"` //
OpenId *string `gorm:"default:'';" json:"open_id"` //
UnionId *string `gorm:"default:'';" json:"union_id"` //
Name *string `gorm:"default:'';" json:"name"` //
EnName *string `gorm:"default:'';" json:"en_name"` //
Nickname *string `gorm:"default:'';" json:"nickname"` //
Email *string `gorm:"default:'';" json:"email"` //
EnterpriseEmail *string `gorm:"default:'';" json:"enterprise_email"` //
@@ -20,14 +16,8 @@ type LdapUsers struct {
Mobile *string `gorm:"default:'';" json:"mobile"` //
Gender *int64 `gorm:"default:0;" json:"gender"` // 性别 0未知 1男 2女
Avatar *string `gorm:"default:'';" json:"avatar"` //
IsFrozen *int64 `gorm:"default:0;" json:"is_frozen"` // 是否冻结 0否1是
IsResigned *int64 `gorm:"default:0;" json:"is_resigned"` // 是否离职 0否 1是
IsActivated *int64 `gorm:"default:0;" json:"is_activated"` // 是否激活 0否1是
IsExited *int64 `gorm:"default:0;" json:"is_exited"` // 是否退出 0否1是
IsUnjoin *int64 `gorm:"default:0;" json:"is_unjoin"` // 是否未加入 0否1是
Status *int64 `gorm:"default:1;" json:"status"` // 状态 0禁止 1正常
Departmentids *string `gorm:"default:'';" json:"departmentIds"` //
WorkStation *string `gorm:"default:'';" json:"work_station"` //
EmployeeNo *string `gorm:"default:'';" json:"employee_no"` //
EmployeeType *int64 `gorm:"default:0;" json:"employee_type"` // 1正式员工 2实习生 3外包4劳务 5顾问
UserDn *string `gorm:"default:'';" json:"user_dn"` //
JoinTime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"join_time"` //

View File

@@ -121,13 +121,7 @@ type AllModelsGen struct {
FsZipCode *FsZipCodeModel // fs_zip_code 邮编表
LdapApis *LdapApisModel // ldap_apis
LdapCasbinRule *LdapCasbinRuleModel // ldap_casbin_rule 规则权限表
LdapDepartment *LdapDepartmentModel // ldap_department 部门表
LdapGroupUsers *LdapGroupUsersModel // ldap_group_users
LdapGroups *LdapGroupsModel // ldap_groups
LdapMenus *LdapMenusModel // ldap_menus
LdapRoleMenus *LdapRoleMenusModel // ldap_role_menus
LdapRoles *LdapRolesModel // ldap_roles
LdapUserRoles *LdapUserRolesModel // ldap_user_roles
LdapUsers *LdapUsersModel // ldap_users
}
@@ -251,13 +245,7 @@ func NewAllModels(gdb *gorm.DB) *AllModelsGen {
FsZipCode: NewFsZipCodeModel(gdb),
LdapApis: NewLdapApisModel(gdb),
LdapCasbinRule: NewLdapCasbinRuleModel(gdb),
LdapDepartment: NewLdapDepartmentModel(gdb),
LdapGroupUsers: NewLdapGroupUsersModel(gdb),
LdapGroups: NewLdapGroupsModel(gdb),
LdapMenus: NewLdapMenusModel(gdb),
LdapRoleMenus: NewLdapRoleMenusModel(gdb),
LdapRoles: NewLdapRolesModel(gdb),
LdapUserRoles: NewLdapUserRolesModel(gdb),
LdapUsers: NewLdapUsersModel(gdb),
}
return models