bbs.dart 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. class Bbs {
  2. String rEQ;
  3. String rEQDT;
  4. String rESDT;
  5. int status;
  6. List<Result> result;
  7. Bbs({this.rEQ, this.rEQDT, this.rESDT, this.status, this.result});
  8. Bbs.fromJson(Map<String, dynamic> json) {
  9. rEQ = json['REQ'];
  10. rEQDT = json['REQ_DT'];
  11. rESDT = json['RES_DT'];
  12. status = json['status'];
  13. if (json['result'] != null) {
  14. result = new List<Result>();
  15. json['result'].forEach((v) {
  16. result.add(new Result.fromJson(v));
  17. });
  18. }
  19. }
  20. Map<String, dynamic> toJson() {
  21. final Map<String, dynamic> data = new Map<String, dynamic>();
  22. data['REQ'] = this.rEQ;
  23. data['REQ_DT'] = this.rEQDT;
  24. data['RES_DT'] = this.rESDT;
  25. data['status'] = this.status;
  26. if (this.result != null) {
  27. data['result'] = this.result.map((v) => v.toJson()).toList();
  28. }
  29. return data;
  30. }
  31. }
  32. class Result {
  33. String sId;
  34. String title;
  35. String type;
  36. String content;
  37. String notice;
  38. String createdAt;
  39. Result(
  40. {this.sId,
  41. this.title,
  42. this.type,
  43. this.content,
  44. this.notice,
  45. this.createdAt});
  46. Result.fromJson(Map<String, dynamic> json) {
  47. sId = json['_id'];
  48. title = json['title'];
  49. type = json['type'];
  50. content = json['content'];
  51. notice = json['notice'];
  52. createdAt = json['createdAt'];
  53. }
  54. Map<String, dynamic> toJson() {
  55. final Map<String, dynamic> data = new Map<String, dynamic>();
  56. data['_id'] = this.sId;
  57. data['title'] = this.title;
  58. data['type'] = this.type;
  59. data['content'] = this.content;
  60. data['notice'] = this.notice;
  61. data['createdAt'] = this.createdAt;
  62. return data;
  63. }
  64. }