login.m.dart 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. class UserTokenDTO {
  2. String? userCode;
  3. String? deviceId;
  4. String? token;
  5. UserTokenDTO({
  6. this.userCode,
  7. this.deviceId,
  8. this.token,
  9. });
  10. factory UserTokenDTO.fromJson(Map<String, dynamic> map) {
  11. return UserTokenDTO(
  12. userCode: map['UserCode'],
  13. deviceId: map['DeviceId'],
  14. token: map['Token'],
  15. );
  16. }
  17. Map<String, dynamic> toJson() {
  18. final map = Map<String, dynamic>();
  19. if(userCode != null)
  20. map['UserCode'] = userCode;
  21. if(deviceId != null)
  22. map['DeviceId'] = deviceId;
  23. if(token != null)
  24. map['Token'] = token;
  25. return map;
  26. }
  27. }
  28. class CommonLoginRequest {
  29. String? anyAccount;
  30. String? anyCode;
  31. String? password;
  32. Map<String,String>? headerMap;
  33. CommonLoginRequest({
  34. this.anyAccount,
  35. this.anyCode,
  36. this.password,
  37. this.headerMap,
  38. });
  39. factory CommonLoginRequest.fromJson(Map<String, dynamic> map) {
  40. return CommonLoginRequest(
  41. anyAccount: map['AnyAccount'],
  42. anyCode: map['AnyCode'],
  43. password: map['Password'],
  44. headerMap: map['HeaderMap'].cast<String,String>(),
  45. );
  46. }
  47. Map<String, dynamic> toJson() {
  48. final map = Map<String, dynamic>();
  49. if(anyAccount != null)
  50. map['AnyAccount'] = anyAccount;
  51. if(anyCode != null)
  52. map['AnyCode'] = anyCode;
  53. if(password != null)
  54. map['Password'] = password;
  55. if(headerMap != null)
  56. map['HeaderMap'] = headerMap;
  57. return map;
  58. }
  59. }
  60. class CheckLoginTypeRequest {
  61. String? anyAccount;
  62. CheckLoginTypeRequest({
  63. this.anyAccount,
  64. });
  65. factory CheckLoginTypeRequest.fromJson(Map<String, dynamic> map) {
  66. return CheckLoginTypeRequest(
  67. anyAccount: map['AnyAccount'],
  68. );
  69. }
  70. Map<String, dynamic> toJson() {
  71. final map = Map<String, dynamic>();
  72. if(anyAccount != null)
  73. map['AnyAccount'] = anyAccount;
  74. return map;
  75. }
  76. }
  77. class CommonSignUpRequest {
  78. String? anyAccount;
  79. String? anyCode;
  80. String? password;
  81. Map<String,String>? headerMap;
  82. CommonSignUpRequest({
  83. this.anyAccount,
  84. this.anyCode,
  85. this.password,
  86. this.headerMap,
  87. });
  88. factory CommonSignUpRequest.fromJson(Map<String, dynamic> map) {
  89. return CommonSignUpRequest(
  90. anyAccount: map['AnyAccount'],
  91. anyCode: map['AnyCode'],
  92. password: map['Password'],
  93. headerMap: map['HeaderMap'].cast<String,String>(),
  94. );
  95. }
  96. Map<String, dynamic> toJson() {
  97. final map = Map<String, dynamic>();
  98. if(anyAccount != null)
  99. map['AnyAccount'] = anyAccount;
  100. if(anyCode != null)
  101. map['AnyCode'] = anyCode;
  102. if(password != null)
  103. map['Password'] = password;
  104. if(headerMap != null)
  105. map['HeaderMap'] = headerMap;
  106. return map;
  107. }
  108. }
  109. class CheckSMSVerificationCodeRequest {
  110. String? userPhone;
  111. String? verifyCode;
  112. CheckSMSVerificationCodeRequest({
  113. this.userPhone,
  114. this.verifyCode,
  115. });
  116. factory CheckSMSVerificationCodeRequest.fromJson(Map<String, dynamic> map) {
  117. return CheckSMSVerificationCodeRequest(
  118. userPhone: map['UserPhone'],
  119. verifyCode: map['VerifyCode'],
  120. );
  121. }
  122. Map<String, dynamic> toJson() {
  123. final map = Map<String, dynamic>();
  124. if(userPhone != null)
  125. map['UserPhone'] = userPhone;
  126. if(verifyCode != null)
  127. map['VerifyCode'] = verifyCode;
  128. return map;
  129. }
  130. }
  131. class SendSMSVerificationCodeRequest {
  132. String? userPhone;
  133. SendSMSVerificationCodeRequest({
  134. this.userPhone,
  135. });
  136. factory SendSMSVerificationCodeRequest.fromJson(Map<String, dynamic> map) {
  137. return SendSMSVerificationCodeRequest(
  138. userPhone: map['UserPhone'],
  139. );
  140. }
  141. Map<String, dynamic> toJson() {
  142. final map = Map<String, dynamic>();
  143. if(userPhone != null)
  144. map['UserPhone'] = userPhone;
  145. return map;
  146. }
  147. }
  148. class SendEmailVerificationCodeRequest {
  149. String? emailAddress;
  150. SendEmailVerificationCodeRequest({
  151. this.emailAddress,
  152. });
  153. factory SendEmailVerificationCodeRequest.fromJson(Map<String, dynamic> map) {
  154. return SendEmailVerificationCodeRequest(
  155. emailAddress: map['EmailAddress'],
  156. );
  157. }
  158. Map<String, dynamic> toJson() {
  159. final map = Map<String, dynamic>();
  160. if(emailAddress != null)
  161. map['EmailAddress'] = emailAddress;
  162. return map;
  163. }
  164. }
  165. class CheckEmailVerificationCodeRequest {
  166. String? emailAddress;
  167. String? verifyCode;
  168. CheckEmailVerificationCodeRequest({
  169. this.emailAddress,
  170. this.verifyCode,
  171. });
  172. factory CheckEmailVerificationCodeRequest.fromJson(Map<String, dynamic> map) {
  173. return CheckEmailVerificationCodeRequest(
  174. emailAddress: map['EmailAddress'],
  175. verifyCode: map['VerifyCode'],
  176. );
  177. }
  178. Map<String, dynamic> toJson() {
  179. final map = Map<String, dynamic>();
  180. if(emailAddress != null)
  181. map['EmailAddress'] = emailAddress;
  182. if(verifyCode != null)
  183. map['VerifyCode'] = verifyCode;
  184. return map;
  185. }
  186. }
  187. class RetrievePasswordByPhoneRequest {
  188. String? phone;
  189. String? verifyCode;
  190. String? newPassword;
  191. RetrievePasswordByPhoneRequest({
  192. this.phone,
  193. this.verifyCode,
  194. this.newPassword,
  195. });
  196. factory RetrievePasswordByPhoneRequest.fromJson(Map<String, dynamic> map) {
  197. return RetrievePasswordByPhoneRequest(
  198. phone: map['Phone'],
  199. verifyCode: map['VerifyCode'],
  200. newPassword: map['NewPassword'],
  201. );
  202. }
  203. Map<String, dynamic> toJson() {
  204. final map = Map<String, dynamic>();
  205. if(phone != null)
  206. map['Phone'] = phone;
  207. if(verifyCode != null)
  208. map['VerifyCode'] = verifyCode;
  209. if(newPassword != null)
  210. map['NewPassword'] = newPassword;
  211. return map;
  212. }
  213. }
  214. class RetrievePasswordByEmailRequest {
  215. String? mail;
  216. String? verifyCode;
  217. String? newPassword;
  218. RetrievePasswordByEmailRequest({
  219. this.mail,
  220. this.verifyCode,
  221. this.newPassword,
  222. });
  223. factory RetrievePasswordByEmailRequest.fromJson(Map<String, dynamic> map) {
  224. return RetrievePasswordByEmailRequest(
  225. mail: map['Mail'],
  226. verifyCode: map['VerifyCode'],
  227. newPassword: map['NewPassword'],
  228. );
  229. }
  230. Map<String, dynamic> toJson() {
  231. final map = Map<String, dynamic>();
  232. if(mail != null)
  233. map['Mail'] = mail;
  234. if(verifyCode != null)
  235. map['VerifyCode'] = verifyCode;
  236. if(newPassword != null)
  237. map['NewPassword'] = newPassword;
  238. return map;
  239. }
  240. }
  241. class VerifyAccountRequest {
  242. String? userName;
  243. VerifyAccountRequest({
  244. this.userName,
  245. });
  246. factory VerifyAccountRequest.fromJson(Map<String, dynamic> map) {
  247. return VerifyAccountRequest(
  248. userName: map['UserName'],
  249. );
  250. }
  251. Map<String, dynamic> toJson() {
  252. final map = Map<String, dynamic>();
  253. if(userName != null)
  254. map['UserName'] = userName;
  255. return map;
  256. }
  257. }