user.go 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. package apis
  2. type LoginRequest struct {
  3. User string `json:"user"`
  4. Password string `json:"password"`
  5. }
  6. type LoginReply struct {
  7. Uid int64 `json:"uid"`
  8. UserType int32 `json:"user_type"`
  9. EffectiveStart int64 `json:"effective_start"`
  10. EffectiveEnd int64 `json:"effective_end"`
  11. }
  12. type UserAddRequest struct {
  13. SelfId int64 `json:"self_id"`
  14. SelfName string `json:"self_name"`
  15. User string `json:"user"`
  16. Password string `json:"password"`
  17. RealName string `json:"real_name"`
  18. UserType int32 `json:"user_type"`
  19. EffectiveStart int64 `json:"effective_start"`
  20. EffectiveEnd int64 `json:"effective_end"`
  21. }
  22. type UserAddReply struct {
  23. Uid int64 `json:"uid"`
  24. }
  25. type UserListRequest struct {
  26. Page int64 `json:"page"`
  27. PageSize int64 `json:"page_size"`
  28. User string `json:"user"`
  29. RealName string `json:"real_name"`
  30. SelfId int64 `json:"self_id"`
  31. }
  32. type UserItem struct {
  33. Uid int64 `json:"uid"`
  34. User string `json:"user"`
  35. RealName string `json:"real_name"`
  36. UserType int32 `json:"user_type"`
  37. EffectiveStart int64 `json:"effective_start"`
  38. EffectiveEnd int64 `json:"effective_end"`
  39. // 1有效 2 过期
  40. Status int32 `json:"status"`
  41. }
  42. type UserListReply struct {
  43. Page int64 `json:"page"`
  44. Total int64 `json:"total"`
  45. List []*UserItem `json:"list"`
  46. }
  47. type UserInfoRequest struct {
  48. Uid int64 `json:"uid"`
  49. }
  50. type UserInfoReply struct {
  51. Uid int64 `json:"uid"`
  52. User string `json:"user"`
  53. RealName string `json:"real_name"`
  54. UserType int32 `json:"user_type"`
  55. EffectiveStart int64 `json:"effective_start"`
  56. EffectiveEnd int64 `json:"effective_end"`
  57. }
  58. type UserDelRequest struct {
  59. SelfId int64 `json:"self_id"`
  60. DelId int64 `json:"del_id"`
  61. SelfName string `json:"self_name"`
  62. }
  63. type UserDelReply struct {
  64. User string `json:"user"`
  65. RealName string `json:"real_name"`
  66. UserType int32 `json:"user_type"`
  67. //EffectiveStartAt int64 `json:"effective_start_at"`
  68. //EffectiveEndAt int64 `json:"effective_end_at"`
  69. }
  70. type UserResetPasswordRequest struct {
  71. SelfId int64 `json:"self_id"`
  72. ResetId int64 `json:"reset_id"`
  73. Password string `json:"password"`
  74. SelfName string `json:"self_name"`
  75. }
  76. type UserResetPasswordReply struct {
  77. User string `json:"user"`
  78. RealName string `json:"real_name"`
  79. UserType int32 `json:"user_type"`
  80. EffectiveStartAt int64 `json:"effective_start"`
  81. EffectiveEndAt int64 `json:"effective_end"`
  82. }
  83. type UserUpdateRequest struct {
  84. SelfId int64 `json:"self_id"`
  85. UpdateId int64 `json:"update_id"`
  86. User string `json:"user"`
  87. Password string `json:"password"`
  88. RealName string `json:"real_name"`
  89. UserType int32 `json:"user_type"`
  90. EffectiveStart int64 `json:"effective_start"`
  91. EffectiveEnd int64 `json:"effective_end"`
  92. SelfName string `json:"self_name"`
  93. }
  94. type UserUpdateReply struct {
  95. }