info_calculadora.dart 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. class InfoCalculadora {
  2. InfoCalculadora({
  3. this.result,
  4. this.response,
  5. this.message,
  6. });
  7. Result? result;
  8. bool? response;
  9. String? message;
  10. factory InfoCalculadora.fromJson(Map<String, dynamic> json) => InfoCalculadora(
  11. result: Result.fromJson(json["result"]),
  12. response: json["response"],
  13. message: json["message"],
  14. );
  15. Map<String, dynamic> toJson() => {
  16. "result": result!.toJson(),
  17. "response": response,
  18. "message": message,
  19. };
  20. }
  21. class Result {
  22. Result({
  23. this.ventiladores,
  24. this.ventiladoresTipos,
  25. this.ventiladoresModelos,
  26. this.atenuacion,
  27. this.potenciaSonora,
  28. });
  29. List<Ventilador>? ventiladores;
  30. List<String>? ventiladoresTipos;
  31. List<List<String>>? ventiladoresModelos;
  32. List<Atenuacion>? atenuacion;
  33. List<PotenciaSonora>? potenciaSonora;
  34. factory Result.fromJson(Map<String, dynamic> json) => Result(
  35. ventiladores: List<Ventilador>.from(json["ventiladores"].map((x) => Ventilador.fromJson(x))),
  36. ventiladoresTipos: List<String>.from(json["ventiladores_tipos"].map((x) => x)),
  37. ventiladoresModelos: List<List<String>>.from(json["ventiladores_modelos"].map((x) => List<String>.from(x.map((x) => x)))),
  38. atenuacion: List<Atenuacion>.from(json["atenuacion"].map((x) => Atenuacion.fromJson(x))),
  39. potenciaSonora: List<PotenciaSonora>.from(json["potencia_sonora"].map((x) => PotenciaSonora.fromJson(x))),
  40. );
  41. Map<String, dynamic> toJson() => {
  42. "ventiladores": List<dynamic>.from(ventiladores!.map((x) => x.toJson())),
  43. "ventiladores_tipos": List<dynamic>.from(ventiladoresTipos!.map((x) => x)),
  44. "ventiladores_modelos": List<dynamic>.from(ventiladoresModelos!.map((x) => List<dynamic>.from(x.map((x) => x)))),
  45. "atenuacion": List<dynamic>.from(atenuacion!.map((x) => x.toJson())),
  46. "potencia_sonora": List<dynamic>.from(potenciaSonora!.map((x) => x.toJson())),
  47. };
  48. }
  49. class Atenuacion {
  50. Atenuacion({
  51. this.idatenuacion,
  52. this.diametro,
  53. this.the63Hz,
  54. this.the125Hz,
  55. this.the250Hz,
  56. this.the500Hz,
  57. this.the1000Hz,
  58. this.the2000Hz,
  59. this.the4000Hz,
  60. this.the8000Hz,
  61. this.longitud,
  62. this.modelo,
  63. });
  64. String? idatenuacion;
  65. String? diametro;
  66. String? the63Hz;
  67. String? the125Hz;
  68. String? the250Hz;
  69. String? the500Hz;
  70. String? the1000Hz;
  71. String? the2000Hz;
  72. String? the4000Hz;
  73. String? the8000Hz;
  74. String? longitud;
  75. String? modelo;
  76. factory Atenuacion.fromJson(Map<String, dynamic> json) => Atenuacion(
  77. idatenuacion: json["IDATENUACION"],
  78. diametro: json["DIAMETRO"],
  79. the63Hz: json["63Hz"],
  80. the125Hz: json["125Hz"],
  81. the250Hz: json["250Hz"],
  82. the500Hz: json["500Hz"],
  83. the1000Hz: json["1000Hz"],
  84. the2000Hz: json["2000Hz"],
  85. the4000Hz: json["4000Hz"],
  86. the8000Hz: json["8000Hz"],
  87. longitud: json["LONGITUD"],
  88. modelo: json["MODELO"],
  89. );
  90. Map<String, dynamic> toJson() => {
  91. "IDATENUACION": idatenuacion,
  92. "DIAMETRO": diametro,
  93. "63Hz": the63Hz,
  94. "125Hz": the125Hz,
  95. "250Hz": the250Hz,
  96. "500Hz": the500Hz,
  97. "1000Hz": the1000Hz,
  98. "2000Hz": the2000Hz,
  99. "4000Hz": the4000Hz,
  100. "8000Hz": the8000Hz,
  101. "LONGITUD": longitud,
  102. "MODELO": modelo,
  103. };
  104. }
  105. class PotenciaSonora {
  106. PotenciaSonora({
  107. this.idpotson,
  108. this.msec,
  109. this.ftmin,
  110. this.the63Hz,
  111. this.the125Hz,
  112. this.the250Hz,
  113. this.the500Hz,
  114. this.the1000Hz,
  115. this.the2000Hz,
  116. this.the4000Hz,
  117. this.the8000Hz,
  118. });
  119. String? idpotson;
  120. String? msec;
  121. String? ftmin;
  122. String? the63Hz;
  123. String? the125Hz;
  124. String? the250Hz;
  125. String? the500Hz;
  126. String? the1000Hz;
  127. String? the2000Hz;
  128. String? the4000Hz;
  129. String? the8000Hz;
  130. factory PotenciaSonora.fromJson(Map<String, dynamic> json) => PotenciaSonora(
  131. idpotson: json["IDPOTSON"],
  132. msec: json["MSEC"],
  133. ftmin: json["FTMIN"],
  134. the63Hz: json["63Hz"],
  135. the125Hz: json["125Hz"],
  136. the250Hz: json["250Hz"],
  137. the500Hz: json["500Hz"],
  138. the1000Hz: json["1000Hz"],
  139. the2000Hz: json["2000Hz"],
  140. the4000Hz: json["4000Hz"],
  141. the8000Hz: json["8000Hz"],
  142. );
  143. Map<String, dynamic> toJson() => {
  144. "IDPOTSON": idpotson,
  145. "MSEC": msec,
  146. "FTMIN": ftmin,
  147. "63Hz": the63Hz,
  148. "125Hz": the125Hz,
  149. "250Hz": the250Hz,
  150. "500Hz": the500Hz,
  151. "1000Hz": the1000Hz,
  152. "2000Hz": the2000Hz,
  153. "4000Hz": the4000Hz,
  154. "8000Hz": the8000Hz,
  155. };
  156. }
  157. class Ventilador{
  158. Ventilador({
  159. this.idmodelo,
  160. this.tipo,
  161. this.modelo,
  162. this.the63Hz,
  163. this.the125Hz,
  164. this.the250Hz,
  165. this.the500Hz,
  166. this.the1000Hz,
  167. this.the2000Hz,
  168. this.the4000Hz,
  169. this.the8000Hz,
  170. this.pulgadas,
  171. this.presion,
  172. this.desc,
  173. });
  174. String? idmodelo;
  175. String? tipo;
  176. String? modelo;
  177. String? the63Hz;
  178. String? the125Hz;
  179. String? the250Hz;
  180. String? the500Hz;
  181. String? the1000Hz;
  182. String? the2000Hz;
  183. String? the4000Hz;
  184. String? the8000Hz;
  185. String? pulgadas;
  186. String? presion;
  187. String? desc;
  188. factory Ventilador.fromJson(Map<String, dynamic> json) => Ventilador(
  189. idmodelo: json["IDMODELO"],
  190. tipo: json["TIPO"],
  191. modelo: json["MODELO"],
  192. the63Hz: json["63Hz"],
  193. the125Hz: json["125Hz"],
  194. the250Hz: json["250Hz"],
  195. the500Hz: json["500Hz"],
  196. the1000Hz: json["1000Hz"],
  197. the2000Hz: json["2000Hz"],
  198. the4000Hz: json["4000Hz"],
  199. the8000Hz: json["8000Hz"],
  200. pulgadas: json["PULGADAS"],
  201. presion: json["PRESION"],
  202. desc: json["DESC"],
  203. );
  204. Map<String, dynamic> toJson() => {
  205. "IDMODELO": idmodelo,
  206. "TIPO": tipo,
  207. "MODELO": modelo,
  208. "63Hz": the63Hz,
  209. "125Hz": the125Hz,
  210. "250Hz": the250Hz,
  211. "500Hz": the500Hz,
  212. "1000Hz": the1000Hz,
  213. "2000Hz": the2000Hz,
  214. "4000Hz": the4000Hz,
  215. "8000Hz": the8000Hz,
  216. "PULGADAS": pulgadas,
  217. "PRESION": presion,
  218. "DESC": desc,
  219. };
  220. }