import 'package:huixiang/retrofit/data/banner.dart'; import 'package:huixiang/retrofit/data/coupon_vo.dart'; import 'package:huixiang/retrofit/data/delivery_info.dart'; import 'package:huixiang/retrofit/data/member_source.dart'; import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/pickup_type.dart'; import 'package:huixiang/retrofit/data/promotion.dart'; import 'package:huixiang/retrofit/data/store_type.dart'; import 'package:huixiang/retrofit/data/mini.dart'; class StoreInfo { String address; List bannerList; String city; List couponVOList; String createTime; String createUser; DeliveryInfo deliveryInfo; PickupType pickupType; String district; String headMobile; String tel; String headName; String id; num isAutoSendRefundAddress; String latitude; String logo; bool isVip; String longitude; String mobile; String openEndTime; String openStartTime; String perCapitaConsumption; StoreType posType; List promotionList; String province; String refundAddress; String refundContact; String refundTel; String remark; String shipAddress; String storeName; StoreTable storeTable; String tenantCode; String updateTime; String updateUser; String businessService; Mini mini; bool useErp; String expireTime; String vipFee; MemberSource memberSource; PageInfo informationVOPageVO; StoreInfo(); factory StoreInfo.fromJson(Map json) => StoreInfo() ..address = json['address'] as String ..bannerList = (json['bannerList'] as List) ?.map((e) => e == null ? null : BannerData.fromJson(e as Map)) ?.toList() ..city = json['city'] as String ..couponVOList = (json['couponVOList'] as List) ?.map((e) => e == null ? null : CouponVo.fromJson(e as Map)) ?.toList() ..createTime = json['createTime'] as String ..createUser = json['createUser'] as String ..deliveryInfo = json['deliveryInfo'] == null ? null : DeliveryInfo.fromJson(json['deliveryInfo'] as Map) ..pickupType = json['pickupType'] == null ? null : PickupType.fromJson(json['pickupType'] as Map) ..district = json['district'] as String ..headMobile = json['headMobile'] as String ..tel = json['tel'] as String ..headName = json['headName'] as String ..id = json['id'] as String ..isVip = json['isVip'] ..isAutoSendRefundAddress = json['isAutoSendRefundAddress'] as num ..latitude = json['latitude'] as String ..logo = json['logo'] as String ..longitude = json['longitude'] as String ..mobile = json['mobile'] as String ..openEndTime = json['openEndTime'] as String ..openStartTime = json['openStartTime'] as String ..perCapitaConsumption = json['perCapitaConsumption'] as String ..posType = json['posType'] == null ? null : StoreType.fromJson(json['posType'] as Map) ..promotionList = (json['promotionList'] as List) ?.map((e) => e == null ? null : Promotion.fromJson(e as Map)) ?.toList() ..province = json['province'] as String ..refundAddress = json['refundAddress'] as String ..refundContact = json['refundContact'] as String ..refundTel = json['refundTel'] as String ..remark = json['remark'] as String ..shipAddress = json['shipAddress'] as String ..storeName = json['storeName'] as String ..storeTable = json['storeTable'] != null ? StoreTable.fromJson(json['storeTable']) : null ..tenantCode = json['tenantCode'] as String ..updateTime = json['updateTime'] as String ..updateUser = json['updateUser'] as String ..businessService = json['businessService'] as String ..mini = json['mini'] == null ? null : Mini.fromJson(json['mini']) ..useErp = json['useErp'] as bool ..expireTime = json['expireTime'] as String ..vipFee = json['vipFee'] as String ..memberSource = json['memberSource'] != null ? MemberSource.fromJson(json['memberSource']) : null ..informationVOPageVO = json['informationVOPageVO'] != null ? PageInfo.fromJson(json['informationVOPageVO'], (value){ return value; }) : null; Map toJson() => { 'address': this.address, 'bannerList': this.bannerList.map((e) => e.toJson()).toList(), 'city': this.city, 'couponVOList': this.couponVOList, 'createTime': this.createTime, 'createUser': this.createUser, 'deliveryInfo': this.deliveryInfo.toJson(), 'pickupType':this.pickupType.toJson(), 'district': this.district, 'headMobile': this.headMobile, 'tel': this.tel, 'headName': this.headName, 'id': this.id, 'isAutoSendRefundAddress': this.isAutoSendRefundAddress, 'latitude': this.latitude, 'logo': this.logo, 'longitude': this.longitude, 'mobile': this.mobile, 'isVip': this.isVip, 'openEndTime': this.openEndTime, 'openStartTime': this.openStartTime, 'perCapitaConsumption': this.perCapitaConsumption, 'posType': this.posType.toJson(), 'promotionList': this.promotionList.map((e) => e.toJson()).toList(), 'province': this.province, 'refundAddress': this.refundAddress, 'refundContact': this.refundContact, 'refundTel': this.refundTel, 'remark': this.remark, 'shipAddress': this.shipAddress, 'storeName': this.storeName, 'storeTable': this.storeTable.toJson(), 'tenantCode': this.tenantCode, 'updateTime': this.updateTime, 'updateUser': this.updateUser, 'businessService': this.businessService, 'mini': this.mini.toJson(), 'useErp': this.useErp, 'expireTime': this.expireTime, 'vipFee': this.vipFee, 'memberSource': this.memberSource.toJson(), 'informationVOPageVO': this.informationVOPageVO, }; } class StoreTable { StoreTable(); String areaId; String id; int isDelete; int numberOfPeople; String remark; String storeId; int tableCapacity; String tableName; int tableSort; int tableType; String tenantCode; factory StoreTable.fromJson(Map json) => StoreTable() ..areaId = json["areaId"] ..id = json["id"] ..isDelete = json["isDelete"] ..numberOfPeople = json["numberOfPeople"] ..remark = json["remark"] ..storeId = json["storeId"] ..tableCapacity = json["tableCapacity"] ..tableName = json["tableName"] ..tableSort = json["tableSort"] ..tableType = json["tableType"] ..tenantCode = json["tenantCode"]; Map toJson() => { "areaId": this.areaId, "id": this.id, "isDelete": this.isDelete, "numberOfPeople": this.numberOfPeople, "remark": this.remark, "storeId": this.storeId, "tableCapacity": this.tableCapacity, "tableName": this.tableName, "tableSort": this.tableSort, "tableType": this.tableType, "tenantCode": this.tenantCode, }; }