exer_record_sum.dart 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. import 'package:sport/services/Converter.dart';
  2. /// id : 322
  3. /// user_id : 141
  4. /// consume : 498121505
  5. /// consume_game : 12747
  6. /// consume_jog : 49
  7. /// consume_daily : 498108709
  8. /// duration : 100590
  9. /// duration_game : 100202
  10. /// duration_jog : 388
  11. /// step : 2147483647
  12. /// step_game : 198660
  13. /// step_jog : 679
  14. /// step_daily : 2147483647
  15. /// distance : 528
  16. /// distance_game : 0
  17. /// distance_jog : 528
  18. /// distance_daily : 0
  19. /// times : 707
  20. /// times_game : 706
  21. /// times_jog : 1
  22. /// crouch : 13006
  23. /// jump : 4533
  24. /// duration_game_step : 100202
  25. /// duration_jump : 89580
  26. /// duration_crouch : 89580
  27. /// duration_step : 100590
  28. /// jump_rate : 3
  29. /// crouch_rate : 8
  30. /// step_rate : 118.9
  31. /// step_rate_game : 119
  32. /// step_rate_jog : 105
  33. class ExerRecordSum {
  34. int id = 0;
  35. int userId = 0;
  36. int consume = 0;
  37. int consumeGame = 0;
  38. int consumeJog = 0;
  39. int consumeDaily = 0;
  40. int duration = 0;
  41. int durationGame = 0;
  42. int durationJog = 0;
  43. int step = 0;
  44. int stepGame = 0;
  45. int stepJog = 0;
  46. int stepDaily = 0;
  47. int distance = 0;
  48. int distanceGame = 0;
  49. int distanceJog = 0;
  50. int distanceDaily = 0;
  51. int times = 0;
  52. int timesGame = 0;
  53. int timesJog = 0;
  54. int crouch = 0;
  55. int jump = 0;
  56. int durationGameStep = 0;
  57. int durationJump = 0;
  58. int durationCrouch = 0;
  59. int durationStep = 0;
  60. double jumpRate = 0.0;
  61. double crouchRate = 0.0;
  62. double stepRate = 0.0;
  63. double stepRateGame = 0;
  64. double stepRateJog = 0;
  65. ExerRecordSum.fromMap(Map<String, dynamic> map) {
  66. this.id = map['id'];
  67. this.userId = map['user_id'];
  68. this.consume = map['consume'];
  69. this.consumeGame = map['consume_game'];
  70. this.consumeJog = map['consume_jog'];
  71. this.consumeDaily = map['consume_daily'];
  72. this.duration = map['duration'];
  73. this.durationGame = map['duration_game'];
  74. this.durationJog = map['duration_jog'];
  75. this.step = map['step'];
  76. this.stepGame = map['step_game'];
  77. this.stepJog = map['step_jog'];
  78. this.stepDaily = map['step_daily'];
  79. this.distance = map['distance'];
  80. this.distanceGame = map['distance_game'];
  81. this.distanceJog = map['distance_jog'];
  82. this.distanceDaily = map['distance_daily'];
  83. this.times = map['times'];
  84. this.timesGame = map['times_game'];
  85. this.timesJog = map['times_jog'];
  86. this.crouch = map['crouch'];
  87. this.jump = map['jump'];
  88. this.durationGameStep = map['duration_game_step'];
  89. this.durationJump = map['duration_jump'];
  90. this.durationCrouch = map['duration_crouch'];
  91. this.durationStep = map['duration_step'];
  92. this.jumpRate = Converter.toDouble(map['jump_rate']);
  93. this.crouchRate = Converter.toDouble(map['crouch_rate']);
  94. this.stepRate = Converter.toDouble(map['step_rate']);
  95. this.stepRateGame = Converter.toDouble(map['step_rate_game']);
  96. this.stepRateJog = Converter.toDouble(map['step_rate_jog']);
  97. }
  98. Map toJson() =>
  99. {
  100. "id": id,
  101. "user_id": userId,
  102. "consume": consume,
  103. "consume_game": consumeGame,
  104. "consume_jog": consumeJog,
  105. "consume_daily": consumeDaily,
  106. "duration": duration,
  107. "duration_game": durationGame,
  108. "duration_jog": durationJog,
  109. "step": step,
  110. "step_game": stepGame,
  111. "step_jog": stepJog,
  112. "step_daily": stepDaily,
  113. "distance": distance,
  114. "distance_game": distanceGame,
  115. "distance_jog": distanceJog,
  116. "distance_daily": distanceDaily,
  117. "times": times,
  118. "times_game": timesGame,
  119. "times_jog": timesJog,
  120. "crouch": crouch,
  121. "jump": jump,
  122. "duration_game_step": durationGameStep,
  123. "duration_jump": durationJump,
  124. "duration_crouch": durationCrouch,
  125. "duration_step": durationStep,
  126. "jump_rate": jumpRate,
  127. "crouch_rate": crouchRate,
  128. "step_rate": stepRate,
  129. "step_rate_game": stepRateGame,
  130. "step_rate_jog": stepRateJog,
  131. };
  132. }