CompetitionInfo.dart 810 B

12345678910111213141516171819202122232425262728293031
  1. import 'package:json_annotation/json_annotation.dart';
  2. import './ParticipatingInfo.dart';
  3. part 'CompetitionInfo.g.dart';
  4. @JsonSerializable()
  5. class CompetitionInfo {
  6. CompetitionInfo.empty();
  7. CompetitionInfo(
  8. this.id, this.competitionName, this.startTime, this.endTime, this.type, this.bonus, this.intro, this.pic, this.participatingInfo, this.awardPic);
  9. factory CompetitionInfo.fromJson(Map<String, dynamic> json) => _$CompetitionInfoFromJson(json);
  10. int id;
  11. String competitionName;
  12. int startTime;
  13. int endTime;
  14. int type;
  15. String bonus;
  16. String intro;
  17. String pic;
  18. ParticipatingInfo participatingInfo;
  19. String awardPic;
  20. Map<String, dynamic> toJson() => _$CompetitionInfoToJson(this);
  21. @override
  22. String toString() {
  23. return _$CompetitionInfoToJson(this).toString();
  24. }
  25. }