|
@@ -0,0 +1,102 @@
|
|
|
+import "../base.api"
|
|
|
+
|
|
|
+type (
|
|
|
+ // The response data of user information | 用户信息
|
|
|
+ UserInfo {
|
|
|
+ BaseUUIDInfo
|
|
|
+
|
|
|
+ // Status | 状态
|
|
|
+ Status *uint32 `json:"status,optional" validate:"omitempty,lt=20"`
|
|
|
+
|
|
|
+ // Username | 用户名
|
|
|
+ Username *string `json:"username,optional" validate:"omitempty,max=50"`
|
|
|
+
|
|
|
+ // Nickname | 昵称
|
|
|
+ Nickname *string `json:"nickname,optional" validate:"omitempty,max=40"`
|
|
|
+
|
|
|
+ // Password | 密码
|
|
|
+ Password *string `json:"password,optional" validate:"omitempty,min=6"`
|
|
|
+
|
|
|
+ // Description | 描述
|
|
|
+ Description *string `json:"description,optional" validate:"omitempty,max=100"`
|
|
|
+
|
|
|
+ // HomePath | 首页
|
|
|
+ HomePath *string `json:"homePath,optional" validate:"omitempty,max=70"`
|
|
|
+
|
|
|
+ // RoleId | 角色ID
|
|
|
+ RoleIds []uint64 `json:"roleIds,optional"`
|
|
|
+
|
|
|
+ // Mobile | 手机号
|
|
|
+ Mobile *string `json:"mobile,optional" validate:"omitempty,max=18"`
|
|
|
+
|
|
|
+ // Email | 邮箱
|
|
|
+ Email *string `json:"email,optional" validate:"omitempty,max=80"`
|
|
|
+
|
|
|
+ // Avatar | 头像地址
|
|
|
+ Avatar *string `json:"avatar,optional" validate:"omitempty,max=300"`
|
|
|
+
|
|
|
+ // Department ID | 部门ID
|
|
|
+ DepartmentId *uint64 `json:"departmentId,optional,omitempty"`
|
|
|
+
|
|
|
+ // Position ID | 职位ID
|
|
|
+ PositionIds []uint64 `json:"positionId,optional,omitempty"`
|
|
|
+ }
|
|
|
+
|
|
|
+ // User information response | 用户信息返回体
|
|
|
+ UserInfoResp {
|
|
|
+ BaseDataInfo
|
|
|
+
|
|
|
+ // User information | User数据
|
|
|
+ Data UserInfo `json:"data"`
|
|
|
+ }
|
|
|
+
|
|
|
+ // The response data of user's basic information | 用户基本信息返回数据
|
|
|
+ UserBaseIDInfoResp {
|
|
|
+ BaseDataInfo
|
|
|
+
|
|
|
+ // The data of user's basic information | 用户基本信息
|
|
|
+ Data UserBaseIDInfo `json:"data"`
|
|
|
+ }
|
|
|
+
|
|
|
+ // The data of user's basic information | 用户基本信息
|
|
|
+ UserBaseIDInfo {
|
|
|
+ // User's UUID | 用户的UUID
|
|
|
+ UUID *string `json:"userId"`
|
|
|
+
|
|
|
+ // User's name | 用户名
|
|
|
+ Username *string `json:"username"`
|
|
|
+
|
|
|
+ // User's nickname | 用户的昵称
|
|
|
+ Nickname *string `json:"nickname"`
|
|
|
+
|
|
|
+ // The user's avatar path | 用户的头像路径
|
|
|
+ Avatar *string `json:"avatar"`
|
|
|
+
|
|
|
+ // The home page that the user enters after logging in | 用户登陆后进入的首页
|
|
|
+ HomePath *string `json:"homePath"`
|
|
|
+
|
|
|
+ // The description of user | 用户的描述信息
|
|
|
+ Description *string `json:"desc"`
|
|
|
+
|
|
|
+ // User's Role Name | 用户的角色名称
|
|
|
+ RoleName []string `json:"roleName"`
|
|
|
+
|
|
|
+ // Department Name | 部门名称
|
|
|
+ DepartmentName string `json:"departmentName,optional"`
|
|
|
+
|
|
|
+ // Department Name | 部门备注
|
|
|
+ DepartmentRemark string `json:"departmentRemark,optional"`
|
|
|
+ }
|
|
|
+)
|
|
|
+
|
|
|
+@server(
|
|
|
+ jwt: Auth
|
|
|
+ group: User
|
|
|
+ middleware: Authority
|
|
|
+)
|
|
|
+
|
|
|
+service Wechat {
|
|
|
+ // Get user basic information | 获取用户基本信息
|
|
|
+ @handler getUserInfo
|
|
|
+ get /user/info returns (UserBaseIDInfoResp)
|
|
|
+}
|