department.go
627 字节
package protocol
const (
DepartmentAll = iota + 1 //公司所有部门
DepartmentUser //用户所有部门
)
/*Departments */
type DepartmentsRequest struct {
Type int `json:"type" valid:"Required"` //1:公司所有部门 2:用户所在部门
}
type DepartmentsResponse struct {
Departments []*Department `json:"departments,omitempty"`
}
type Department struct {
DepartmentId int `orm:"column(department_id) json:"id"`
Name string `orm:"column(name) json:"name"`
PId int `orm:"column(pid) json:"-"`
Departments []*Department `json:"departments,omitempty"`
}