w-R
3 years ago
8 changed files with 440 additions and 35 deletions
@ -0,0 +1,371 @@
|
||||
/// authInfo : {"token":"eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3R5cGUiOiJQTEFURk9STV9BUFAiLCJuYW1lIjoi5pav5Z-65LuUIiwidG9rZW5fdHlwZSI6InRva2VuIiwidXNlcmlkIjoiMTQ2Mzc1MTMwMjYzNzk0NDgzMiIsImFjY291bnQiOiIxNTM5Mjk0OTA5NyIsImV4cCI6MTY0MTAwMzg4NSwibmJmIjoxNjM4NDExODg1fQ.3ioTF8ofxKeoIlT_KriPHjjpJVzB3orh6rNCYrN5auA","tokenType":"token","refreshToken":"eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaF90b2tlbiIsInVzZXJpZCI6IjE0NjM3NTEzMDI2Mzc5NDQ4MzIiLCJleHAiOjE2NDEwMDM4ODUsIm5iZiI6MTYzODQxMTg4NX0.kePPEJDAKhgGyJRzlo4OvZ_OWPYi4O6RFWsSc7cdmhU","name":"斯基仔","account":"15392949097","avatar":null,"workDescribe":null,"userId":"1463751302637944832","userType":"PLATFORM_APP","expire":"2592000","expiration":"2022-01-01 10:24:45","mobile":"15392949097"} |
||||
/// couponList : [{"id":"1463398002331746304","createTime":"2021-11-24 14:44:07","createUser":"1333246101196636160","updateTime":"2021-11-24 14:44:07","updateUser":"1333246101196636160","storeId":"0","couponName":"满10-2","bizType":1,"allProduct":true,"productSkuId":[],"fullAmount":"10.00","discountAmount":"2.00","fullNumber":1,"discountPercent":100,"sellPrice":"0.00","sellCount":0,"bizId":"","publishStartTime":"2021-11-24 12:00:00","publishEndTime":"2021-11-30 12:00:00","useStartTime":"2021-11-24 12:00:00","useEndTime":"2021-11-30 12:00:00","promotionId":"0","dateOrDay":false,"startAfterDays":0,"daysValidate":0,"centreDisplay":true,"tenantCode":"1175","isDelete":0,"storeName":"海峡姐妹奶茶店","number":1}] |
||||
|
||||
class LoginInfo { |
||||
LoginInfo({ |
||||
AuthInfo authInfo, |
||||
List<CouponList> couponList,}){ |
||||
_authInfo = authInfo; |
||||
_couponList = couponList; |
||||
} |
||||
|
||||
LoginInfo.fromJson(dynamic json) { |
||||
_authInfo = json['authInfo'] != null ? AuthInfo.fromJson(json['authInfo']) : null; |
||||
if (json['couponList'] != null) { |
||||
_couponList = []; |
||||
json['couponList'].forEach((v) { |
||||
_couponList.add(CouponList.fromJson(v)); |
||||
}); |
||||
} |
||||
} |
||||
AuthInfo _authInfo; |
||||
List<CouponList> _couponList; |
||||
|
||||
AuthInfo get authInfo => _authInfo; |
||||
List<CouponList> get couponList => _couponList; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
if (_authInfo != null) { |
||||
map['authInfo'] = _authInfo.toJson(); |
||||
} |
||||
if (_couponList != null) { |
||||
map['couponList'] = _couponList.map((v) => v.toJson()).toList(); |
||||
} |
||||
return map; |
||||
} |
||||
|
||||
} |
||||
|
||||
/// id : "1463398002331746304" |
||||
/// createTime : "2021-11-24 14:44:07" |
||||
/// createUser : "1333246101196636160" |
||||
/// updateTime : "2021-11-24 14:44:07" |
||||
/// updateUser : "1333246101196636160" |
||||
/// storeId : "0" |
||||
/// couponName : "满10-2" |
||||
/// bizType : 1 |
||||
/// allProduct : true |
||||
/// productSkuId : [] |
||||
/// fullAmount : "10.00" |
||||
/// discountAmount : "2.00" |
||||
/// fullNumber : 1 |
||||
/// discountPercent : 100 |
||||
/// sellPrice : "0.00" |
||||
/// sellCount : 0 |
||||
/// bizId : "" |
||||
/// publishStartTime : "2021-11-24 12:00:00" |
||||
/// publishEndTime : "2021-11-30 12:00:00" |
||||
/// useStartTime : "2021-11-24 12:00:00" |
||||
/// useEndTime : "2021-11-30 12:00:00" |
||||
/// promotionId : "0" |
||||
/// dateOrDay : false |
||||
/// startAfterDays : 0 |
||||
/// daysValidate : 0 |
||||
/// centreDisplay : true |
||||
/// tenantCode : "1175" |
||||
/// isDelete : 0 |
||||
/// storeName : "海峡姐妹奶茶店" |
||||
/// number : 1 |
||||
|
||||
class CouponList { |
||||
CouponList({ |
||||
String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String storeId, |
||||
String couponName, |
||||
int bizType, |
||||
bool allProduct, |
||||
// List<dynamic> productSkuId, |
||||
String fullAmount, |
||||
String discountAmount, |
||||
int fullNumber, |
||||
int discountPercent, |
||||
String sellPrice, |
||||
int sellCount, |
||||
String bizId, |
||||
String publishStartTime, |
||||
String publishEndTime, |
||||
String useStartTime, |
||||
String useEndTime, |
||||
String promotionId, |
||||
bool dateOrDay, |
||||
int startAfterDays, |
||||
int daysValidate, |
||||
bool centreDisplay, |
||||
String tenantCode, |
||||
int isDelete, |
||||
String storeName, |
||||
int number,}){ |
||||
_id = id; |
||||
_createTime = createTime; |
||||
_createUser = createUser; |
||||
_updateTime = updateTime; |
||||
_updateUser = updateUser; |
||||
_storeId = storeId; |
||||
_couponName = couponName; |
||||
_bizType = bizType; |
||||
_allProduct = allProduct; |
||||
// _productSkuId = productSkuId; |
||||
_fullAmount = fullAmount; |
||||
_discountAmount = discountAmount; |
||||
_fullNumber = fullNumber; |
||||
_discountPercent = discountPercent; |
||||
_sellPrice = sellPrice; |
||||
_sellCount = sellCount; |
||||
_bizId = bizId; |
||||
_publishStartTime = publishStartTime; |
||||
_publishEndTime = publishEndTime; |
||||
_useStartTime = useStartTime; |
||||
_useEndTime = useEndTime; |
||||
_promotionId = promotionId; |
||||
_dateOrDay = dateOrDay; |
||||
_startAfterDays = startAfterDays; |
||||
_daysValidate = daysValidate; |
||||
_centreDisplay = centreDisplay; |
||||
_tenantCode = tenantCode; |
||||
_isDelete = isDelete; |
||||
_storeName = storeName; |
||||
_number = number; |
||||
} |
||||
|
||||
CouponList.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_createTime = json['createTime']; |
||||
_createUser = json['createUser']; |
||||
_updateTime = json['updateTime']; |
||||
_updateUser = json['updateUser']; |
||||
_storeId = json['storeId']; |
||||
_couponName = json['couponName']; |
||||
_bizType = json['bizType']; |
||||
_allProduct = json['allProduct']; |
||||
// if (json['productSkuId'] != null) { |
||||
// _productSkuId = []; |
||||
// json['productSkuId'].forEach((v) { |
||||
// _productSkuId.add(dynamic.fromJson(v)); |
||||
// }); |
||||
// } |
||||
_fullAmount = json['fullAmount']; |
||||
_discountAmount = json['discountAmount']; |
||||
_fullNumber = json['fullNumber']; |
||||
_discountPercent = json['discountPercent']; |
||||
_sellPrice = json['sellPrice']; |
||||
_sellCount = json['sellCount']; |
||||
_bizId = json['bizId']; |
||||
_publishStartTime = json['publishStartTime']; |
||||
_publishEndTime = json['publishEndTime']; |
||||
_useStartTime = json['useStartTime']; |
||||
_useEndTime = json['useEndTime']; |
||||
_promotionId = json['promotionId']; |
||||
_dateOrDay = json['dateOrDay']; |
||||
_startAfterDays = json['startAfterDays']; |
||||
_daysValidate = json['daysValidate']; |
||||
_centreDisplay = json['centreDisplay']; |
||||
_tenantCode = json['tenantCode']; |
||||
_isDelete = json['isDelete']; |
||||
_storeName = json['storeName']; |
||||
_number = json['number']; |
||||
} |
||||
String _id; |
||||
String _createTime; |
||||
String _createUser; |
||||
String _updateTime; |
||||
String _updateUser; |
||||
String _storeId; |
||||
String _couponName; |
||||
int _bizType; |
||||
bool _allProduct; |
||||
// List<dynamic> _productSkuId; |
||||
String _fullAmount; |
||||
String _discountAmount; |
||||
int _fullNumber; |
||||
int _discountPercent; |
||||
String _sellPrice; |
||||
int _sellCount; |
||||
String _bizId; |
||||
String _publishStartTime; |
||||
String _publishEndTime; |
||||
String _useStartTime; |
||||
String _useEndTime; |
||||
String _promotionId; |
||||
bool _dateOrDay; |
||||
int _startAfterDays; |
||||
int _daysValidate; |
||||
bool _centreDisplay; |
||||
String _tenantCode; |
||||
int _isDelete; |
||||
String _storeName; |
||||
int _number; |
||||
|
||||
String get id => _id; |
||||
String get createTime => _createTime; |
||||
String get createUser => _createUser; |
||||
String get updateTime => _updateTime; |
||||
String get updateUser => _updateUser; |
||||
String get storeId => _storeId; |
||||
String get couponName => _couponName; |
||||
int get bizType => _bizType; |
||||
bool get allProduct => _allProduct; |
||||
// List<dynamic> get productSkuId => _productSkuId; |
||||
String get fullAmount => _fullAmount; |
||||
String get discountAmount => _discountAmount; |
||||
int get fullNumber => _fullNumber; |
||||
int get discountPercent => _discountPercent; |
||||
String get sellPrice => _sellPrice; |
||||
int get sellCount => _sellCount; |
||||
String get bizId => _bizId; |
||||
String get publishStartTime => _publishStartTime; |
||||
String get publishEndTime => _publishEndTime; |
||||
String get useStartTime => _useStartTime; |
||||
String get useEndTime => _useEndTime; |
||||
String get promotionId => _promotionId; |
||||
bool get dateOrDay => _dateOrDay; |
||||
int get startAfterDays => _startAfterDays; |
||||
int get daysValidate => _daysValidate; |
||||
bool get centreDisplay => _centreDisplay; |
||||
String get tenantCode => _tenantCode; |
||||
int get isDelete => _isDelete; |
||||
String get storeName => _storeName; |
||||
int get number => _number; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['createTime'] = _createTime; |
||||
map['createUser'] = _createUser; |
||||
map['updateTime'] = _updateTime; |
||||
map['updateUser'] = _updateUser; |
||||
map['storeId'] = _storeId; |
||||
map['couponName'] = _couponName; |
||||
map['bizType'] = _bizType; |
||||
map['allProduct'] = _allProduct; |
||||
// if (_productSkuId != null) { |
||||
// map['productSkuId'] = _productSkuId.map((v) => v.toJson()).toList(); |
||||
// } |
||||
map['fullAmount'] = _fullAmount; |
||||
map['discountAmount'] = _discountAmount; |
||||
map['fullNumber'] = _fullNumber; |
||||
map['discountPercent'] = _discountPercent; |
||||
map['sellPrice'] = _sellPrice; |
||||
map['sellCount'] = _sellCount; |
||||
map['bizId'] = _bizId; |
||||
map['publishStartTime'] = _publishStartTime; |
||||
map['publishEndTime'] = _publishEndTime; |
||||
map['useStartTime'] = _useStartTime; |
||||
map['useEndTime'] = _useEndTime; |
||||
map['promotionId'] = _promotionId; |
||||
map['dateOrDay'] = _dateOrDay; |
||||
map['startAfterDays'] = _startAfterDays; |
||||
map['daysValidate'] = _daysValidate; |
||||
map['centreDisplay'] = _centreDisplay; |
||||
map['tenantCode'] = _tenantCode; |
||||
map['isDelete'] = _isDelete; |
||||
map['storeName'] = _storeName; |
||||
map['number'] = _number; |
||||
return map; |
||||
} |
||||
|
||||
} |
||||
|
||||
/// token : "eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX3R5cGUiOiJQTEFURk9STV9BUFAiLCJuYW1lIjoi5pav5Z-65LuUIiwidG9rZW5fdHlwZSI6InRva2VuIiwidXNlcmlkIjoiMTQ2Mzc1MTMwMjYzNzk0NDgzMiIsImFjY291bnQiOiIxNTM5Mjk0OTA5NyIsImV4cCI6MTY0MTAwMzg4NSwibmJmIjoxNjM4NDExODg1fQ.3ioTF8ofxKeoIlT_KriPHjjpJVzB3orh6rNCYrN5auA" |
||||
/// tokenType : "token" |
||||
/// refreshToken : "eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaF90b2tlbiIsInVzZXJpZCI6IjE0NjM3NTEzMDI2Mzc5NDQ4MzIiLCJleHAiOjE2NDEwMDM4ODUsIm5iZiI6MTYzODQxMTg4NX0.kePPEJDAKhgGyJRzlo4OvZ_OWPYi4O6RFWsSc7cdmhU" |
||||
/// name : "斯基仔" |
||||
/// account : "15392949097" |
||||
/// avatar : null |
||||
/// workDescribe : null |
||||
/// userId : "1463751302637944832" |
||||
/// userType : "PLATFORM_APP" |
||||
/// expire : "2592000" |
||||
/// expiration : "2022-01-01 10:24:45" |
||||
/// mobile : "15392949097" |
||||
|
||||
class AuthInfo { |
||||
AuthInfo({ |
||||
String token, |
||||
String tokenType, |
||||
String refreshToken, |
||||
String name, |
||||
String account, |
||||
dynamic avatar, |
||||
dynamic workDescribe, |
||||
String userId, |
||||
String userType, |
||||
String expire, |
||||
String expiration, |
||||
String mobile,}){ |
||||
_token = token; |
||||
_tokenType = tokenType; |
||||
_refreshToken = refreshToken; |
||||
_name = name; |
||||
_account = account; |
||||
_avatar = avatar; |
||||
_workDescribe = workDescribe; |
||||
_userId = userId; |
||||
_userType = userType; |
||||
_expire = expire; |
||||
_expiration = expiration; |
||||
_mobile = mobile; |
||||
} |
||||
|
||||
AuthInfo.fromJson(dynamic json) { |
||||
_token = json['token']; |
||||
_tokenType = json['tokenType']; |
||||
_refreshToken = json['refreshToken']; |
||||
_name = json['name']; |
||||
_account = json['account']; |
||||
_avatar = json['avatar']; |
||||
_workDescribe = json['workDescribe']; |
||||
_userId = json['userId']; |
||||
_userType = json['userType']; |
||||
_expire = json['expire']; |
||||
_expiration = json['expiration']; |
||||
_mobile = json['mobile']; |
||||
} |
||||
String _token; |
||||
String _tokenType; |
||||
String _refreshToken; |
||||
String _name; |
||||
String _account; |
||||
dynamic _avatar; |
||||
dynamic _workDescribe; |
||||
String _userId; |
||||
String _userType; |
||||
String _expire; |
||||
String _expiration; |
||||
String _mobile; |
||||
|
||||
String get token => _token; |
||||
String get tokenType => _tokenType; |
||||
String get refreshToken => _refreshToken; |
||||
String get name => _name; |
||||
String get account => _account; |
||||
dynamic get avatar => _avatar; |
||||
dynamic get workDescribe => _workDescribe; |
||||
String get userId => _userId; |
||||
String get userType => _userType; |
||||
String get expire => _expire; |
||||
String get expiration => _expiration; |
||||
String get mobile => _mobile; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['token'] = _token; |
||||
map['tokenType'] = _tokenType; |
||||
map['refreshToken'] = _refreshToken; |
||||
map['name'] = _name; |
||||
map['account'] = _account; |
||||
map['avatar'] = _avatar; |
||||
map['workDescribe'] = _workDescribe; |
||||
map['userId'] = _userId; |
||||
map['userType'] = _userType; |
||||
map['expire'] = _expire; |
||||
map['expiration'] = _expiration; |
||||
map['mobile'] = _mobile; |
||||
return map; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue