178 lines
3.9 KiB

import 'package:huixiang/data/product_set_meals.dart';
import 'package:huixiang/data/sku_attr_list.dart';
import 'package:huixiang/data/subscribe_param.dart';
import 'package:huixiang/generated/json/base/json_field.dart';
import 'package:huixiang/generated/json/mini_detail.g.dart';
import 'dart:convert';
export 'package:huixiang/generated/json/mini_detail.g.dart';
@JsonSerializable()
class MiniDetail {
String? id = '';
String? createTime = '';
String? createUser = '';
String? updateTime = '';
String? updateUser = '';
String? supplierName = '';
String? storeId = '';
String? categoryId = '';
String? groupId = '';
String? shortName = '';
String? productName = '';
String? sellDesc = '';
String? productCode = '';
String? weight = '';
String? applyPrice = '';
String? price = '';
int? stock = 0;
int? sellCount = 0;
int? needLogistics = 0;
int? oversold = 0;
int? status = 0;
bool? posShow = false;
int? productType = 0;
int? productNumber = 0;
int? setMeal = 0;
int? attrStyle = 0;
String? detail;
String? details;
int? isDelete = 0;
String? printerFlag = '';
String? thumbnailImg;
dynamic materialId;
List<String>? imgs = [];
StoreDTO? storeDTO;
List<AttrList>? attrList = [];
List<ProductSkuVOList>? productSkuVOList = [];
String? shipAddress = '';
int? buyCount = 0;
List<dynamic>? promotionShowVOList = [];
int? buyNum = 0;
dynamic productPlatterInfos;
dynamic markProductNone;
dynamic namePinyin;
dynamic nameInitials;
SubscribeParam? subscribeParam;
MiniDetail();
factory MiniDetail.fromJson(Map<String, dynamic> json) => $MiniDetailFromJson(json);
Map<String, dynamic> toJson() => $MiniDetailToJson(this);
@override
String toString() {
return jsonEncode(this);
}
}
@JsonSerializable()
class StoreDTO {
String? id = '';
String? storeName = '';
String? nickName = '';
String? logo = '';
int? productCount = 0;
int? soldNum = 0;
StoreDTO();
factory StoreDTO.fromJson(Map<String, dynamic> json) => $StoreDTOFromJson(json);
Map<String, dynamic> toJson() => $StoreDTOToJson(this);
@override
String toString() {
return jsonEncode(this);
}
}
@JsonSerializable()
class AttrList {
String? productId = '';
String? attrName = '';
int? sortOrder = 0;
bool? needImg = false;
int? isDelete = 0;
dynamic attrCode;
String? id = '';
List<AttrValueList>? attrValueList = [];
AttrList();
factory AttrList.fromJson(Map<String, dynamic> json) => $AttrListFromJson(json);
Map<String, dynamic> toJson() => $AttrListToJson(this);
@override
String toString() {
return jsonEncode(this);
}
}
@JsonSerializable()
class AttrValueList {
String? id = '';
String? attrId = '';
String? attrValue = '';
String? attrName = '';
String? attrValueImg = '';
dynamic sortOrder;
int? isDelete = 0;
@JSONField(name: "attr_value_list")
dynamic attrValues;
dynamic attrValueCode;
AttrValueList();
factory AttrValueList.fromJson(Map<String, dynamic> json) => $AttrValueListFromJson(json);
Map<String, dynamic> toJson() => $AttrValueListToJson(this);
@override
String toString() {
return jsonEncode(this);
}
}
@JsonSerializable()
class ProductSkuVOList {
String? id = '';
String? createTime = '';
String? createUser = '';
String? updateTime = '';
String? updateUser = '';
String? storeId = '';
String? skuCode = '';
String? skuNameStr = '';
String? productId = '';
String? skuPrice = '';
String? applyPrice = '';
dynamic vipPrice;
dynamic skuImg;
int? skuStock = 0;
dynamic sort;
String? setMeal = '';
double? weight;
double? volume;
int? isDelete = 0;
dynamic material;
dynamic version;
dynamic skuAttrCodeDTOList;
List<SkuAttrList>? skuAttrList = [];
List<ProductSetMeals>? productSetMeals;
dynamic setMealDTOList;
ProductSkuVOList();
factory ProductSkuVOList.fromJson(Map<String, dynamic> json) => $ProductSkuVOListFromJson(json);
Map<String, dynamic> toJson() => $ProductSkuVOListToJson(this);
@override
String toString() {
return jsonEncode(this);
}
}