company.go 1.3 KB
package protocol

//RequestDepartmentAdd 部门设置
type RequestDepartmentAdd struct {
	CompanyID int64   `json:"company_id"` //公司
	Name      string  `json:"name"`       //部门名字
	ParantID  int64   `json:"parant_id"`  //父级部门Id
	Managers  []int64 `json:"admin_id"`   //主管userid
}

//ResponseDepartmentInfo ...
type ResponseDepartmentInfo struct {
	ID         int64               `json:"id`
	CompanyID  int64               `json:"company_id"`  //公司
	Name       string              `json:"name"`        //部门名字
	ParantID   int64               `json:"parant_id"`   //父级部门Id
	Manages    []DepartmentManager `json:"manages"`     //部门管理员
	Member     int                 `json:"member"`      //成员数
	ParantName string              `json:"parant_name"` //父级部门名字
}

type DepartmentManager struct {
	UserId int    `json:"user_id"`
	Name   string `json:"name`
}

//RequestDepartmentEdit 编辑
type RequestDepartmentEdit struct {
	ID int64 `json:"id"`
	RequestDepartmentAdd
}

//RequestDepartmentDelete ...
type RequestDepartmentDelete struct {
	ID        int64 `json:"id"`
	CompanyID int64 `json:"company_id"` //公司
}

//ResponseDepartmentList ....
type ResponseDepartmentList struct {
	List []ResponseDepartmentInfo
}