12345678910111213141516171819202122232425262728 |
- package model
- import "dy-admin/internal/pcmserver/common"
- type Dept struct {
- DeptID int `json:"deptId" gorm:"primaryKey;autoIncrement;comment:部门编码"`
- ParentId int `json:"parentId" gorm:"comment:上级部门"`
- DeptPath string `json:"deptPath" gorm:"size:255;comment:部门路径"`
- DeptName string `json:"deptName" gorm:"size:128;comment:部门名称"`
- Sort int `json:"sort" gorm:"size:4;comment:排序"`
- Leader string `json:"leader" gorm:"size:128;comment:负责人"`
- Phone string `json:"phone" gorm:"size:11comment:手机;"`
- Email string `json:"email" gorm:"size:64;comment:邮箱"`
- Status int `json:"status" gorm:"size:4;comment:状态"`
- Children []Dept `json:"children" gorm:"-"`
- common.ControlBy
- common.ModelTime
- }
- func (Dept) TableName() string {
- return "sys_dept"
- }
- func (Dept) AllowOrderField() map[string]struct{} {
- orderMap := make(map[string]struct{}, 6)
- orderMap["sort"] = struct{}{}
- return orderMap
- }
|