class GoodsDetailModel { String code; String message; GoodsDetailInfo data; static GoodsDetailModel fromMap(Map map) { GoodsDetailModel model = GoodsDetailModel(); model.code = map['code']; model.message = map['message']; model.data = GoodsDetailInfo.fromMap(map['data']); return model; } static List fromMapList(dynamic mapList) { List list = List(mapList.length); for (int i = 0; i < mapList.length; i++) { list[i] = fromMap(mapList[i]); } return list; } } class GoodsDetailInfo { AdvertesPictureBean advertesPicture; GoodInfoBean goodInfo; List goodComments; static GoodsDetailInfo fromMap(Map map) { GoodsDetailInfo dataBean = GoodsDetailInfo(); dataBean.advertesPicture = AdvertesPictureBean.fromMap(map['advertesPicture']); dataBean.goodInfo = GoodInfoBean.fromMap(map['goodInfo']); dataBean.goodComments = GoodCommentsListBean.fromMapList(map['goodComments']); return dataBean; } static List fromMapList(dynamic mapList) { List list = List(mapList.length); for (int i = 0; i < mapList.length; i++) { list[i] = fromMap(mapList[i]); } return list; } } class AdvertesPictureBean { // ignore: non_constant_identifier_names String PICTURE_ADDRESS; // ignore: non_constant_identifier_names String TO_PLACE; static AdvertesPictureBean fromMap(Map map) { AdvertesPictureBean advertesPictureBean = AdvertesPictureBean(); advertesPictureBean.PICTURE_ADDRESS = map['PICTURE_ADDRESS']; advertesPictureBean.TO_PLACE = map['TO_PLACE']; return advertesPictureBean; } static List fromMapList(dynamic mapList) { List list = List(mapList.length); for (int i = 0; i < mapList.length; i++) { list[i] = fromMap(mapList[i]); } return list; } } class GoodInfoBean { String image5; String image3; String image4; String goodsId; String isOnline; String image1; String image2; String goodsSerialNumber; String comPic; String shopId; String goodsName; String goodsDetail; int amount; double oriPrice; double presentPrice; int state; static GoodInfoBean fromMap(Map map) { GoodInfoBean goodInfoBean = GoodInfoBean(); goodInfoBean.image5 = map['image5']; goodInfoBean.image3 = map['image3']; goodInfoBean.image4 = map['image4']; goodInfoBean.goodsId = map['goodsId']; goodInfoBean.isOnline = map['isOnline']; goodInfoBean.image1 = map['image1']; goodInfoBean.image2 = map['image2']; goodInfoBean.goodsSerialNumber = map['goodsSerialNumber']; goodInfoBean.comPic = map['comPic']; goodInfoBean.shopId = map['shopId']; goodInfoBean.goodsName = map['goodsName']; goodInfoBean.goodsDetail = map['goodsDetail']; goodInfoBean.amount = map['amount']; goodInfoBean.oriPrice = map['oriPrice'] + 0.0; goodInfoBean.presentPrice = map['presentPrice'] + 0.0; goodInfoBean.state = map['state']; return goodInfoBean; } static List fromMapList(dynamic mapList) { List list = List(mapList.length); for (int i = 0; i < mapList.length; i++) { list[i] = fromMap(mapList[i]); } return list; } } class GoodCommentsListBean { String comments; String userName; // ignore: non_constant_identifier_names int SCORE; int discussTime; static GoodCommentsListBean fromMap(Map map) { GoodCommentsListBean goodCommentsListBean = GoodCommentsListBean(); goodCommentsListBean.comments = map['comments']; goodCommentsListBean.userName = map['userName']; goodCommentsListBean.SCORE = map['SCORE']; goodCommentsListBean.discussTime = map['discussTime']; return goodCommentsListBean; } static List fromMapList(dynamic mapList) { List list = List(mapList.length); for (int i = 0; i < mapList.length; i++) { list[i] = fromMap(mapList[i]); } return list; } }