23 lines
707 B
Go
23 lines
707 B
Go
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"}
|
|
}
|