Files
bj_power/bj_power_mes/apis/base.api
T

54 lines
2.1 KiB
Plaintext
Raw Normal View History

syntax = "v1"
type (
PageReq {
Page int `form:"page,default=1,range=[1:]" validate:"gte=1"`
Limit int `form:"limit,default=10,range=[1:100]" validate:"gte=1,lte=100"`
}
SortReq {
Sort string `form:"sort,optional"`
Order string `form:"order,optional" validate:"omitempty,oneof=asc desc ascend descend"`
}
PathId {
Id int `path:"id"`
}
BatchExecIds {
Ids []int `json:"ids" comment:"批量操作ID集合"`
}
PageReply {
Page int `json:"page"`
Limit int `json:"limit"`
Total int `json:"total"`
}
BatchExecReply {
Count int `json:"count" comment:"批量操作执行数"`
}
Role {
Id int `json:"id"`
Name string `json:"name"` // 角色名
}
Dept {
Id int `json:"id"`
Name string `json:"name"` // 部门
}
UserReply {
Id int `json:"id"`
Name string `json:"name"` // 名称
Mobile string `json:"mobile"` // 用户名
Gender int `json:"gender"` // M:男|F:女
Avatar string `json:"avatar"` // 头像
Position string `json:"position"` // 职位
Mail string `json:"mail"` // 企业邮箱
MainDepartment int `json:"mainDepartment"` // 主要部门
State int `json:"state,optional" validate:"omitempty,oneof=0 1" comment:"启用状态"` // 0:启用|1:禁用
DepartmentId int `json:"departmentId"`
DepartmentName string `json:"departmentName"`
RoleId int `json:"roleId"`
RoleName string `json:"roleName"`
LastLoginAt int64 `json:"lastLoginAt"` // 最后登录时间
LastLoginIp string `json:"lastLoginIp"` // 最后登录IP
DisabledAt int64 `json:"disabledAt"` // 创建人
CreatedAt int64 `json:"createdAt"` // 创建时间
UpdatedAt int64 `json:"updatedAt"` // 更新时间
}
)