You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

92 lines
3.1 KiB

import 'package:huixiang/retrofit/data/store.dart';
class Coupon {
Coupon();
String? id;
String? createTime;
String? createUser;
String? updateTime;
String? updateUser;
int? bizType;
String? fullAmount;
String? discountAmount;
int? discountPercent;
String? bizId;
String? publishStartTime;
String? publishEndTime;
String? useStartTime;
String? useEndTime;
String? promotionId;
bool? centreDisplay;
String? tenantCode;
int? isDelete;
String? couponName;
String? couponImg;
String? couponDescription;
String? memberCouponId;
String? receiveTime;
dynamic? useTime;
int? status;
List<Store?>? storeList;
bool? isEx = false;
factory Coupon.fromJson(Map<String, dynamic> json) => Coupon()
..id = json['id'] as String
..createTime = json['createTime'] as String
..createUser = json['createUser'] as String
..updateTime = json['updateTime'] as String
..updateUser = json['updateUser'] as String
..bizType = json['bizType'] as int
..fullAmount = json['fullAmount'] as String
..discountAmount = json['discountAmount'] as String
..discountPercent = json['discountPercent'] as int
..bizId = json['bizId'] as String
..publishStartTime = json['publishStartTime'] as String
..publishEndTime = json['publishEndTime'] as String
..useStartTime = json['useStartTime'] as String
..useEndTime = json['useEndTime'] as String
..promotionId = json['promotionId'] as String
..centreDisplay = json['centreDisplay'] as bool
..tenantCode = json['tenantCode'] as String
..isDelete = json['isDelete'] as int
..couponName = json['couponName'] as String
..couponImg = json['couponImg'] as String
..couponDescription = json['couponDescription'] as String
..memberCouponId = json['memberCouponId'] as String
..receiveTime = json['receiveTime'] as String
..useTime = json['useTime']
..status = json['status']
..storeList = (json['storeList'] as List<dynamic>)
.map((e) => Store.fromJson(e))
.toList();
Map<String, dynamic> toJson() => <String, dynamic>{
'id': this.id,
'createTime': this.createTime,
'createUser': this.createUser,
'updateTime': this.updateTime,
'updateUser': this.updateUser,
'bizType': this.bizType,
'fullAmount': this.fullAmount,
'discountAmount': this.discountAmount,
'discountPercent': this.discountPercent,
'bizId': this.bizId,
'publishStartTime': this.publishStartTime,
'publishEndTime': this.publishEndTime,
'useStartTime': this.useStartTime,
'useEndTime': this.useEndTime,
'promotionId': this.promotionId,
'centreDisplay': this.centreDisplay,
'tenantCode': this.tenantCode,
'isDelete': this.isDelete,
'couponName': this.couponName,
'couponImg': this.couponImg,
'couponDescription': this.couponDescription,
'memberCouponId': this.memberCouponId,
'receiveTime': this.receiveTime,
'useTime': this.useTime,
'status': this.status,
'storeList': this.storeList?.map((e) => e?.toJson()).toList()
};
}