fusenapi/model/gmodel/ldap_department_gen.go
laodaming 76e534ef0b fix
2023-11-14 11:57:41 +08:00

31 lines
1.2 KiB
Go

package gmodel
import (
"time"
"gorm.io/gorm"
)
// ldap_department 部门表
type LdapDepartment struct {
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
Name *string `gorm:"default:'';" json:"name"` //
Remark *string `gorm:"default:'';" json:"remark"` //
Creator *string `gorm:"default:'';" json:"creator"` //
Type *string `gorm:"default:'';" json:"type"` //
ParentId *int64 `gorm:"default:0;" json:"parent_id"` // 层级如 10/20/30
Dn *string `gorm:"default:'';" json:"dn"` //
SyncState *int64 `gorm:"default:1;" json:"sync_state"` //
Sort *int64 `gorm:"default:999;" json:"sort"` // 排序
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"` //
}
type LdapDepartmentModel struct {
db *gorm.DB
name string
}
func NewLdapDepartmentModel(db *gorm.DB) *LdapDepartmentModel {
return &LdapDepartmentModel{db: db, name: "ldap_department"}
}