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.

307 lines
10 KiB

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}]}]
class ActivityAreaList {
ActivityAreaList({
ActTemplate actTemplate,
List<TimeProductList> timeProductList,}){
_actTemplate = actTemplate;
_timeProductList = timeProductList;
}
ActivityAreaList.fromJson(dynamic json) {
_actTemplate = json['actTemplate'] != null ? ActTemplate.fromJson(json['actTemplate']) : null;
if (json['timeProductList'] != null) {
_timeProductList = [];
json['timeProductList'].forEach((v) {
_timeProductList.add(TimeProductList.fromJson(v));
});
}
}
ActTemplate _actTemplate;
List<TimeProductList> _timeProductList;
ActTemplate get actTemplate => _actTemplate;
List<TimeProductList> get timeProductList => _timeProductList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_actTemplate != null) {
map['actTemplate'] = _actTemplate.toJson();
}
if (_timeProductList != null) {
map['timeProductList'] = _timeProductList.map((v) => v.toJson()).toList();
}
return map;
}
}
/// 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 : []
class TimeProductList {
TimeProductList({
ActTime actTime,
List<dynamic> productList,}){
_actTime = actTime;
_productList = productList;
}
TimeProductList.fromJson(dynamic json) {
_actTime = json['actTime'] != null ? ActTime.fromJson(json['actTime']) : null;
if (json['productList'] != null) {
_productList = [];
json['productList'].forEach((v) {
_productList.add(ProductList.fromJson(v));
});
}
}
ActTime _actTime;
List<dynamic> _productList;
ActTime get actTime => _actTime;
List<dynamic> get productList => _productList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_actTime != null) {
map['actTime'] = _actTime.toJson();
}
if (_productList != null) {
map['productList'] = _productList.map((v) => v.toJson()).toList();
}
return map;
}
}
/// 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
class ActTime {
ActTime({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
String templateId,
bool allDay,
String startHour,
String endHour,
int isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_templateId = templateId;
_allDay = allDay;
_startHour = startHour;
_endHour = endHour;
_isDelete = isDelete;
}
ActTime.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_templateId = json['templateId'];
_allDay = json['allDay'];
_startHour = json['startHour'];
_endHour = json['endHour'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
String _templateId;
bool _allDay;
String _startHour;
String _endHour;
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;
bool get allDay => _allDay;
String get startHour => _startHour;
String get endHour => _endHour;
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['allDay'] = _allDay;
map['startHour'] = _startHour;
map['endHour'] = _endHour;
map['isDelete'] = _isDelete;
return map;
}
}
/// 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
class ActTemplate {
ActTemplate({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
int type,
dynamic limitTime,
int limitNumber,
String coverImg,
String shareImg,
String bannerImg,
int state,
bool allDay,
String startTime,
String endTime,
int isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_type = type;
_limitTime = limitTime;
_limitNumber = limitNumber;
_coverImg = coverImg;
_shareImg = shareImg;
_bannerImg = bannerImg;
_state = state;
_allDay = allDay;
_startTime = startTime;
_endTime = endTime;
_isDelete = isDelete;
}
ActTemplate.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_type = json['type'];
_limitTime = json['limitTime'];
_limitNumber = json['limitNumber'];
_coverImg = json['coverImg'];
_shareImg = json['shareImg'];
_bannerImg = json['bannerImg'];
_state = json['state'];
_allDay = json['allDay'];
_startTime = json['startTime'];
_endTime = json['endTime'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
int _type;
dynamic _limitTime;
int _limitNumber;
String _coverImg;
String _shareImg;
String _bannerImg;
int _state;
bool _allDay;
String _startTime;
String _endTime;
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;
int get type => _type;
dynamic get limitTime => _limitTime;
int get limitNumber => _limitNumber;
String get coverImg => _coverImg;
String get shareImg => _shareImg;
String get bannerImg => _bannerImg;
int get state => _state;
bool get allDay => _allDay;
String get startTime => _startTime;
String get endTime => _endTime;
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['type'] = _type;
map['limitTime'] = _limitTime;
map['limitNumber'] = _limitNumber;
map['coverImg'] = _coverImg;
map['shareImg'] = _shareImg;
map['bannerImg'] = _bannerImg;
map['state'] = _state;
map['allDay'] = _allDay;
map['startTime'] = _startTime;
map['endTime'] = _endTime;
map['isDelete'] = _isDelete;
return map;
}
}