user_model.dart 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import 'package:chicken_farm/modes/user/org_model.dart';
  2. import 'package:chicken_farm/modes/user/role_model.dart';
  3. import 'package:json_annotation/json_annotation.dart';
  4. part 'user_model.g.dart';
  5. @JsonSerializable()
  6. class UserModel {
  7. int? userId;
  8. String? tenantId;
  9. int? orgId;
  10. String? userName;
  11. String? nickName;
  12. String? userType;
  13. String? email;
  14. String? phonenumber;
  15. String? sex;
  16. String? avatar;
  17. String? status;
  18. String? leaderName;
  19. String? loginIp;
  20. String? loginDate;
  21. String? remark;
  22. String? createTime;
  23. OrgModel? org;
  24. String? orgName;
  25. List<RoleModel>? roles;
  26. List<int>? roleIds;
  27. List<int>? postIds;
  28. UserModel({
  29. this.userId,
  30. this.tenantId,
  31. this.orgId,
  32. this.userName,
  33. this.nickName,
  34. this.userType,
  35. this.email,
  36. this.phonenumber,
  37. this.sex,
  38. this.avatar,
  39. this.status,
  40. this.leaderName,
  41. this.loginIp,
  42. this.loginDate,
  43. this.remark,
  44. this.createTime,
  45. this.org,
  46. this.orgName,
  47. this.roles,
  48. this.roleIds,
  49. this.postIds,
  50. });
  51. factory UserModel.fromJson(Map<String, dynamic> json) =>
  52. _$UserModelFromJson(json);
  53. Map<String, dynamic> toJson() => _$UserModelToJson(this);
  54. }