2023-06-30 16:55:41 +08:00

26 lines
945 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package requests
type DeptRequest struct {
AddDept // 新增部门
DeleteDept // 删除部门-批量
PutDept // 修改部门
}
// AddDept 新增部门
type AddDept struct {
ParentId string `json:"parent_id" form:"parent_id" validate:"required" label:"上级部门"` // 本表父级id
DeptName string `json:"dept_name" form:"dept_name" validate:"required" label:"部门名称"`
}
// DeleteDept 删除部门-批量
type DeleteDept struct {
DeptIds []string `json:"dept_ids" form:"dept_ids" validate:"required" label:"部门id"`
}
// PutDept 修改部门
type PutDept struct {
ParentId string `json:"parent_id" form:"parent_id" validate:"required" label:"上级部门"` // 本表父级id
DeptName string `json:"dept_name" form:"dept_name" validate:"required" label:"部门名称"`
DeptStatus int `json:"dept_status" form:"dept_status" validate:"required,oneof=1 2" label:"部门状态"` // 1:正常 2:删除)
}