class Goods { String _id; String _createTime; String _createUser; String _updateTime; String _updateUser; String _categoryId; String _storeId; String _name; String _description; String _worth; String _price; int _stock; int _sales; bool _isHot; int _sortOrder; int _state; bool _canPick; bool _canDelivery; int _isDelete; dynamic _categoryName; String _mainImgPath; List _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 worth => _worth; String get price => _price; 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 get viceImgPaths => _viceImgPaths; Goods({ String id, String createTime, String createUser, String updateTime, String updateUser, String categoryId, String storeId, String name, String description, String worth, String price, int stock, int sales, bool isHot, int sortOrder, int state, bool canPick, bool canDelivery, int isDelete, dynamic categoryName, String mainImgPath, List viceImgPaths}){ _id = id; _createTime = createTime; _createUser = createUser; _updateTime = updateTime; _updateUser = updateUser; _categoryId = categoryId; _storeId = storeId; _name = name; _description = description; _worth = worth; _price = price; _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"]; _worth = json["worth"]; _price = json["price"]; _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() : []; } Map toJson() { var map = {}; 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["worth"] = _worth; map["price"] = _price; 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; } }