import 'package:json_annotation/json_annotation.dart'; part 'promotion.g.dart'; @JsonSerializable() class Promotion { String activityEndTime; String activityStartTime; String applyEndTime; String applyStartTime; String createTime; num createUser; String description; num id; String image; num isDelete; num isNeedSecurityDeposit; String name; List promotionDetail; num promotionPlan; num promotionType; num securityDeposit; num status; String tag; String updateTime; num updateUser; Promotion({this.activityEndTime, this.activityStartTime, this.applyEndTime, this.applyStartTime, this.createTime, this.createUser, this.description, this.id, this.image, this.isDelete, this.isNeedSecurityDeposit, this.name, this.promotionDetail, this.promotionPlan, this.promotionType, this.securityDeposit, this.status, this.tag, this.updateTime, this.updateUser}); factory Promotion.fromJson(Map json) => _$PromotionFromJson(json); Map toJson() => _$PromotionToJson(this); } @JsonSerializable() class PromotionDetailBean { PromotionDetailBean(); factory PromotionDetailBean.fromJson(Map json) => _$PromotionDetailBeanFromJson(json); Map toJson() => _$PromotionDetailBeanToJson(this); }