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.
209 lines
5.6 KiB
209 lines
5.6 KiB
/// id : "1420627244354633728" |
|
/// createTime : "2021-07-29 14:08:24" |
|
/// createUser : "1" |
|
/// updateTime : "2021-11-10 13:59:42" |
|
/// updateUser : "1" |
|
/// categoryId : "2" |
|
/// storeId : "0" |
|
/// name : "回乡" |
|
/// description : "免费拿,一人发一个!" |
|
/// detail : "<p>(1) 兑换商品中所要求的积分达到方可兑换</p>\n<p>(2)先到先得</p>" |
|
/// worth : "9999.00" |
|
/// price : "1" |
|
/// money : "2.00" |
|
/// onePrice : "0" |
|
/// oneMoney : "0.00" |
|
/// stock : 28 |
|
/// sales : 22 |
|
/// isHot : true |
|
/// sortOrder : 6 |
|
/// state : 1 |
|
/// canPick : true |
|
/// canDelivery : true |
|
/// isDelete : 0 |
|
/// categoryName : null |
|
/// mainImgPath : "https://pos.upload.gznl.top/0000/2021/07/bd3a1387-02a0-4ad9-9505-f4c43b26aa3b.webp" |
|
/// viceImgPaths : ["https://pos.upload.gznl.top/0000/2021/07/bd3a1387-02a0-4ad9-9505-f4c43b26aa3b.webp","https://pos.upload.gznl.top/0000/2021/07/bd3a1387-02a0-4ad9-9505-f4c43b26aa3b.webp"] |
|
|
|
class Goods { |
|
Goods({ |
|
String id, |
|
String createTime, |
|
String createUser, |
|
String updateTime, |
|
String updateUser, |
|
String categoryId, |
|
String storeId, |
|
String name, |
|
String description, |
|
String detail, |
|
String worth, |
|
String price, |
|
String money, |
|
String onePrice, |
|
String oneMoney, |
|
String oneBean, |
|
String orderId, |
|
int stock, |
|
int sales, |
|
bool isHot, |
|
int sortOrder, |
|
int state, |
|
bool canPick, |
|
bool canDelivery, |
|
int isDelete, |
|
dynamic categoryName, |
|
String mainImgPath, |
|
List<String> viceImgPaths,}){ |
|
_id = id; |
|
_createTime = createTime; |
|
_createUser = createUser; |
|
_updateTime = updateTime; |
|
_updateUser = updateUser; |
|
_categoryId = categoryId; |
|
_storeId = storeId; |
|
_name = name; |
|
_description = description; |
|
_detail = detail; |
|
_worth = worth; |
|
_price = price; |
|
_money = money; |
|
_onePrice = onePrice; |
|
_oneMoney = oneMoney; |
|
_oneBean = oneBean; |
|
_orderId = orderId; |
|
_stock = stock; |
|
_sales = sales; |
|
_isHot = isHot; |
|
_sortOrder = sortOrder; |
|
_state = state; |
|
_canPick = canPick; |
|
_canDelivery = canDelivery; |
|
_isDelete = isDelete; |
|
_categoryName = categoryName; |
|
_mainImgPath = mainImgPath; |
|
_viceImgPaths = viceImgPaths; |
|
} |
|
|
|
Goods.fromJson(dynamic json) { |
|
_id = json['id']; |
|
_createTime = json['createTime']; |
|
_createUser = json['createUser']; |
|
_updateTime = json['updateTime']; |
|
_updateUser = json['updateUser']; |
|
_categoryId = json['categoryId']; |
|
_storeId = json['storeId']; |
|
_name = json['name']; |
|
_description = json['description']; |
|
_detail = json['detail']; |
|
_worth = json['worth']; |
|
_price = json['price']; |
|
_money = json['money']; |
|
_onePrice = json['onePrice']; |
|
_oneMoney = json['oneMoney']; |
|
_oneBean = json['oneBean']; |
|
_orderId = json['orderId']; |
|
_stock = json['stock']; |
|
_sales = json['sales']; |
|
_isHot = json['isHot']; |
|
_sortOrder = json['sortOrder']; |
|
_state = json['state']; |
|
_canPick = json['canPick']; |
|
_canDelivery = json['canDelivery']; |
|
_isDelete = json['isDelete']; |
|
_categoryName = json['categoryName']; |
|
_mainImgPath = json['mainImgPath']; |
|
_viceImgPaths = json['viceImgPaths'] != null ? json['viceImgPaths'].cast<String>() : []; |
|
} |
|
String _id; |
|
String _createTime; |
|
String _createUser; |
|
String _updateTime; |
|
String _updateUser; |
|
String _categoryId; |
|
String _storeId; |
|
String _name; |
|
String _description; |
|
String _detail; |
|
String _worth; |
|
String _price; |
|
String _money; |
|
String _onePrice; |
|
String _oneMoney; |
|
String _oneBean; |
|
String _orderId; |
|
int _stock; |
|
int _sales; |
|
bool _isHot; |
|
int _sortOrder; |
|
int _state; |
|
bool _canPick; |
|
bool _canDelivery; |
|
int _isDelete; |
|
dynamic _categoryName; |
|
String _mainImgPath; |
|
List<String> _viceImgPaths; |
|
|
|
String get id => _id; |
|
String get createTime => _createTime; |
|
String get createUser => _createUser; |
|
String get updateTime => _updateTime; |
|
String get updateUser => _updateUser; |
|
String get categoryId => _categoryId; |
|
String get storeId => _storeId; |
|
String get name => _name; |
|
String get description => _description; |
|
String get detail => _detail; |
|
String get worth => _worth; |
|
String get price => _price; |
|
String get money => _money; |
|
String get onePrice => _onePrice; |
|
String get oneMoney => _oneMoney; |
|
String get oneBean => _oneBean; |
|
String get orderId => _orderId; |
|
int get stock => _stock; |
|
int get sales => _sales; |
|
bool get isHot => _isHot; |
|
int get sortOrder => _sortOrder; |
|
int get state => _state; |
|
bool get canPick => _canPick; |
|
bool get canDelivery => _canDelivery; |
|
int get isDelete => _isDelete; |
|
dynamic get categoryName => _categoryName; |
|
String get mainImgPath => _mainImgPath; |
|
List<String> get viceImgPaths => _viceImgPaths; |
|
|
|
Map<String, dynamic> toJson() { |
|
final map = <String, dynamic>{}; |
|
map['id'] = _id; |
|
map['createTime'] = _createTime; |
|
map['createUser'] = _createUser; |
|
map['updateTime'] = _updateTime; |
|
map['updateUser'] = _updateUser; |
|
map['categoryId'] = _categoryId; |
|
map['storeId'] = _storeId; |
|
map['name'] = _name; |
|
map['description'] = _description; |
|
map['detail'] = _detail; |
|
map['worth'] = _worth; |
|
map['price'] = _price; |
|
map['money'] = _money; |
|
map['onePrice'] = _onePrice; |
|
map['oneMoney'] = _oneMoney; |
|
map['oneBean'] = _oneBean; |
|
map['orderId'] = _orderId; |
|
map['stock'] = _stock; |
|
map['sales'] = _sales; |
|
map['isHot'] = _isHot; |
|
map['sortOrder'] = _sortOrder; |
|
map['state'] = _state; |
|
map['canPick'] = _canPick; |
|
map['canDelivery'] = _canDelivery; |
|
map['isDelete'] = _isDelete; |
|
map['categoryName'] = _categoryName; |
|
map['mainImgPath'] = _mainImgPath; |
|
map['viceImgPaths'] = _viceImgPaths; |
|
return map; |
|
} |
|
|
|
} |