|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
import 'package:huixiang/retrofit/data/product.dart'; |
|
|
|
|
|
|
|
|
|
/// actTemplate : {"id":"1473198577613275136","createTime":"2021-12-21 15:48:06","createUser":"1333246101196636160","updateTime":"2021-12-21 15:48:06","updateUser":"1333246101196636160","storeId":"1333246101343436800","type":2,"limitTime":null,"limitNumber":0,"coverImg":"https://pos.upload.gznl.top/1175/2021/12/5bf7a846-768b-4a17-872f-e927988c24c9.jpg","shareImg":"https://pos.upload.gznl.top/1175/2021/12/65f6a0f7-14d1-4393-902e-42e5dc464800.jpg","bannerImg":"https://pos.upload.gznl.top/1175/2021/12/9ee395eb-718c-40c0-bfe0-673dbbade4cf.jpg","state":1,"allDay":false,"startTime":"2021-12-20 00:00:00","endTime":"2021-12-30 00:00:00","isDelete":0} |
|
|
|
|
/// timeProductList : [{"actTime":{"id":"1473198590141661184","createTime":"2021-12-21 15:48:09","createUser":"1333246101196636160","updateTime":"2021-12-21 15:48:09","updateUser":"1333246101196636160","storeId":"1333246101343436800","templateId":"1473198577613275136","allDay":false,"startHour":"09:00:00","endHour":"10:00:00","isDelete":0},"productList":[]},{"actTime":{"id":"1473570616966643712","createTime":"2021-12-22 16:26:27","createUser":"1333246101196636160","updateTime":"2021-12-22 16:26:27","updateUser":"1333246101196636160","storeId":"1333246101343436800","templateId":"1473198577613275136","allDay":false,"startHour":"11:00:00","endHour":"17:00:00","isDelete":0},"productList":[{"id":"1473570776908038144","createTime":"2021-12-22 16:27:05","createUser":"1333246101196636160","updateTime":"2021-12-22 16:27:05","updateUser":"1333246101196636160","storeId":"1333246101343436800","templateId":"1473198577613275136","timeId":"1473570616966643712","productId":"1456500820571848704","productName":"毛毛虫面包","productImg":"https://pos.upload.gznl.top/1175/2021/11/4a6ffabd-0e10-4720-ac93-57ec6855c5cf.jpg","productPrice":"8.00","promotionPrice":"8.00","productStock":-20,"sellCount":0,"skuJson":[{"skuId":"1456500821968551936","skuPrice":8,"skuStock":-20}],"isDelete":0}]}] |
|
|
|
|
/// timeProductList : [{"actTime":{"id":"1473198590141661184","createTime":"2021-12-21 15:48:09","createUser":"1333246101196636160","updateTime":"2021-12-21 15:48:09","updateUser":"1333246101196636160","storeId":"1333246101343436800","templateId":"1473198577613275136","allDay":false,"startHour":"09:00:00","endHour":"10:00:00","isDelete":0},"productList":[{"id":"1473543964270264320","createTime":"2021-12-22 14:40:33","createUser":"1333246101196636160","updateTime":"2021-12-22 14:40:33","updateUser":"1333246101196636160","storeId":"1333246101343436800","templateId":"1473198577613275136","timeId":"1473198590141661184","productId":"1425724410261667840","productName":"西瓜椰椰甘露","productImg":"https://pos.upload.gznl.top/1177/2021/08/3471058e-ac5e-47dd-8ed5-148e8cb28316.jpg","productPrice":"15.00","promotionPrice":"15.00","productStock":2847,"sellCount":0,"skuJson":[{"skuId":"1425724410358136832","skuPrice":15,"skuStock":996},{"skuId":"1425724410387496960","skuPrice":15,"skuStock":851},{"skuId":"1425724410454605824","skuPrice":15,"skuStock":1000}],"isDelete":0}]}] |
|
|
|
|
|
|
|
|
|
class ActivityAreaList { |
|
|
|
|
ActivityAreaList({ |
|
|
|
@ -40,12 +40,12 @@ class ActivityAreaList {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// actTime : {"id":"1473198590141661184","createTime":"2021-12-21 15:48:09","createUser":"1333246101196636160","updateTime":"2021-12-21 15:48:09","updateUser":"1333246101196636160","storeId":"1333246101343436800","templateId":"1473198577613275136","allDay":false,"startHour":"09:00:00","endHour":"10:00:00","isDelete":0} |
|
|
|
|
/// productList : [] |
|
|
|
|
/// productList : [{"id":"1473543964270264320","createTime":"2021-12-22 14:40:33","createUser":"1333246101196636160","updateTime":"2021-12-22 14:40:33","updateUser":"1333246101196636160","storeId":"1333246101343436800","templateId":"1473198577613275136","timeId":"1473198590141661184","productId":"1425724410261667840","productName":"西瓜椰椰甘露","productImg":"https://pos.upload.gznl.top/1177/2021/08/3471058e-ac5e-47dd-8ed5-148e8cb28316.jpg","productPrice":"15.00","promotionPrice":"15.00","productStock":2847,"sellCount":0,"skuJson":[{"skuId":"1425724410358136832","skuPrice":15,"skuStock":996},{"skuId":"1425724410387496960","skuPrice":15,"skuStock":851},{"skuId":"1425724410454605824","skuPrice":15,"skuStock":1000}],"isDelete":0}] |
|
|
|
|
|
|
|
|
|
class TimeProductList { |
|
|
|
|
TimeProductList({ |
|
|
|
|
ActTime actTime, |
|
|
|
|
List<dynamic> productList,}){ |
|
|
|
|
List<ProductList> productList,}){ |
|
|
|
|
_actTime = actTime; |
|
|
|
|
_productList = productList; |
|
|
|
|
} |
|
|
|
@ -60,10 +60,10 @@ class TimeProductList {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
ActTime _actTime; |
|
|
|
|
List<dynamic> _productList; |
|
|
|
|
List<ProductList> _productList; |
|
|
|
|
|
|
|
|
|
ActTime get actTime => _actTime; |
|
|
|
|
List<dynamic> get productList => _productList; |
|
|
|
|
List<ProductList> get productList => _productList; |
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() { |
|
|
|
|
final map = <String, dynamic>{}; |
|
|
|
@ -78,6 +78,185 @@ class TimeProductList {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// id : "1473543964270264320" |
|
|
|
|
/// createTime : "2021-12-22 14:40:33" |
|
|
|
|
/// createUser : "1333246101196636160" |
|
|
|
|
/// updateTime : "2021-12-22 14:40:33" |
|
|
|
|
/// updateUser : "1333246101196636160" |
|
|
|
|
/// storeId : "1333246101343436800" |
|
|
|
|
/// templateId : "1473198577613275136" |
|
|
|
|
/// timeId : "1473198590141661184" |
|
|
|
|
/// productId : "1425724410261667840" |
|
|
|
|
/// productName : "西瓜椰椰甘露" |
|
|
|
|
/// productImg : "https://pos.upload.gznl.top/1177/2021/08/3471058e-ac5e-47dd-8ed5-148e8cb28316.jpg" |
|
|
|
|
/// productPrice : "15.00" |
|
|
|
|
/// promotionPrice : "15.00" |
|
|
|
|
/// productStock : 2847 |
|
|
|
|
/// sellCount : 0 |
|
|
|
|
/// skuJson : [{"skuId":"1425724410358136832","skuPrice":15,"skuStock":996},{"skuId":"1425724410387496960","skuPrice":15,"skuStock":851},{"skuId":"1425724410454605824","skuPrice":15,"skuStock":1000}] |
|
|
|
|
/// isDelete : 0 |
|
|
|
|
|
|
|
|
|
class ProductList { |
|
|
|
|
ProductList({ |
|
|
|
|
String id, |
|
|
|
|
String createTime, |
|
|
|
|
String createUser, |
|
|
|
|
String updateTime, |
|
|
|
|
String updateUser, |
|
|
|
|
String storeId, |
|
|
|
|
String templateId, |
|
|
|
|
String timeId, |
|
|
|
|
String productId, |
|
|
|
|
String productName, |
|
|
|
|
String productImg, |
|
|
|
|
String productPrice, |
|
|
|
|
String promotionPrice, |
|
|
|
|
int productStock, |
|
|
|
|
int sellCount, |
|
|
|
|
List<SkuJson> skuJson, |
|
|
|
|
int isDelete,}){ |
|
|
|
|
_id = id; |
|
|
|
|
_createTime = createTime; |
|
|
|
|
_createUser = createUser; |
|
|
|
|
_updateTime = updateTime; |
|
|
|
|
_updateUser = updateUser; |
|
|
|
|
_storeId = storeId; |
|
|
|
|
_templateId = templateId; |
|
|
|
|
_timeId = timeId; |
|
|
|
|
_productId = productId; |
|
|
|
|
_productName = productName; |
|
|
|
|
_productImg = productImg; |
|
|
|
|
_productPrice = productPrice; |
|
|
|
|
_promotionPrice = promotionPrice; |
|
|
|
|
_productStock = productStock; |
|
|
|
|
_sellCount = sellCount; |
|
|
|
|
_skuJson = skuJson; |
|
|
|
|
_isDelete = isDelete; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ProductList.fromJson(dynamic json) { |
|
|
|
|
_id = json['id']; |
|
|
|
|
_createTime = json['createTime']; |
|
|
|
|
_createUser = json['createUser']; |
|
|
|
|
_updateTime = json['updateTime']; |
|
|
|
|
_updateUser = json['updateUser']; |
|
|
|
|
_storeId = json['storeId']; |
|
|
|
|
_templateId = json['templateId']; |
|
|
|
|
_timeId = json['timeId']; |
|
|
|
|
_productId = json['productId']; |
|
|
|
|
_productName = json['productName']; |
|
|
|
|
_productImg = json['productImg']; |
|
|
|
|
_productPrice = json['productPrice']; |
|
|
|
|
_promotionPrice = json['promotionPrice']; |
|
|
|
|
_productStock = json['productStock']; |
|
|
|
|
_sellCount = json['sellCount']; |
|
|
|
|
if (json['skuJson'] != null) { |
|
|
|
|
_skuJson = []; |
|
|
|
|
json['skuJson'].forEach((v) { |
|
|
|
|
_skuJson.add(SkuJson.fromJson(v)); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
_isDelete = json['isDelete']; |
|
|
|
|
} |
|
|
|
|
String _id; |
|
|
|
|
String _createTime; |
|
|
|
|
String _createUser; |
|
|
|
|
String _updateTime; |
|
|
|
|
String _updateUser; |
|
|
|
|
String _storeId; |
|
|
|
|
String _templateId; |
|
|
|
|
String _timeId; |
|
|
|
|
String _productId; |
|
|
|
|
String _productName; |
|
|
|
|
String _productImg; |
|
|
|
|
String _productPrice; |
|
|
|
|
String _promotionPrice; |
|
|
|
|
int _productStock; |
|
|
|
|
int _sellCount; |
|
|
|
|
List<SkuJson> _skuJson; |
|
|
|
|
int _isDelete; |
|
|
|
|
|
|
|
|
|
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 templateId => _templateId; |
|
|
|
|
String get timeId => _timeId; |
|
|
|
|
String get productId => _productId; |
|
|
|
|
String get productName => _productName; |
|
|
|
|
String get productImg => _productImg; |
|
|
|
|
String get productPrice => _productPrice; |
|
|
|
|
String get promotionPrice => _promotionPrice; |
|
|
|
|
int get productStock => _productStock; |
|
|
|
|
int get sellCount => _sellCount; |
|
|
|
|
List<SkuJson> get skuJson => _skuJson; |
|
|
|
|
int get isDelete => _isDelete; |
|
|
|
|
|
|
|
|
|
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['templateId'] = _templateId; |
|
|
|
|
map['timeId'] = _timeId; |
|
|
|
|
map['productId'] = _productId; |
|
|
|
|
map['productName'] = _productName; |
|
|
|
|
map['productImg'] = _productImg; |
|
|
|
|
map['productPrice'] = _productPrice; |
|
|
|
|
map['promotionPrice'] = _promotionPrice; |
|
|
|
|
map['productStock'] = _productStock; |
|
|
|
|
map['sellCount'] = _sellCount; |
|
|
|
|
if (_skuJson != null) { |
|
|
|
|
map['skuJson'] = _skuJson.map((v) => v.toJson()).toList(); |
|
|
|
|
} |
|
|
|
|
map['isDelete'] = _isDelete; |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// skuId : "1425724410358136832" |
|
|
|
|
/// skuPrice : 15 |
|
|
|
|
/// skuStock : 996 |
|
|
|
|
|
|
|
|
|
class SkuJson { |
|
|
|
|
SkuJson({ |
|
|
|
|
String skuId, |
|
|
|
|
int skuPrice, |
|
|
|
|
int skuStock,}){ |
|
|
|
|
_skuId = skuId; |
|
|
|
|
_skuPrice = skuPrice; |
|
|
|
|
_skuStock = skuStock; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SkuJson.fromJson(dynamic json) { |
|
|
|
|
_skuId = json['skuId']; |
|
|
|
|
_skuPrice = json['skuPrice']; |
|
|
|
|
_skuStock = json['skuStock']; |
|
|
|
|
} |
|
|
|
|
String _skuId; |
|
|
|
|
int _skuPrice; |
|
|
|
|
int _skuStock; |
|
|
|
|
|
|
|
|
|
String get skuId => _skuId; |
|
|
|
|
int get skuPrice => _skuPrice; |
|
|
|
|
int get skuStock => _skuStock; |
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() { |
|
|
|
|
final map = <String, dynamic>{}; |
|
|
|
|
map['skuId'] = _skuId; |
|
|
|
|
map['skuPrice'] = _skuPrice; |
|
|
|
|
map['skuStock'] = _skuStock; |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// id : "1473198590141661184" |
|
|
|
|
/// createTime : "2021-12-21 15:48:09" |
|
|
|
|
/// createUser : "1333246101196636160" |
|
|
|
|