ASUserModel.m 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. //
  2. // ASUserModel.m
  3. // Asteria
  4. //
  5. // Created by iOS on 2023/11/27.
  6. //
  7. #import "ASUserModel.h"
  8. @implementation ASUserModel
  9. + (NSDictionary *)mj_replacedKeyFromPropertyName {
  10. return @{
  11. @"Id": @"id",
  12. @"is_subscribed": @"extension_attributes.is_subscribed",
  13. };
  14. }
  15. + (NSDictionary *)mj_objectClassInArray{
  16. return @{
  17. @"addresses" : [ASAddressModel class]
  18. };
  19. }
  20. @end
  21. @implementation ASAddressModel
  22. + (NSDictionary *)mj_replacedKeyFromPropertyName {
  23. return @{
  24. @"Id": @"id",
  25. @"title": @"extension_attributes.title",
  26. @"country": @"extension_attributes.country",
  27. @"addressType": @"extension_attributes.address_type",
  28. };
  29. }
  30. + (ASAddressModel *)defualtData {
  31. ASAddressModel *m = [ASAddressModel new];
  32. m.title = @"";
  33. m.firstname = @"";
  34. m.lastname = @"";
  35. m.street = @[@""];
  36. m.postcode = @"";
  37. m.city = @"";
  38. // m.region = @"";
  39. ASAddressReginModel *re = [ASAddressReginModel new];
  40. re.region = @"";
  41. re.region_code = @"";
  42. re.region_id = @"";
  43. m.region = re;
  44. m.region_id = @"";
  45. m.telephone = @"";
  46. m.country = @"Unites States";
  47. m.country_id = @"US";
  48. return m;
  49. }
  50. @end
  51. @implementation ASAddressReginModel
  52. @end