fusenapi/model/gmodel/ldap_department_gen.go
2023-11-14 11:45:25 +08:00

30 lines
1.1 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"` //
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"}
}