package dto import "time" type DepartmentRequest struct { ID uint `json:"ID"` Name string `json:"name"` ParentID uint `json:"parentId"` Sort int `json:"sort"` LeaderID uint `json:"leaderId"` Status *bool `json:"status"` } type DepartmentListRequest struct { Name string `json:"name"` } type DeleteDepartmentRequest struct { ID uint `json:"ID" form:"id"` } type SetDepartmentUsersRequest struct { DepartmentID uint `json:"deptId" form:"deptId"` UserIDs []uint `json:"userIds"` } type SetUserDepartmentsRequest struct { ID uint `json:"ID"` DepartmentIDs []uint `json:"deptIds"` Primary uint `json:"primaryDeptId"` } type DepartmentResponse struct { ID uint `json:"ID"` CreatedAt time.Time `json:"CreatedAt"` UpdatedAt time.Time `json:"UpdatedAt"` DeletedAt any `json:"-"` Name string `json:"name"` ParentID uint `json:"parentId"` Ancestors string `json:"ancestors"` Sort int `json:"sort"` LeaderID uint `json:"leaderId"` Leader any `json:"leader"` Status *bool `json:"status"` Children []*DepartmentResponse `json:"children"` NamePath string `json:"namePath"` } type PositionRequest struct { ID uint `json:"ID"` Name string `json:"name"` Code string `json:"code"` Sort int `json:"sort"` Status *bool `json:"status"` Remark string `json:"remark"` } type PositionListRequest struct { Page int `json:"page"` PageSize int `json:"pageSize"` Name string `json:"name"` Code string `json:"code"` Status *bool `json:"status"` } type DeletePositionRequest struct { ID uint `json:"ID" form:"id"` } type SetPositionUsersRequest struct { PositionID uint `json:"positionId" form:"positionId"` UserIDs []uint `json:"userIds"` } type SetUserPositionsRequest struct { ID uint `json:"ID"` PositionIDs []uint `json:"positionIds"` } type PositionResponse struct { ID uint `json:"ID"` CreatedAt time.Time `json:"CreatedAt"` UpdatedAt time.Time `json:"UpdatedAt"` DeletedAt any `json:"-"` Name string `json:"name"` Code string `json:"code"` Sort int `json:"sort"` Status *bool `json:"status"` Remark string `json:"remark"` }