import 'package:json_annotation/json_annotation.dart'; import './ParticipatingInfo.dart'; part 'CompetitionInfo.g.dart'; @JsonSerializable() class CompetitionInfo { CompetitionInfo.empty(); CompetitionInfo( this.id, this.competitionName, this.startTime, this.endTime, this.type, this.bonus, this.intro, this.pic, this.participatingInfo, this.awardPic); factory CompetitionInfo.fromJson(Map json) => _$CompetitionInfoFromJson(json); int id; String competitionName; int startTime; int endTime; int type; String bonus; String intro; String pic; ParticipatingInfo participatingInfo; String awardPic; Map toJson() => _$CompetitionInfoToJson(this); @override String toString() { return _$CompetitionInfoToJson(this).toString(); } }