Browse Source
首页ui新增服务套餐试用期,并数据对接调试; 实列新增:服务套餐时间,服务状态; 登录接口实体类新增部分字段; 商家端登录接口更改; 我的页面新增服务套餐购买入口;(数据流程已对接) 我的页面数据接口优化; 新增:服务套餐购买页面,新增商品页面,设置商品规格页面,编辑规格详情页面,设置套餐页面; 门店信息页面数据优化; 选择门店页数据优化; 新增分类查询接口实体类; 新增服务信息接口实体类; 新增服务套餐详情接口实体类; 新增服务套餐列表接口实体类;wr_2023_new_business
wurong
1 year ago
18 changed files with 2450 additions and 212 deletions
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,123 @@
|
||||
/// id : "1300687829071822848" |
||||
/// categoryName : "火锅餐饮" |
||||
/// categoryPath : "" |
||||
/// categoryImg : null |
||||
/// depth : 1 |
||||
/// parentName : null |
||||
/// parentId : null |
||||
/// sortOrder : 1 |
||||
/// status : 1 |
||||
/// isDelete : 0 |
||||
/// childs : null |
||||
/// posType : null |
||||
|
||||
class GoodsCategoryList { |
||||
GoodsCategoryList({ |
||||
String id, |
||||
String categoryName, |
||||
String categoryPath, |
||||
dynamic categoryImg, |
||||
num depth, |
||||
dynamic parentName, |
||||
dynamic parentId, |
||||
num sortOrder, |
||||
num status, |
||||
num isDelete, |
||||
dynamic childs, |
||||
dynamic posType,}){ |
||||
_id = id; |
||||
_categoryName = categoryName; |
||||
_categoryPath = categoryPath; |
||||
_categoryImg = categoryImg; |
||||
_depth = depth; |
||||
_parentName = parentName; |
||||
_parentId = parentId; |
||||
_sortOrder = sortOrder; |
||||
_status = status; |
||||
_isDelete = isDelete; |
||||
_childs = childs; |
||||
_posType = posType; |
||||
} |
||||
|
||||
GoodsCategoryList.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_categoryName = json['categoryName']; |
||||
_categoryPath = json['categoryPath']; |
||||
_categoryImg = json['categoryImg']; |
||||
_depth = json['depth']; |
||||
_parentName = json['parentName']; |
||||
_parentId = json['parentId']; |
||||
_sortOrder = json['sortOrder']; |
||||
_status = json['status']; |
||||
_isDelete = json['isDelete']; |
||||
_childs = json['childs']; |
||||
_posType = json['posType']; |
||||
} |
||||
String _id; |
||||
String _categoryName; |
||||
String _categoryPath; |
||||
dynamic _categoryImg; |
||||
num _depth; |
||||
dynamic _parentName; |
||||
dynamic _parentId; |
||||
num _sortOrder; |
||||
num _status; |
||||
num _isDelete; |
||||
dynamic _childs; |
||||
dynamic _posType; |
||||
GoodsCategoryList copyWith({ String id, |
||||
String categoryName, |
||||
String categoryPath, |
||||
dynamic categoryImg, |
||||
num depth, |
||||
dynamic parentName, |
||||
dynamic parentId, |
||||
num sortOrder, |
||||
num status, |
||||
num isDelete, |
||||
dynamic childs, |
||||
dynamic posType, |
||||
}) => GoodsCategoryList( id: id ?? _id, |
||||
categoryName: categoryName ?? _categoryName, |
||||
categoryPath: categoryPath ?? _categoryPath, |
||||
categoryImg: categoryImg ?? _categoryImg, |
||||
depth: depth ?? _depth, |
||||
parentName: parentName ?? _parentName, |
||||
parentId: parentId ?? _parentId, |
||||
sortOrder: sortOrder ?? _sortOrder, |
||||
status: status ?? _status, |
||||
isDelete: isDelete ?? _isDelete, |
||||
childs: childs ?? _childs, |
||||
posType: posType ?? _posType, |
||||
); |
||||
String get id => _id; |
||||
String get categoryName => _categoryName; |
||||
String get categoryPath => _categoryPath; |
||||
dynamic get categoryImg => _categoryImg; |
||||
num get depth => _depth; |
||||
dynamic get parentName => _parentName; |
||||
dynamic get parentId => _parentId; |
||||
num get sortOrder => _sortOrder; |
||||
num get status => _status; |
||||
num get isDelete => _isDelete; |
||||
dynamic get childs => _childs; |
||||
dynamic get posType => _posType; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['categoryName'] = _categoryName; |
||||
map['categoryPath'] = _categoryPath; |
||||
map['categoryImg'] = _categoryImg; |
||||
map['depth'] = _depth; |
||||
map['parentName'] = _parentName; |
||||
map['parentId'] = _parentId; |
||||
map['sortOrder'] = _sortOrder; |
||||
map['status'] = _status; |
||||
map['isDelete'] = _isDelete; |
||||
map['childs'] = _childs; |
||||
map['posType'] = _posType; |
||||
return map; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,366 @@
|
||||
/// id : "1739884282001752064" |
||||
/// createTime : "2023-12-27 13:41:53" |
||||
/// createUser : "1" |
||||
/// updateTime : "2023-12-27 13:41:53" |
||||
/// updateUser : "1" |
||||
/// code : "1197" |
||||
/// name : "fff" |
||||
/// type : {"desc":"创建","code":"CREATE"} |
||||
/// status : {"desc":"正常","code":"NORMAL"} |
||||
/// readonly : false |
||||
/// usePlatformPay : false |
||||
/// usePlatformVip : false |
||||
/// money : "0" |
||||
/// duty : "fxz" |
||||
/// address : "洪山区光谷一路天成美景" |
||||
/// expireLimitYear : 3 |
||||
/// startTime : "2023-12-27 13:41:53" |
||||
/// expirationTime : null |
||||
/// contactTel : "15827991715" |
||||
/// logo : "" |
||||
/// describe : "" |
||||
/// account : null |
||||
/// dianwodaId : "" |
||||
/// dadaId : "" |
||||
/// showVipCard : true |
||||
/// packageId : "1552543966157602816" |
||||
/// posType : {"desc":"普通餐饮","code":"NORMALSTORE"} |
||||
|
||||
class TenantInfo { |
||||
TenantInfo({ |
||||
String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String code, |
||||
String name, |
||||
Type type, |
||||
Status status, |
||||
bool readonly, |
||||
bool usePlatformPay, |
||||
bool usePlatformVip, |
||||
String money, |
||||
String duty, |
||||
String address, |
||||
num expireLimitYear, |
||||
String startTime, |
||||
dynamic expirationTime, |
||||
String contactTel, |
||||
String logo, |
||||
String describe, |
||||
dynamic account, |
||||
String dianwodaId, |
||||
String dadaId, |
||||
bool showVipCard, |
||||
String packageId, |
||||
PosType posType,}){ |
||||
_id = id; |
||||
_createTime = createTime; |
||||
_createUser = createUser; |
||||
_updateTime = updateTime; |
||||
_updateUser = updateUser; |
||||
_code = code; |
||||
_name = name; |
||||
_type = type; |
||||
_status = status; |
||||
_readonly = readonly; |
||||
_usePlatformPay = usePlatformPay; |
||||
_usePlatformVip = usePlatformVip; |
||||
_money = money; |
||||
_duty = duty; |
||||
_address = address; |
||||
_expireLimitYear = expireLimitYear; |
||||
_startTime = startTime; |
||||
_expirationTime = expirationTime; |
||||
_contactTel = contactTel; |
||||
_logo = logo; |
||||
_describe = describe; |
||||
_account = account; |
||||
_dianwodaId = dianwodaId; |
||||
_dadaId = dadaId; |
||||
_showVipCard = showVipCard; |
||||
_packageId = packageId; |
||||
_posType = posType; |
||||
} |
||||
|
||||
TenantInfo.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_createTime = json['createTime']; |
||||
_createUser = json['createUser']; |
||||
_updateTime = json['updateTime']; |
||||
_updateUser = json['updateUser']; |
||||
_code = json['code']; |
||||
_name = json['name']; |
||||
_type = json['type'] != null ? Type.fromJson(json['type']) : null; |
||||
_status = json['status'] != null ? Status.fromJson(json['status']) : null; |
||||
_readonly = json['readonly']; |
||||
_usePlatformPay = json['usePlatformPay']; |
||||
_usePlatformVip = json['usePlatformVip']; |
||||
_money = json['money']; |
||||
_duty = json['duty']; |
||||
_address = json['address']; |
||||
_expireLimitYear = json['expireLimitYear']; |
||||
_startTime = json['startTime']; |
||||
_expirationTime = json['expirationTime']; |
||||
_contactTel = json['contactTel']; |
||||
_logo = json['logo']; |
||||
_describe = json['describe']; |
||||
_account = json['account']; |
||||
_dianwodaId = json['dianwodaId']; |
||||
_dadaId = json['dadaId']; |
||||
_showVipCard = json['showVipCard']; |
||||
_packageId = json['packageId']; |
||||
_posType = json['posType'] != null ? PosType.fromJson(json['posType']) : null; |
||||
} |
||||
String _id; |
||||
String _createTime; |
||||
String _createUser; |
||||
String _updateTime; |
||||
String _updateUser; |
||||
String _code; |
||||
String _name; |
||||
Type _type; |
||||
Status _status; |
||||
bool _readonly; |
||||
bool _usePlatformPay; |
||||
bool _usePlatformVip; |
||||
String _money; |
||||
String _duty; |
||||
String _address; |
||||
num _expireLimitYear; |
||||
String _startTime; |
||||
dynamic _expirationTime; |
||||
String _contactTel; |
||||
String _logo; |
||||
String _describe; |
||||
dynamic _account; |
||||
String _dianwodaId; |
||||
String _dadaId; |
||||
bool _showVipCard; |
||||
String _packageId; |
||||
PosType _posType; |
||||
TenantInfo copyWith({ String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String code, |
||||
String name, |
||||
Type type, |
||||
Status status, |
||||
bool readonly, |
||||
bool usePlatformPay, |
||||
bool usePlatformVip, |
||||
String money, |
||||
String duty, |
||||
String address, |
||||
num expireLimitYear, |
||||
String startTime, |
||||
dynamic expirationTime, |
||||
String contactTel, |
||||
String logo, |
||||
String describe, |
||||
dynamic account, |
||||
String dianwodaId, |
||||
String dadaId, |
||||
bool showVipCard, |
||||
String packageId, |
||||
PosType posType, |
||||
}) => TenantInfo( id: id ?? _id, |
||||
createTime: createTime ?? _createTime, |
||||
createUser: createUser ?? _createUser, |
||||
updateTime: updateTime ?? _updateTime, |
||||
updateUser: updateUser ?? _updateUser, |
||||
code: code ?? _code, |
||||
name: name ?? _name, |
||||
type: type ?? _type, |
||||
status: status ?? _status, |
||||
readonly: readonly ?? _readonly, |
||||
usePlatformPay: usePlatformPay ?? _usePlatformPay, |
||||
usePlatformVip: usePlatformVip ?? _usePlatformVip, |
||||
money: money ?? _money, |
||||
duty: duty ?? _duty, |
||||
address: address ?? _address, |
||||
expireLimitYear: expireLimitYear ?? _expireLimitYear, |
||||
startTime: startTime ?? _startTime, |
||||
expirationTime: expirationTime ?? _expirationTime, |
||||
contactTel: contactTel ?? _contactTel, |
||||
logo: logo ?? _logo, |
||||
describe: describe ?? _describe, |
||||
account: account ?? _account, |
||||
dianwodaId: dianwodaId ?? _dianwodaId, |
||||
dadaId: dadaId ?? _dadaId, |
||||
showVipCard: showVipCard ?? _showVipCard, |
||||
packageId: packageId ?? _packageId, |
||||
posType: posType ?? _posType, |
||||
); |
||||
String get id => _id; |
||||
String get createTime => _createTime; |
||||
String get createUser => _createUser; |
||||
String get updateTime => _updateTime; |
||||
String get updateUser => _updateUser; |
||||
String get code => _code; |
||||
String get name => _name; |
||||
Type get type => _type; |
||||
Status get status => _status; |
||||
bool get readonly => _readonly; |
||||
bool get usePlatformPay => _usePlatformPay; |
||||
bool get usePlatformVip => _usePlatformVip; |
||||
String get money => _money; |
||||
String get duty => _duty; |
||||
String get address => _address; |
||||
num get expireLimitYear => _expireLimitYear; |
||||
String get startTime => _startTime; |
||||
dynamic get expirationTime => _expirationTime; |
||||
String get contactTel => _contactTel; |
||||
String get logo => _logo; |
||||
String get describe => _describe; |
||||
dynamic get account => _account; |
||||
String get dianwodaId => _dianwodaId; |
||||
String get dadaId => _dadaId; |
||||
bool get showVipCard => _showVipCard; |
||||
String get packageId => _packageId; |
||||
PosType get posType => _posType; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['createTime'] = _createTime; |
||||
map['createUser'] = _createUser; |
||||
map['updateTime'] = _updateTime; |
||||
map['updateUser'] = _updateUser; |
||||
map['code'] = _code; |
||||
map['name'] = _name; |
||||
if (_type != null) { |
||||
map['type'] = _type.toJson(); |
||||
} |
||||
if (_status != null) { |
||||
map['status'] = _status.toJson(); |
||||
} |
||||
map['readonly'] = _readonly; |
||||
map['usePlatformPay'] = _usePlatformPay; |
||||
map['usePlatformVip'] = _usePlatformVip; |
||||
map['money'] = _money; |
||||
map['duty'] = _duty; |
||||
map['address'] = _address; |
||||
map['expireLimitYear'] = _expireLimitYear; |
||||
map['startTime'] = _startTime; |
||||
map['expirationTime'] = _expirationTime; |
||||
map['contactTel'] = _contactTel; |
||||
map['logo'] = _logo; |
||||
map['describe'] = _describe; |
||||
map['account'] = _account; |
||||
map['dianwodaId'] = _dianwodaId; |
||||
map['dadaId'] = _dadaId; |
||||
map['showVipCard'] = _showVipCard; |
||||
map['packageId'] = _packageId; |
||||
if (_posType != null) { |
||||
map['posType'] = _posType.toJson(); |
||||
} |
||||
return map; |
||||
} |
||||
|
||||
} |
||||
|
||||
/// desc : "普通餐饮" |
||||
/// code : "NORMALSTORE" |
||||
|
||||
class PosType { |
||||
PosType({ |
||||
String desc, |
||||
String code,}){ |
||||
_desc = desc; |
||||
_code = code; |
||||
} |
||||
|
||||
PosType.fromJson(dynamic json) { |
||||
_desc = json['desc']; |
||||
_code = json['code']; |
||||
} |
||||
String _desc; |
||||
String _code; |
||||
PosType copyWith({ String desc, |
||||
String code, |
||||
}) => PosType( desc: desc ?? _desc, |
||||
code: code ?? _code, |
||||
); |
||||
String get desc => _desc; |
||||
String get code => _code; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['desc'] = _desc; |
||||
map['code'] = _code; |
||||
return map; |
||||
} |
||||
|
||||
} |
||||
|
||||
/// desc : "正常" |
||||
/// code : "NORMAL" |
||||
|
||||
class Status { |
||||
Status({ |
||||
String desc, |
||||
String code,}){ |
||||
_desc = desc; |
||||
_code = code; |
||||
} |
||||
|
||||
Status.fromJson(dynamic json) { |
||||
_desc = json['desc']; |
||||
_code = json['code']; |
||||
} |
||||
String _desc; |
||||
String _code; |
||||
Status copyWith({ String desc, |
||||
String code, |
||||
}) => Status( desc: desc ?? _desc, |
||||
code: code ?? _code, |
||||
); |
||||
String get desc => _desc; |
||||
String get code => _code; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['desc'] = _desc; |
||||
map['code'] = _code; |
||||
return map; |
||||
} |
||||
|
||||
} |
||||
|
||||
/// desc : "创建" |
||||
/// code : "CREATE" |
||||
|
||||
class Type { |
||||
Type({ |
||||
String desc, |
||||
String code,}){ |
||||
_desc = desc; |
||||
_code = code; |
||||
} |
||||
|
||||
Type.fromJson(dynamic json) { |
||||
_desc = json['desc']; |
||||
_code = json['code']; |
||||
} |
||||
String _desc; |
||||
String _code; |
||||
Type copyWith({ String desc, |
||||
String code, |
||||
}) => Type( desc: desc ?? _desc, |
||||
code: code ?? _code, |
||||
); |
||||
String get desc => _desc; |
||||
String get code => _code; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['desc'] = _desc; |
||||
map['code'] = _code; |
||||
return map; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,51 @@
|
||||
/// totalFee : "100" |
||||
/// expirationTime : "2034-01-05 11:16:07" |
||||
/// duration : 10 |
||||
/// packageId : "1742842291845857280" |
||||
|
||||
class TenantPackageCalculateDetails { |
||||
TenantPackageCalculateDetails({ |
||||
String totalFee, |
||||
String expirationTime, |
||||
num duration, |
||||
String packageId,}){ |
||||
_totalFee = totalFee; |
||||
_expirationTime = expirationTime; |
||||
_duration = duration; |
||||
_packageId = packageId; |
||||
} |
||||
|
||||
TenantPackageCalculateDetails.fromJson(dynamic json) { |
||||
_totalFee = json['totalFee']; |
||||
_expirationTime = json['expirationTime']; |
||||
_duration = json['duration']; |
||||
_packageId = json['packageId']; |
||||
} |
||||
String _totalFee; |
||||
String _expirationTime; |
||||
num _duration; |
||||
String _packageId; |
||||
TenantPackageCalculateDetails copyWith({ String totalFee, |
||||
String expirationTime, |
||||
num duration, |
||||
String packageId, |
||||
}) => TenantPackageCalculateDetails( totalFee: totalFee ?? _totalFee, |
||||
expirationTime: expirationTime ?? _expirationTime, |
||||
duration: duration ?? _duration, |
||||
packageId: packageId ?? _packageId, |
||||
); |
||||
String get totalFee => _totalFee; |
||||
String get expirationTime => _expirationTime; |
||||
num get duration => _duration; |
||||
String get packageId => _packageId; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['totalFee'] = _totalFee; |
||||
map['expirationTime'] = _expirationTime; |
||||
map['duration'] = _duration; |
||||
map['packageId'] = _packageId; |
||||
return map; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,245 @@
|
||||
/// 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; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue