ASProductBaseModel.m 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // ASProductBaseModel.m
  3. // Asteria
  4. //
  5. // Created by iOS on 2023/6/1.
  6. //
  7. #import "ASProductBaseModel.h"
  8. @implementation ASProductBaseModel
  9. + (ASProductBaseModel*)demoModel {
  10. ASProductBaseModel *m = [[ASProductBaseModel alloc] init];
  11. m.img = @"https://media.glamour.com/photos/5f3e9ad26ed7249924aba0c7/1:1/w_1234,h_1234,c_limit/IMG_2772.jpg";
  12. m.title = @"HD Lace";
  13. m.sketchy_app = @"Transparent Wigs Brazilian Front Wigs Straight Hair Body Wave…";
  14. m.discount_app = @"10%";
  15. if (arc4random()%2 == 1) {
  16. m.oldPrice = @"";
  17. } else {
  18. m.oldPrice = @"234.43";
  19. }
  20. if (arc4random()%2 == 1) {
  21. m.sketchy_app = @"";
  22. }
  23. m.Id = @(arc4random()%12130).stringValue;
  24. m.nowPrice = @"223.45";
  25. m.rate_star = [NSString stringWithFormat:@"%u",arc4random()%90 + 2];
  26. m.sale_num = @"324123";
  27. return m;
  28. }
  29. + (NSDictionary *)mj_replacedKeyFromPropertyName {
  30. return @{
  31. @"Id": @"id",
  32. @"oldPrice": @"price.price",
  33. @"nowPrice":@"price.final_price",
  34. };
  35. }
  36. @end