[service] name = "WUser" desc = "员工服务" [[method]] name = "Login" desc = "登陆" [method.req] field = ["string username //账号", "string passwd //密码", "string code //授权码"] [method.res] field = [ "bool is_admin //是否超级管理员", "int64 id //用户id", "string hash_id //用户对外id", "int64 company_id //用户企业id", "string token //身份token", "int64 expired //token过期时间,单位:秒(s)", "string name //显示的名称", "string email //邮箱", "string username //账号", "string role_name //角色名称", ] [[method]] name = "List" desc = "用户列表" [method.req] field = ["int64 company_id //企业Id", "int32 page //当前页", "int32 per_page //每页条数"] [method.res] field = ["repeated One list //列表数据", "int64 total //列表总数"] [[method.res.message]] name = "One" field = [ "int64 id //用户id", "string hash_id //用户对外id", "string show_name //列表总数", "string username //用户名", "string email //用户邮箱", "string role_name //用户角色", "repeated Project projects //用户关联项目", ] [[method.res.message]] name = "Project" field = ["int64 id //项目id", "string hash_id //对外项目id", "string title //项目名称"] [[method]] name = "Select" desc = "用户选择列表" [method.req] field = ["int64 company_id //企业Id"] [method.res] field = ["repeated One list //列表数据"] [[method.res.message]] name = "One" field = [ "int64 id //用户id", "string hash_id //用户对外id", "string show_name //列表总数", ] [[method]] name = "Show" desc = "员工详情" [method.req] field = ["int64 id //用户id", "string hash_id //用户对外id"] [method.res] field = [ "int64 id //用户id", "string hash_id //用户对外id", "string show_name //列表总数", "string username //用户名", "string email //用户邮箱", "bool is_admin //是否超级管理员", ] [[method]] name = "Store" desc = "创建员工" [method.req] field = [ "int64 company_id //企业ID", "string show_name //显示名称", "string username //用户名", "string passwd //用户密码", "string email //用户邮箱", "repeated string project_hash_ids //项目hash_id", ] [method.res] field = [] [[method]] name = "Update" desc = "更新员工" [method.req] field = [ "int64 id //用户id", "string hash_id //用户对外id", "string show_name //显示名称", "string passwd //用户密码", ] [method.res] field = [] [[method]] name = "Destroy" desc = "删除员工" [method.req] field = ["int64 id //用户id", "string hash_id //用户对外id"] [method.res]