import 'package:json_annotation/json_annotation.dart'; import '../base_model.dart'; part 'promotion_list_model.g.dart'; @JsonSerializable() class PromotionListModel extends BaseModel { List data; PromotionListModel(code,this.data,msg,):super(code,msg); factory PromotionListModel.fromJson(Map srcJson) => _$PromotionListModelFromJson(srcJson); Map toJson() => _$PromotionListModelToJson(this); } @JsonSerializable() class Promotion extends Object { int id; String promotionName; String startTime; String endTime; String showName; int isProcessing; Promotion(this.id,this.promotionName,this.startTime, this.endTime, this.showName, this.isProcessing,); factory Promotion.fromJson(Map srcJson) => _$PromotionFromJson(srcJson); Map toJson() => _$PromotionToJson(this); }