123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- class CouponModel {
- int id;
- int createTime;
- String createBy;
- int updateTime;
- String updateBy;
- String userId;
- int orderId;
- int couponId;
- int usedFlag;
- String orderNo;
- Coupon coupon;
- CouponModel(
- {this.id,
- this.createTime,
- this.createBy,
- this.updateTime,
- this.updateBy,
- this.userId,
- this.orderId,
- this.couponId,
- this.usedFlag,
- this.orderNo,
- this.coupon});
- CouponModel.fromJson(Map<String, dynamic> json) {
- id = json['id'];
- createTime = json['createTime'];
- createBy = json['createBy'];
- updateTime = json['updateTime'];
- updateBy = json['updateBy'];
- userId = json['userId'];
- orderId = json['orderId'];
- couponId = json['couponId'];
- usedFlag = json['usedFlag'];
- orderNo = json['orderNo'];
- coupon =
- json['coupon'] != null ? new Coupon.fromJson(json['coupon']) : null;
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['id'] = this.id;
- data['createTime'] = this.createTime;
- data['createBy'] = this.createBy;
- data['updateTime'] = this.updateTime;
- data['updateBy'] = this.updateBy;
- data['userId'] = this.userId;
- data['orderId'] = this.orderId;
- data['couponId'] = this.couponId;
- data['usedFlag'] = this.usedFlag;
- data['orderNo'] = this.orderNo;
- if (this.coupon != null) {
- data['coupon'] = this.coupon.toJson();
- }
- return data;
- }
- }
- class Coupon {
- int id;
- int createTime;
- String createBy;
- int updateTime;
- String updateBy;
- String name;
- int type;
- double discount;
- double price;
- double fullReduction;
- int scenario;
- int validity;
- int statuz;
- int checkFalg;
- String reason;
- String remark;
- Coupon(
- {this.id,
- this.createTime,
- this.createBy,
- this.updateTime,
- this.updateBy,
- this.name,
- this.type,
- this.discount,
- this.price,
- this.fullReduction,
- this.scenario,
- this.validity,
- this.statuz,
- this.checkFalg,
- this.reason,
- this.remark});
- Coupon.fromJson(Map<String, dynamic> json) {
- id = json['id'];
- createTime = json['createTime'];
- createBy = json['createBy'];
- updateTime = json['updateTime'];
- updateBy = json['updateBy'];
- name = json['name'];
- type = json['type'];
- discount = json['discount'];
- price = json['price'];
- fullReduction = json['fullReduction'];
- scenario = json['scenario'];
- validity = json['validity'];
- statuz = json['statuz'];
- checkFalg = json['checkFalg'];
- reason = json['reason'];
- remark = json['remark'];
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['id'] = this.id;
- data['createTime'] = this.createTime;
- data['createBy'] = this.createBy;
- data['updateTime'] = this.updateTime;
- data['updateBy'] = this.updateBy;
- data['name'] = this.name;
- data['type'] = this.type;
- data['discount'] = this.discount;
- data['price'] = this.price;
- data['fullReduction'] = this.fullReduction;
- data['scenario'] = this.scenario;
- data['validity'] = this.validity;
- data['statuz'] = this.statuz;
- data['checkFalg'] = this.checkFalg;
- data['reason'] = this.reason;
- data['remark'] = this.remark;
- return data;
- }
- }
|