123456789101112131415161718192021222324252627282930 |
- import 'package:sport/bean/feedback_type.dart';
- class FeedbackCategory {
- String groupId;
- String groupName;
- List<FeedbackType> types;
- FeedbackCategory({this.groupId, this.groupName, this.types});
- FeedbackCategory.fromJson(Map<String, dynamic> json) {
- groupId = json['groupId'];
- groupName = json['groupName'];
- if (json['types'] != null) {
- types = new List<FeedbackType>();
- json['types'].forEach((v) {
- types.add(new FeedbackType.fromJson(v));
- });
- }
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['groupId'] = this.groupId;
- data['groupName'] = this.groupName;
- if (this.types != null) {
- data['types'] = this.types.map((v) => v.toJson()).toList();
- }
- return data;
- }
- }
|