123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- import "../base.api"
- type (
-
- DepartmentInfo {
- BaseIDInfo
-
- Trans string `json:"trans,optional"`
-
- Status *uint32 `json:"status,optional" validate:"omitempty,lt=20"`
-
- Sort *uint32 `json:"sort,optional" validate:"omitempty,lt=10000"`
-
- Name *string `json:"name,optional" validate:"omitempty,min=1,max=50"`
-
- Ancestors *string `json:"ancestors,optional" validate:"omitempty,max=200"`
-
- Leader *string `json:"leader,optional" validate:"omitempty,max=20"`
-
- Phone *string `json:"phone,optional" validate:"omitempty,max=18"`
-
- Email *string `json:"email,optional" validate:"omitempty,max=70"`
-
- Remark *string `json:"remark,optional" validate:"omitempty,max=200"`
-
- ParentId *uint64 `json:"parentId,optional"`
- }
-
- DepartmentListResp {
- BaseDataInfo
-
- Data DepartmentListInfo `json:"data"`
- }
-
- DepartmentListInfo {
- BaseListInfo
-
- Data []DepartmentInfo `json:"data"`
- }
-
- DepartmentListReq {
- PageInfo
-
- Name *string `json:"name,optional" validate:"omitempty,max=50"`
-
- Leader *string `json:"leader,optional" validate:"omitempty,max=20"`
- }
-
- DepartmentInfoResp {
- BaseDataInfo
-
- Data DepartmentInfo `json:"data"`
- }
- )
- @server(
- jwt: Auth
- group: department
- middleware: Authority
- )
- service Wechat {
-
- @handler createDepartment
- post /department/create (DepartmentInfo) returns (BaseMsgResp)
-
- @handler updateDepartment
- post /department/update (DepartmentInfo) returns (BaseMsgResp)
-
- @handler deleteDepartment
- post /department/delete (IDsReq) returns (BaseMsgResp)
-
- @handler getDepartmentList
- post /department/list (DepartmentListReq) returns (DepartmentListResp)
-
- @handler getDepartmentById
- post /department (IDReq) returns (DepartmentInfoResp)
- }
|