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.
245 lines
7.2 KiB
245 lines
7.2 KiB
1 year ago
|
/// id : "1742842291845857280"
|
||
|
/// createTime : "2024-01-04 17:35:57"
|
||
|
/// createUser : "1"
|
||
|
/// updateTime : "2024-01-04 17:35:57"
|
||
|
/// updateUser : "1"
|
||
|
/// name : "测试啊"
|
||
|
/// status : 1
|
||
|
/// remark : ""
|
||
|
/// packagePrice : null
|
||
|
/// packageDiscount : null
|
||
|
/// duration : null
|
||
|
/// enableSale : true
|
||
|
/// sort : 1
|
||
|
/// isDefault : false
|
||
|
/// isDelete : 0
|
||
|
/// tenantPackageSale : [{"packagePrice":"100","originalPackagePrice":"200","duration":10,"packageDiscount":50,"isRecommend":false,"saleName":"销售套餐1","canDiscount":true},{"packagePrice":"300","originalPackagePrice":"600","duration":5,"packageDiscount":50,"isRecommend":true,"saleName":"销售套餐2","canDiscount":true}]
|
||
|
|
||
|
class TenantPackageList {
|
||
|
TenantPackageList({
|
||
|
String id,
|
||
|
String createTime,
|
||
|
String createUser,
|
||
|
String updateTime,
|
||
|
String updateUser,
|
||
|
String name,
|
||
|
num status,
|
||
|
String remark,
|
||
|
dynamic packagePrice,
|
||
|
dynamic packageDiscount,
|
||
|
dynamic duration,
|
||
|
bool enableSale,
|
||
|
num sort,
|
||
|
bool isDefault,
|
||
|
num isDelete,
|
||
|
List<TenantPackageSale> tenantPackageSale,}){
|
||
|
_id = id;
|
||
|
_createTime = createTime;
|
||
|
_createUser = createUser;
|
||
|
_updateTime = updateTime;
|
||
|
_updateUser = updateUser;
|
||
|
_name = name;
|
||
|
_status = status;
|
||
|
_remark = remark;
|
||
|
_packagePrice = packagePrice;
|
||
|
_packageDiscount = packageDiscount;
|
||
|
_duration = duration;
|
||
|
_enableSale = enableSale;
|
||
|
_sort = sort;
|
||
|
_isDefault = isDefault;
|
||
|
_isDelete = isDelete;
|
||
|
_tenantPackageSale = tenantPackageSale;
|
||
|
}
|
||
|
|
||
|
TenantPackageList.fromJson(dynamic json) {
|
||
|
_id = json['id'];
|
||
|
_createTime = json['createTime'];
|
||
|
_createUser = json['createUser'];
|
||
|
_updateTime = json['updateTime'];
|
||
|
_updateUser = json['updateUser'];
|
||
|
_name = json['name'];
|
||
|
_status = json['status'];
|
||
|
_remark = json['remark'];
|
||
|
_packagePrice = json['packagePrice'];
|
||
|
_packageDiscount = json['packageDiscount'];
|
||
|
_duration = json['duration'];
|
||
|
_enableSale = json['enableSale'];
|
||
|
_sort = json['sort'];
|
||
|
_isDefault = json['isDefault'];
|
||
|
_isDelete = json['isDelete'];
|
||
|
if (json['tenantPackageSale'] != null) {
|
||
|
_tenantPackageSale = [];
|
||
|
json['tenantPackageSale'].forEach((v) {
|
||
|
_tenantPackageSale.add(TenantPackageSale.fromJson(v));
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
String _id;
|
||
|
String _createTime;
|
||
|
String _createUser;
|
||
|
String _updateTime;
|
||
|
String _updateUser;
|
||
|
String _name;
|
||
|
num _status;
|
||
|
String _remark;
|
||
|
dynamic _packagePrice;
|
||
|
dynamic _packageDiscount;
|
||
|
dynamic _duration;
|
||
|
bool _enableSale;
|
||
|
num _sort;
|
||
|
bool _isDefault;
|
||
|
num _isDelete;
|
||
|
List<TenantPackageSale> _tenantPackageSale;
|
||
|
TenantPackageList copyWith({ String id,
|
||
|
String createTime,
|
||
|
String createUser,
|
||
|
String updateTime,
|
||
|
String updateUser,
|
||
|
String name,
|
||
|
num status,
|
||
|
String remark,
|
||
|
dynamic packagePrice,
|
||
|
dynamic packageDiscount,
|
||
|
dynamic duration,
|
||
|
bool enableSale,
|
||
|
num sort,
|
||
|
bool isDefault,
|
||
|
num isDelete,
|
||
|
List<TenantPackageSale> tenantPackageSale,
|
||
|
}) => TenantPackageList( id: id ?? _id,
|
||
|
createTime: createTime ?? _createTime,
|
||
|
createUser: createUser ?? _createUser,
|
||
|
updateTime: updateTime ?? _updateTime,
|
||
|
updateUser: updateUser ?? _updateUser,
|
||
|
name: name ?? _name,
|
||
|
status: status ?? _status,
|
||
|
remark: remark ?? _remark,
|
||
|
packagePrice: packagePrice ?? _packagePrice,
|
||
|
packageDiscount: packageDiscount ?? _packageDiscount,
|
||
|
duration: duration ?? _duration,
|
||
|
enableSale: enableSale ?? _enableSale,
|
||
|
sort: sort ?? _sort,
|
||
|
isDefault: isDefault ?? _isDefault,
|
||
|
isDelete: isDelete ?? _isDelete,
|
||
|
tenantPackageSale: tenantPackageSale ?? _tenantPackageSale,
|
||
|
);
|
||
|
String get id => _id;
|
||
|
String get createTime => _createTime;
|
||
|
String get createUser => _createUser;
|
||
|
String get updateTime => _updateTime;
|
||
|
String get updateUser => _updateUser;
|
||
|
String get name => _name;
|
||
|
num get status => _status;
|
||
|
String get remark => _remark;
|
||
|
dynamic get packagePrice => _packagePrice;
|
||
|
dynamic get packageDiscount => _packageDiscount;
|
||
|
dynamic get duration => _duration;
|
||
|
bool get enableSale => _enableSale;
|
||
|
num get sort => _sort;
|
||
|
bool get isDefault => _isDefault;
|
||
|
num get isDelete => _isDelete;
|
||
|
List<TenantPackageSale> get tenantPackageSale => _tenantPackageSale;
|
||
|
|
||
|
Map<String, dynamic> toJson() {
|
||
|
final map = <String, dynamic>{};
|
||
|
map['id'] = _id;
|
||
|
map['createTime'] = _createTime;
|
||
|
map['createUser'] = _createUser;
|
||
|
map['updateTime'] = _updateTime;
|
||
|
map['updateUser'] = _updateUser;
|
||
|
map['name'] = _name;
|
||
|
map['status'] = _status;
|
||
|
map['remark'] = _remark;
|
||
|
map['packagePrice'] = _packagePrice;
|
||
|
map['packageDiscount'] = _packageDiscount;
|
||
|
map['duration'] = _duration;
|
||
|
map['enableSale'] = _enableSale;
|
||
|
map['sort'] = _sort;
|
||
|
map['isDefault'] = _isDefault;
|
||
|
map['isDelete'] = _isDelete;
|
||
|
if (_tenantPackageSale != null) {
|
||
|
map['tenantPackageSale'] = _tenantPackageSale.map((v) => v.toJson()).toList();
|
||
|
}
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
/// packagePrice : "100"
|
||
|
/// originalPackagePrice : "200"
|
||
|
/// duration : 10
|
||
|
/// packageDiscount : 50
|
||
|
/// isRecommend : false
|
||
|
/// saleName : "销售套餐1"
|
||
|
/// canDiscount : true
|
||
|
|
||
|
class TenantPackageSale {
|
||
|
TenantPackageSale({
|
||
|
String packagePrice,
|
||
|
String originalPackagePrice,
|
||
|
num duration,
|
||
|
num packageDiscount,
|
||
|
bool isRecommend,
|
||
|
String saleName,
|
||
|
bool canDiscount,}){
|
||
|
_packagePrice = packagePrice;
|
||
|
_originalPackagePrice = originalPackagePrice;
|
||
|
_duration = duration;
|
||
|
_packageDiscount = packageDiscount;
|
||
|
_isRecommend = isRecommend;
|
||
|
_saleName = saleName;
|
||
|
_canDiscount = canDiscount;
|
||
|
}
|
||
|
|
||
|
TenantPackageSale.fromJson(dynamic json) {
|
||
|
_packagePrice = json['packagePrice'];
|
||
|
_originalPackagePrice = json['originalPackagePrice'];
|
||
|
_duration = json['duration'];
|
||
|
_packageDiscount = json['packageDiscount'];
|
||
|
_isRecommend = json['isRecommend'];
|
||
|
_saleName = json['saleName'];
|
||
|
_canDiscount = json['canDiscount'];
|
||
|
}
|
||
|
String _packagePrice;
|
||
|
String _originalPackagePrice;
|
||
|
num _duration;
|
||
|
num _packageDiscount;
|
||
|
bool _isRecommend;
|
||
|
String _saleName;
|
||
|
bool _canDiscount;
|
||
|
TenantPackageSale copyWith({ String packagePrice,
|
||
|
String originalPackagePrice,
|
||
|
num duration,
|
||
|
num packageDiscount,
|
||
|
bool isRecommend,
|
||
|
String saleName,
|
||
|
bool canDiscount,
|
||
|
}) => TenantPackageSale( packagePrice: packagePrice ?? _packagePrice,
|
||
|
originalPackagePrice: originalPackagePrice ?? _originalPackagePrice,
|
||
|
duration: duration ?? _duration,
|
||
|
packageDiscount: packageDiscount ?? _packageDiscount,
|
||
|
isRecommend: isRecommend ?? _isRecommend,
|
||
|
saleName: saleName ?? _saleName,
|
||
|
canDiscount: canDiscount ?? _canDiscount,
|
||
|
);
|
||
|
String get packagePrice => _packagePrice;
|
||
|
String get originalPackagePrice => _originalPackagePrice;
|
||
|
num get duration => _duration;
|
||
|
num get packageDiscount => _packageDiscount;
|
||
|
bool get isRecommend => _isRecommend;
|
||
|
String get saleName => _saleName;
|
||
|
bool get canDiscount => _canDiscount;
|
||
|
|
||
|
Map<String, dynamic> toJson() {
|
||
|
final map = <String, dynamic>{};
|
||
|
map['packagePrice'] = _packagePrice;
|
||
|
map['originalPackagePrice'] = _originalPackagePrice;
|
||
|
map['duration'] = _duration;
|
||
|
map['packageDiscount'] = _packageDiscount;
|
||
|
map['isRecommend'] = _isRecommend;
|
||
|
map['saleName'] = _saleName;
|
||
|
map['canDiscount'] = _canDiscount;
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
}
|