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;
  }
}