personal.go 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * @desc:xxxx功能描述
  3. * @company:云南奇讯科技有限公司
  4. * @Author: yixiaohu<yxh669@qq.com>
  5. * @Date: 2022/11/3 10:04
  6. */
  7. package system
  8. import (
  9. "github.com/gogf/gf/v2/frame/g"
  10. commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
  11. "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
  12. )
  13. type PersonalInfoReq struct {
  14. g.Meta `path:"/personal/getPersonalInfo" tags:"用户管理" method:"get" summary:"登录用户信息"`
  15. commonApi.Author
  16. }
  17. type PersonalInfoRes struct {
  18. g.Meta `mime:"application/json"`
  19. User *entity.SysUser `json:"user"`
  20. Roles []string `json:"roles"`
  21. DeptName string `json:"deptName"`
  22. }
  23. // SetPersonalReq 添加修改用户公用请求字段
  24. type SetPersonalReq struct {
  25. Nickname string `p:"nickname" v:"required#用户昵称不能为空"`
  26. Mobile string `p:"mobile" v:"required|phone#手机号不能为空|手机号格式错误"`
  27. Remark string `p:"remark"`
  28. Sex int `p:"sex"`
  29. UserEmail string `p:"userEmail" v:"required|email#邮箱不能为空|邮箱格式错误"`
  30. Describe string `p:"describe"` //签名
  31. Avatar string `p:"avatar"` //签名
  32. }
  33. // PersonalEditReq 修改个人
  34. type PersonalEditReq struct {
  35. g.Meta `path:"/personal/edit" tags:"用户管理" method:"put" summary:"修改个人资料"`
  36. *SetPersonalReq
  37. commonApi.Author
  38. }
  39. type PersonalEditRes struct {
  40. }
  41. type PersonalResetPwdReq struct {
  42. g.Meta `path:"/personal/resetPwd" tags:"用户管理" method:"put" summary:"重置个人密码"`
  43. Password string `p:"password" v:"required|password#密码不能为空|密码以字母开头,只能包含字母、数字和下划线,长度在6~18之间"`
  44. commonApi.Author
  45. }
  46. type PersonalResetPwdRes struct {
  47. }