颤振配置单元:处理复杂json的多个类
我正在尝试向配置单元添加JSON响应以创建缓存数据。颤振配置单元:处理复杂json的多个类,json,flutter,dart,flutter-hive,Json,Flutter,Dart,Flutter Hive,我正在尝试向配置单元添加JSON响应以创建缓存数据。 当我尝试将Json数据添加到配置单元时,它显示错误: 未处理的异常:HiveError:无法写入,未知类型: 耦合器组。您忘记注册适配器了吗 我是否需要创建所有类来创建适配器,如耦合器组? 或者我遗漏了什么细节 我如何处理这些数据 import 'package:hive/hive.dart'; part 'hiveCoupler.g.dart'; @HiveType(typeId: 4) class Coupler { @Hive
当我尝试将Json数据添加到配置单元时,它显示错误:
未处理的异常:HiveError:无法写入,未知类型: 耦合器组。您忘记注册适配器了吗 我是否需要创建所有类来创建适配器,如耦合器组?
或者我遗漏了什么细节 我如何处理这些数据
import 'package:hive/hive.dart';
part 'hiveCoupler.g.dart';
@HiveType(typeId: 4)
class Coupler {
@HiveField(0)
int couplerTrackCaseId;
@HiveField(1)
int couplerTrackCaseTypeId;
@HiveField(2)
int couplerGroupId;
@HiveField(3)
String checklistRef;
@HiveField(4)
int totalCount;
@HiveField(5)
int currentProgressId;
@HiveField(6)
String firstConcretingPersonId;
@HiveField(7)
String firstConcretingPersonDate;
@HiveField(8)
String secondConcretingPersonId;
@HiveField(9)
String secondConcretingPersonDate;
@HiveField(10)
String rcCheckerPersonId;
@HiveField(11)
String rseCheckerPersonId;
@HiveField(12)
int locationId;
@HiveField(13)
CouplerGroup couplerGroup;
@HiveField(14)
List<CouplerTrackStageList> couplerTrackStageList;
@HiveField(15)
CurrentProgress currentProgress;
@HiveField(16)
LocationOfSite locationOfSite;
@HiveField(17)
List<CouplerTrackCaseReferenceList> couplerTrackCaseReferenceList;
@HiveField(18)
List<CouplerTrackCaseOrderNumberList> couplerTrackCaseOrderNumberList;
@HiveField(19)
List<CouplerTrackCaseArrivalList> couplerTrackCaseArrivalList;
@HiveField(20)
String checkingPersonRcName;
@HiveField(21)
int checkingPersonRcFrequency;
@HiveField(22)
String checkingPersonRseName;
@HiveField(23)
int checkingPersonRseFrequency;
@HiveField(24)
String orderNumber;
@HiveField(25)
String referenceDesc;
@HiveField(26)
String couplerTrackCaseArrivalDate;
@HiveField(27)
String checkingPersonRseGrade;
@HiveField(28)
String checkingPersonRcGrade;
Coupler(
{this.couplerTrackCaseId,
this.couplerTrackCaseTypeId,
this.couplerGroupId,
this.checklistRef,
this.totalCount,
this.currentProgressId,
this.firstConcretingPersonId,
this.firstConcretingPersonDate,
this.secondConcretingPersonId,
this.secondConcretingPersonDate,
this.rcCheckerPersonId,
this.rseCheckerPersonId,
this.locationId,
this.couplerGroup,
this.couplerTrackStageList,
this.currentProgress,
this.locationOfSite,
this.couplerTrackCaseReferenceList,
this.couplerTrackCaseOrderNumberList,
this.couplerTrackCaseArrivalList,
this.checkingPersonRcName,
this.checkingPersonRcFrequency,
this.checkingPersonRseName,
this.checkingPersonRseFrequency,
this.orderNumber,
this.referenceDesc,
this.couplerTrackCaseArrivalDate,
this.checkingPersonRseGrade,
this.checkingPersonRcGrade});
Coupler.fromJson(Map<String, dynamic> json) {
couplerTrackCaseId = json['couplerTrackCaseId'];
couplerTrackCaseTypeId = json['couplerTrackCaseTypeId'];
couplerGroupId = json['couplerGroupId'];
checklistRef = json['checklistRef'];
totalCount = json['totalCount'];
currentProgressId = json['currentProgressId'];
firstConcretingPersonId = json['firstConcretingPersonId'];
firstConcretingPersonDate = json['firstConcretingPersonDate'];
secondConcretingPersonId = json['secondConcretingPersonId'];
secondConcretingPersonDate = json['secondConcretingPersonDate'];
rcCheckerPersonId = json['rcCheckerPersonId'];
rseCheckerPersonId = json['rseCheckerPersonId'];
locationId = json['locationId'];
couplerGroup = json['couplerGroup'] != null
? new CouplerGroup.fromJson(json['couplerGroup'])
: null;
if (json['couplerTrackStageList'] != null) {
couplerTrackStageList = new List<CouplerTrackStageList>();
json['couplerTrackStageList'].forEach((v) {
couplerTrackStageList.add(new CouplerTrackStageList.fromJson(v));
});
}
currentProgress = json['currentProgress'] != null
? new CurrentProgress.fromJson(json['currentProgress'])
: null;
locationOfSite = json['locationOfSite'] != null
? new LocationOfSite.fromJson(json['locationOfSite'])
: null;
if (json['couplerTrackCaseReferenceList'] != null) {
couplerTrackCaseReferenceList = new List<CouplerTrackCaseReferenceList>();
json['couplerTrackCaseReferenceList'].forEach((v) {
couplerTrackCaseReferenceList
.add(new CouplerTrackCaseReferenceList.fromJson(v));
});
}
if (json['couplerTrackCaseOrderNumberList'] != null) {
couplerTrackCaseOrderNumberList =
new List<CouplerTrackCaseOrderNumberList>();
json['couplerTrackCaseOrderNumberList'].forEach((v) {
couplerTrackCaseOrderNumberList
.add(new CouplerTrackCaseOrderNumberList.fromJson(v));
});
}
if (json['couplerTrackCaseArrivalList'] != null) {
couplerTrackCaseArrivalList = new List<CouplerTrackCaseArrivalList>();
json['couplerTrackCaseArrivalList'].forEach((v) {
couplerTrackCaseArrivalList
.add(new CouplerTrackCaseArrivalList.fromJson(v));
});
}
checkingPersonRcName = json['checkingPersonRcName'];
checkingPersonRcFrequency = json['checkingPersonRcFrequency'];
checkingPersonRseName = json['checkingPersonRseName'];
checkingPersonRseFrequency = json['checkingPersonRseFrequency'];
orderNumber = json['orderNumber'];
referenceDesc = json['referenceDesc'];
couplerTrackCaseArrivalDate = json['couplerTrackCaseArrivalDate'];
checkingPersonRseGrade = json['checkingPersonRseGrade'];
checkingPersonRcGrade = json['checkingPersonRcGrade'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerTrackCaseId'] = this.couplerTrackCaseId;
data['couplerTrackCaseTypeId'] = this.couplerTrackCaseTypeId;
data['couplerGroupId'] = this.couplerGroupId;
data['checklistRef'] = this.checklistRef;
data['totalCount'] = this.totalCount;
data['currentProgressId'] = this.currentProgressId;
data['firstConcretingPersonId'] = this.firstConcretingPersonId;
data['firstConcretingPersonDate'] = this.firstConcretingPersonDate;
data['secondConcretingPersonId'] = this.secondConcretingPersonId;
data['secondConcretingPersonDate'] = this.secondConcretingPersonDate;
data['rcCheckerPersonId'] = this.rcCheckerPersonId;
data['rseCheckerPersonId'] = this.rseCheckerPersonId;
data['locationId'] = this.locationId;
if (this.couplerGroup != null) {
data['couplerGroup'] = this.couplerGroup.toJson();
}
if (this.couplerTrackStageList != null) {
data['couplerTrackStageList'] =
this.couplerTrackStageList.map((v) => v.toJson()).toList();
}
if (this.currentProgress != null) {
data['currentProgress'] = this.currentProgress.toJson();
}
if (this.locationOfSite != null) {
data['locationOfSite'] = this.locationOfSite.toJson();
}
if (this.couplerTrackCaseReferenceList != null) {
data['couplerTrackCaseReferenceList'] =
this.couplerTrackCaseReferenceList.map((v) => v.toJson()).toList();
}
if (this.couplerTrackCaseOrderNumberList != null) {
data['couplerTrackCaseOrderNumberList'] =
this.couplerTrackCaseOrderNumberList.map((v) => v.toJson()).toList();
}
if (this.couplerTrackCaseArrivalList != null) {
data['couplerTrackCaseArrivalList'] =
this.couplerTrackCaseArrivalList.map((v) => v.toJson()).toList();
}
data['checkingPersonRcName'] = this.checkingPersonRcName;
data['checkingPersonRcFrequency'] = this.checkingPersonRcFrequency;
data['checkingPersonRseName'] = this.checkingPersonRseName;
data['checkingPersonRseFrequency'] = this.checkingPersonRseFrequency;
data['orderNumber'] = this.orderNumber;
data['referenceDesc'] = this.referenceDesc;
data['couplerTrackCaseArrivalDate'] = this.couplerTrackCaseArrivalDate;
data['checkingPersonRseGrade'] = this.checkingPersonRseGrade;
data['checkingPersonRcGrade'] = this.checkingPersonRcGrade;
return data;
}
}
class CouplerGroup {
int couplerGroupId;
int couplerTypeId;
String siteId;
int towerId;
int floorId;
String groupDesc;
int rebarSum;
CouplerType couplerType;
CouplerTrackCaseType couplerTrackCaseType;
Site site;
Tower tower;
Floor floor;
List<CouplerGroupRebarSetups> couplerGroupRebarSetups;
List<CouplerGroupImages> couplerGroupImages;
CouplerGroup(
{this.couplerGroupId,
this.couplerTypeId,
this.siteId,
this.towerId,
this.floorId,
this.groupDesc,
this.rebarSum,
this.couplerType,
this.couplerTrackCaseType,
this.site,
this.tower,
this.floor,
this.couplerGroupRebarSetups,
this.couplerGroupImages});
CouplerGroup.fromJson(Map<String, dynamic> json) {
couplerGroupId = json['couplerGroupId'];
couplerTypeId = json['couplerTypeId'];
siteId = json['siteId'];
towerId = json['towerId'];
floorId = json['floorId'];
groupDesc = json['groupDesc'];
rebarSum = json['rebarSum'];
couplerType = json['couplerType'] != null
? new CouplerType.fromJson(json['couplerType'])
: null;
couplerTrackCaseType = json['couplerTrackCaseType'] != null
? new CouplerTrackCaseType.fromJson(json['couplerTrackCaseType'])
: null;
site = json['site'] != null ? new Site.fromJson(json['site']) : null;
tower = json['tower'] != null ? new Tower.fromJson(json['tower']) : null;
floor = json['floor'] != null ? new Floor.fromJson(json['floor']) : null;
if (json['couplerGroupRebarSetups'] != null) {
couplerGroupRebarSetups = new List<CouplerGroupRebarSetups>();
json['couplerGroupRebarSetups'].forEach((v) {
couplerGroupRebarSetups.add(new CouplerGroupRebarSetups.fromJson(v));
});
}
if (json['couplerGroupImages'] != null) {
couplerGroupImages = new List<CouplerGroupImages>();
json['couplerGroupImages'].forEach((v) {
couplerGroupImages.add(new CouplerGroupImages.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerGroupId'] = this.couplerGroupId;
data['couplerTypeId'] = this.couplerTypeId;
data['siteId'] = this.siteId;
data['towerId'] = this.towerId;
data['floorId'] = this.floorId;
data['groupDesc'] = this.groupDesc;
data['rebarSum'] = this.rebarSum;
if (this.couplerType != null) {
data['couplerType'] = this.couplerType.toJson();
}
if (this.couplerTrackCaseType != null) {
data['couplerTrackCaseType'] = this.couplerTrackCaseType.toJson();
}
if (this.site != null) {
data['site'] = this.site.toJson();
}
if (this.tower != null) {
data['tower'] = this.tower.toJson();
}
if (this.floor != null) {
data['floor'] = this.floor.toJson();
}
if (this.couplerGroupRebarSetups != null) {
data['couplerGroupRebarSetups'] =
this.couplerGroupRebarSetups.map((v) => v.toJson()).toList();
}
if (this.couplerGroupImages != null) {
data['couplerGroupImages'] =
this.couplerGroupImages.map((v) => v.toJson()).toList();
}
return data;
}
}
class CouplerType {
int couplerTypeId;
int couplerTrackCaseTypeId;
String couplerTypeDesc;
double rcInspectFrequency;
double rseInspectFrequency;
CouplerType(
{this.couplerTypeId,
this.couplerTrackCaseTypeId,
this.couplerTypeDesc,
this.rcInspectFrequency,
this.rseInspectFrequency});
CouplerType.fromJson(Map<String, dynamic> json) {
couplerTypeId = json['couplerTypeId'];
couplerTrackCaseTypeId = json['couplerTrackCaseTypeId'];
couplerTypeDesc = json['couplerTypeDesc'];
rcInspectFrequency = json['rcInspectFrequency'];
rseInspectFrequency = json['rseInspectFrequency'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerTypeId'] = this.couplerTypeId;
data['couplerTrackCaseTypeId'] = this.couplerTrackCaseTypeId;
data['couplerTypeDesc'] = this.couplerTypeDesc;
data['rcInspectFrequency'] = this.rcInspectFrequency;
data['rseInspectFrequency'] = this.rseInspectFrequency;
return data;
}
}
class CouplerTrackCaseType {
int couplerTrackCaseTypeId;
String caseTypeDesc;
CouplerTrackCaseType({this.couplerTrackCaseTypeId, this.caseTypeDesc});
CouplerTrackCaseType.fromJson(Map<String, dynamic> json) {
couplerTrackCaseTypeId = json['couplerTrackCaseTypeId'];
caseTypeDesc = json['caseTypeDesc'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerTrackCaseTypeId'] = this.couplerTrackCaseTypeId;
data['caseTypeDesc'] = this.caseTypeDesc;
return data;
}
}
class Site {
String siteId;
String siteDesc;
String handGeometry;
String teamId;
String contractNo;
String startDate;
String contractTypeId;
String companyId;
String parentSiteId;
String handkeyMifare;
String archived;
String projectName;
String isDegrade;
Site(
{this.siteId,
this.siteDesc,
this.handGeometry,
this.teamId,
this.contractNo,
this.startDate,
this.contractTypeId,
this.companyId,
this.parentSiteId,
this.handkeyMifare,
this.archived,
this.projectName,
this.isDegrade});
Site.fromJson(Map<String, dynamic> json) {
siteId = json['siteId'];
siteDesc = json['siteDesc'];
handGeometry = json['handGeometry'];
teamId = json['teamId'];
contractNo = json['contractNo'];
startDate = json['startDate'];
contractTypeId = json['contractTypeId'];
companyId = json['companyId'];
parentSiteId = json['parentSiteId'];
handkeyMifare = json['handkeyMifare'];
archived = json['archived'];
projectName = json['projectName'];
isDegrade = json['isDegrade'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['siteId'] = this.siteId;
data['siteDesc'] = this.siteDesc;
data['handGeometry'] = this.handGeometry;
data['teamId'] = this.teamId;
data['contractNo'] = this.contractNo;
data['startDate'] = this.startDate;
data['contractTypeId'] = this.contractTypeId;
data['companyId'] = this.companyId;
data['parentSiteId'] = this.parentSiteId;
data['handkeyMifare'] = this.handkeyMifare;
data['archived'] = this.archived;
data['projectName'] = this.projectName;
data['isDegrade'] = this.isDegrade;
return data;
}
}
class Tower {
int towerId;
String towerDesc;
String enable;
String towerShortName;
String towerDescStr;
Tower(
{this.towerId,
this.towerDesc,
this.enable,
this.towerShortName,
this.towerDescStr});
Tower.fromJson(Map<String, dynamic> json) {
towerId = json['towerId'];
towerDesc = json['towerDesc'];
enable = json['enable'];
towerShortName = json['towerShortName'];
towerDescStr = json['towerDescStr'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['towerId'] = this.towerId;
data['towerDesc'] = this.towerDesc;
data['enable'] = this.enable;
data['towerShortName'] = this.towerShortName;
data['towerDescStr'] = this.towerDescStr;
return data;
}
}
class Floor {
int floorId;
String floorDesc;
String enable;
String floorShortName;
String floorDescStr;
Floor(
{this.floorId,
this.floorDesc,
this.enable,
this.floorShortName,
this.floorDescStr});
Floor.fromJson(Map<String, dynamic> json) {
floorId = json['floorId'];
floorDesc = json['floorDesc'];
enable = json['enable'];
floorShortName = json['floorShortName'];
floorDescStr = json['floorDescStr'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['floorId'] = this.floorId;
data['floorDesc'] = this.floorDesc;
data['enable'] = this.enable;
data['floorShortName'] = this.floorShortName;
data['floorDescStr'] = this.floorDescStr;
return data;
}
}
class CouplerGroupRebarSetups {
int couplerGroupRebarSetupId;
int couplerGroupId;
int referenceRebarFrom;
int referenceRebarTo;
String referenceDesc;
String rebarDesc;
String flagMultiple;
List<CouplerGroupRebars> couplerGroupRebars;
CouplerGroupRebarSetups(
{this.couplerGroupRebarSetupId,
this.couplerGroupId,
this.referenceRebarFrom,
this.referenceRebarTo,
this.referenceDesc,
this.rebarDesc,
this.flagMultiple,
this.couplerGroupRebars});
CouplerGroupRebarSetups.fromJson(Map<String, dynamic> json) {
couplerGroupRebarSetupId = json['couplerGroupRebarSetupId'];
couplerGroupId = json['couplerGroupId'];
referenceRebarFrom = json['referenceRebarFrom'];
referenceRebarTo = json['referenceRebarTo'];
referenceDesc = json['referenceDesc'];
rebarDesc = json['rebarDesc'];
flagMultiple = json['flagMultiple'];
if (json['couplerGroupRebars'] != null) {
couplerGroupRebars = new List<CouplerGroupRebars>();
json['couplerGroupRebars'].forEach((v) {
couplerGroupRebars.add(new CouplerGroupRebars.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerGroupRebarSetupId'] = this.couplerGroupRebarSetupId;
data['couplerGroupId'] = this.couplerGroupId;
data['referenceRebarFrom'] = this.referenceRebarFrom;
data['referenceRebarTo'] = this.referenceRebarTo;
data['referenceDesc'] = this.referenceDesc;
data['rebarDesc'] = this.rebarDesc;
data['flagMultiple'] = this.flagMultiple;
if (this.couplerGroupRebars != null) {
data['couplerGroupRebars'] =
this.couplerGroupRebars.map((v) => v.toJson()).toList();
}
return data;
}
}
class CouplerGroupRebars {
int couplerGroupRebarId;
int couplerGroupId;
String referenceDesc;
String rebarDesc;
int couplerGroupRebarSetupId;
int couplerGroupRebarSort;
CouplerGroupRebars(
{this.couplerGroupRebarId,
this.couplerGroupId,
this.referenceDesc,
this.rebarDesc,
this.couplerGroupRebarSetupId,
this.couplerGroupRebarSort});
CouplerGroupRebars.fromJson(Map<String, dynamic> json) {
couplerGroupRebarId = json['couplerGroupRebarId'];
couplerGroupId = json['couplerGroupId'];
referenceDesc = json['referenceDesc'];
rebarDesc = json['rebarDesc'];
couplerGroupRebarSetupId = json['couplerGroupRebarSetupId'];
couplerGroupRebarSort = json['couplerGroupRebarSort'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerGroupRebarId'] = this.couplerGroupRebarId;
data['couplerGroupId'] = this.couplerGroupId;
data['referenceDesc'] = this.referenceDesc;
data['rebarDesc'] = this.rebarDesc;
data['couplerGroupRebarSetupId'] = this.couplerGroupRebarSetupId;
data['couplerGroupRebarSort'] = this.couplerGroupRebarSort;
return data;
}
}
class CouplerGroupImages {
int couplerGroupImageId;
int couplerGroupId;
int couplerTrackImageId;
CouplerTrackImage couplerTrackImage;
String fileData;
CouplerGroupImages(
{this.couplerGroupImageId,
this.couplerGroupId,
this.couplerTrackImageId,
this.couplerTrackImage,
this.fileData});
CouplerGroupImages.fromJson(Map<String, dynamic> json) {
couplerGroupImageId = json['couplerGroupImageId'];
couplerGroupId = json['couplerGroupId'];
couplerTrackImageId = json['couplerTrackImageId'];
couplerTrackImage = json['couplerTrackImage'] != null
? new CouplerTrackImage.fromJson(json['couplerTrackImage'])
: null;
fileData = json['fileData'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerGroupImageId'] = this.couplerGroupImageId;
data['couplerGroupId'] = this.couplerGroupId;
data['couplerTrackImageId'] = this.couplerTrackImageId;
if (this.couplerTrackImage != null) {
data['couplerTrackImage'] = this.couplerTrackImage.toJson();
}
data['fileData'] = this.fileData;
return data;
}
}
class CouplerTrackImage {
int couplerTrackImageId;
String originalPhotoPath;
CouplerTrackImage({this.couplerTrackImageId, this.originalPhotoPath});
CouplerTrackImage.fromJson(Map<String, dynamic> json) {
couplerTrackImageId = json['couplerTrackImageId'];
originalPhotoPath = json['originalPhotoPath'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerTrackImageId'] = this.couplerTrackImageId;
data['originalPhotoPath'] = this.originalPhotoPath;
return data;
}
}
class CouplerTrackStageList {
int couplerTrackStageId;
int couplerTrackCaseId;
int couplerTrackProgressId;
int couplerTrackCheckerTypeId;
String passStatus;
int versionCode;
String checkedDate;
String submissionDate;
String submittedBy;
String signedDate;
String signedBy;
String inputDataPersionId;
String inputDataDate;
int signedImageId;
CouplerTrackStageList(
{this.couplerTrackStageId,
this.couplerTrackCaseId,
this.couplerTrackProgressId,
this.couplerTrackCheckerTypeId,
this.passStatus,
this.versionCode,
this.checkedDate,
this.submissionDate,
this.submittedBy,
this.signedDate,
this.signedBy,
this.inputDataPersionId,
this.inputDataDate,
this.signedImageId});
CouplerTrackStageList.fromJson(Map<String, dynamic> json) {
couplerTrackStageId = json['couplerTrackStageId'];
couplerTrackCaseId = json['couplerTrackCaseId'];
couplerTrackProgressId = json['couplerTrackProgressId'];
couplerTrackCheckerTypeId = json['couplerTrackCheckerTypeId'];
passStatus = json['passStatus'];
versionCode = json['versionCode'];
checkedDate = json['checkedDate'];
submissionDate = json['submissionDate'];
submittedBy = json['submittedBy'];
signedDate = json['signedDate'];
signedBy = json['signedBy'];
inputDataPersionId = json['inputDataPersionId'];
inputDataDate = json['inputDataDate'];
signedImageId = json['signedImageId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerTrackStageId'] = this.couplerTrackStageId;
data['couplerTrackCaseId'] = this.couplerTrackCaseId;
data['couplerTrackProgressId'] = this.couplerTrackProgressId;
data['couplerTrackCheckerTypeId'] = this.couplerTrackCheckerTypeId;
data['passStatus'] = this.passStatus;
data['versionCode'] = this.versionCode;
data['checkedDate'] = this.checkedDate;
data['submissionDate'] = this.submissionDate;
data['submittedBy'] = this.submittedBy;
data['signedDate'] = this.signedDate;
data['signedBy'] = this.signedBy;
data['inputDataPersionId'] = this.inputDataPersionId;
data['inputDataDate'] = this.inputDataDate;
data['signedImageId'] = this.signedImageId;
return data;
}
}
class CurrentProgress {
int couplerTrackProgressId;
String couplerTrackProgressDesc;
CurrentProgress({this.couplerTrackProgressId, this.couplerTrackProgressDesc});
CurrentProgress.fromJson(Map<String, dynamic> json) {
couplerTrackProgressId = json['couplerTrackProgressId'];
couplerTrackProgressDesc = json['couplerTrackProgressDesc'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerTrackProgressId'] = this.couplerTrackProgressId;
data['couplerTrackProgressDesc'] = this.couplerTrackProgressDesc;
return data;
}
}
class LocationOfSite {
int locationId;
String siteId;
String locationDesc;
String enable;
LocationOfSite(
{this.locationId, this.siteId, this.locationDesc, this.enable});
LocationOfSite.fromJson(Map<String, dynamic> json) {
locationId = json['locationId'];
siteId = json['siteId'];
locationDesc = json['locationDesc'];
enable = json['enable'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['locationId'] = this.locationId;
data['siteId'] = this.siteId;
data['locationDesc'] = this.locationDesc;
data['enable'] = this.enable;
return data;
}
}
class CouplerTrackCaseReferenceList {
int ctCaseReferenceId;
int couplerTrackCaseId;
int referenceId;
String referenceDesc;
CouplerTrackCaseReferenceList(
{this.ctCaseReferenceId,
this.couplerTrackCaseId,
this.referenceId,
this.referenceDesc});
CouplerTrackCaseReferenceList.fromJson(Map<String, dynamic> json) {
ctCaseReferenceId = json['ctCaseReferenceId'];
couplerTrackCaseId = json['couplerTrackCaseId'];
referenceId = json['referenceId'];
referenceDesc = json['referenceDesc'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ctCaseReferenceId'] = this.ctCaseReferenceId;
data['couplerTrackCaseId'] = this.couplerTrackCaseId;
data['referenceId'] = this.referenceId;
data['referenceDesc'] = this.referenceDesc;
return data;
}
}
import'package:hive/hive.dart';
“hiveCoupler.g.dart”部分;
@HiveType(类型ID:4)
类耦合器{
@HiveField(0)
int-couplerTrackCaseId;
@HiveField(1)
int-couplerTrackCaseTypeId;
@HiveField(2)
int-couplerGroupId;
@HiveField(3)
字符串checklistRef;
@HiveField(4)
整数总数;
@HiveField(5)
int-currentProgressId;
@HiveField(6)
字符串优先具体化PersonId;
@HiveField(7)
先串混凝土后串;
@HiveField(8)
字符串二次具体化personid;
@HiveField(9)
串二次固结过支架;
@HiveField(10)
字符串rcCheckerPersonId;
@HiveField(11)
字符串rseCheckerPersonId;
@HiveField(12)
int locationId;
@HiveField(13)
耦合器组耦合器组;
@HiveField(14)
列表耦合器跟踪stagelist;
@HiveField(15)
当前进展当前进展;
@HiveField(16)
现场位置现场位置;
@HiveField(17)
列出耦合器TrackCaseReferenceList;
@HiveField(18)
列出耦合器TrackCaseOrderNumber列表;
@HiveField(19)
列表耦合器RackCaseArrivalist;
@HiveField(20)
字符串检查personrcname;
@HiveField(21)
内部检查人员频率;
@HiveField(22)
字符串检查PersonrseName;
@HiveField(23)
int检查人员频率;
@HiveField(24)
字符串顺序号;
@HiveField(25)
字符串引用ESC;
@HiveField(26)
字符串耦合器TrackCaseArrivalDate;
@HiveField(27)
字符串检查人员等级;
@HiveField(28)
字符串检查人员等级;
耦合器(
{this.couplerTrackCaseId,
此.耦合器TrackCaseTypeID,
此.耦合器组ID,
这是checklistRef,
这是总数,
这个.currentProgressId,
这个,第一个具体化的人,
这是第一次凝固,
这是第二个具体化的人,
这是第二次凝固,
这个.rcCheckerPersonId,
这个.rseCheckerPersonId,
这个.locationId,
这个.耦合器组,
这是一位舞台演员,
这是一种进步,
这是现场的位置,
这个.对联TrackCaseReferenceList,
此.couplerTrackCaseOrderNumber列表,
这个.对联TrackCaseArrivalist,
这个.checkingPersonRcName,
这是检查人员的频率,
这个.checkingPersonRseName,
这是检查人员的频率,
这是订单号,
这是参考的ESC,
这个.couplerTrackCaseArrivalDate,
这是检查人员等级,
此选项包括:checkingPersonRcGrade});
fromJson(映射json){
couplerTrackCaseId=json['couplerTrackCaseId'];
耦合器TrackCaseTypeId=json['耦合器TrackCaseTypeId'];
耦合器组ID=json['耦合器组ID'];
checklistRef=json['checklistRef'];
totalCount=json['totalCount'];
currentProgressId=json['currentProgressId'];
firstConcretingPersonId=json['firstConcretingPersonId'];
firstConcretingPersonDate=json['firstConcretingPersonDate'];
secondConcretingPersonId=json['secondConcretingPersonId'];
secondConcretingPersonDate=json['secondConcretingPersonDate'];
rcCheckerPersonId=json['rcCheckerPersonId'];
rseCheckerPersonId=json['rseCheckerPersonId'];
locationId=json['locationId'];
耦合器组=json['耦合器组']!=null
?新的耦合器组.fromJson(json['耦合器组'])
:null;
if(json['couplerTrackStageList']!=null){
耦合器跟踪stagelist=新列表();
json['耦合器跟踪stagelist'].forEach((v){
add(new-coupertrackstagelist.fromJson(v));
});
}
currentProgress=json['currentProgress']!=null
?新的CurrentProgress.fromJson(json['CurrentProgress'])
:null;
locationOfSite=json['locationOfSite']!=null
?新的LocationOfSite.fromJson(json['LocationOfSite'])
:null;
如果(json['耦合器TrackCaseReferenceList']!=null){
耦合器TrackCaseReferenceList=新列表();
json['耦合器TrackCaseReferenceList'].forEach((v){
对联TrackCaseReferenceList
.add(新的耦合器TrackCaseReferenceList.fromJson(v));
});
}
如果(json['耦合器TrackCaseOrderNumberList']!=null){
耦合器TrackCaseOrderNumber列表=
新列表();
json['耦合器TrackCaseOrderNumberList'].forEach((v){
耦合器TrackCaseOrderNumber列表
.add(新的耦合器TrackCaseOrderNumberList.fromJson(v));
});
}
如果(json['耦合器TrackCaseArrivalist']!=null){
耦合器TrackCaseArrivalist=新列表();
json['耦合器TrackCaseArrivalist'].forEach((v){
车钩车钩
.add(新的耦合器rackCaseArrivalist.fromJson(v));
});
}
checkingPersonRcName=json['checkingPersonRcName'];
checkingPersonRcFrequency=json['checkingPersonRcFrequency'];
checkingPersonRseName=json['checkingPersonRseName'];
checkingPersonRseFrequency=json['checkingPersonRseFrequency'];
orderNumber=json['orderNumber'];
referenceDesc=json['referenceDesc'];
耦合器TrackCaseArrivalDate=json['耦合器TrackCaseArrivalDate'];
checkingPersonRseGrade=json['checkingPersonRseGrade'];
checkingPersonRcGrade=json['checkingPersonRcGrade'];
}
映射到JSON(){
最终地图数据=新地图();
数据['耦合器TrackCaseId']=this.耦合器TrackCaseId;
数据['耦合器TrackCaseTypeId']=this.耦合器TrackCaseTypeId;
数据['耦合器组ID']=this.耦合器组ID;
数据['checklistRef']=this.checklistRef;
数据['totalCount']=this.totalCount;
数据['currentProgressId']=this.currentProgressId;
数据
import 'package:hive/hive.dart';
part 'hiveCoupler.g.dart';
@HiveType(typeId: 4)
class Coupler {
@HiveField(0)
int couplerTrackCaseId;
@HiveField(1)
int couplerTrackCaseTypeId;
@HiveField(2)
int couplerGroupId;
@HiveField(3)
String checklistRef;
@HiveField(4)
int totalCount;
@HiveField(5)
int currentProgressId;
@HiveField(6)
String firstConcretingPersonId;
@HiveField(7)
String firstConcretingPersonDate;
@HiveField(8)
String secondConcretingPersonId;
@HiveField(9)
String secondConcretingPersonDate;
@HiveField(10)
String rcCheckerPersonId;
@HiveField(11)
String rseCheckerPersonId;
@HiveField(12)
int locationId;
@HiveField(13)
CouplerGroup couplerGroup;
@HiveField(14)
List<CouplerTrackStageList> couplerTrackStageList;
@HiveField(15)
CurrentProgress currentProgress;
@HiveField(16)
LocationOfSite locationOfSite;
@HiveField(17)
List<CouplerTrackCaseReferenceList> couplerTrackCaseReferenceList;
@HiveField(18)
List<CouplerTrackCaseOrderNumberList> couplerTrackCaseOrderNumberList;
@HiveField(19)
List<CouplerTrackCaseArrivalList> couplerTrackCaseArrivalList;
@HiveField(20)
String checkingPersonRcName;
@HiveField(21)
int checkingPersonRcFrequency;
@HiveField(22)
String checkingPersonRseName;
@HiveField(23)
int checkingPersonRseFrequency;
@HiveField(24)
String orderNumber;
@HiveField(25)
String referenceDesc;
@HiveField(26)
String couplerTrackCaseArrivalDate;
@HiveField(27)
String checkingPersonRseGrade;
@HiveField(28)
String checkingPersonRcGrade;
Coupler(
{this.couplerTrackCaseId,
this.couplerTrackCaseTypeId,
this.couplerGroupId,
this.checklistRef,
this.totalCount,
this.currentProgressId,
this.firstConcretingPersonId,
this.firstConcretingPersonDate,
this.secondConcretingPersonId,
this.secondConcretingPersonDate,
this.rcCheckerPersonId,
this.rseCheckerPersonId,
this.locationId,
this.couplerGroup,
this.couplerTrackStageList,
this.currentProgress,
this.locationOfSite,
this.couplerTrackCaseReferenceList,
this.couplerTrackCaseOrderNumberList,
this.couplerTrackCaseArrivalList,
this.checkingPersonRcName,
this.checkingPersonRcFrequency,
this.checkingPersonRseName,
this.checkingPersonRseFrequency,
this.orderNumber,
this.referenceDesc,
this.couplerTrackCaseArrivalDate,
this.checkingPersonRseGrade,
this.checkingPersonRcGrade});
Coupler.fromJson(Map<String, dynamic> json) {
couplerTrackCaseId = json['couplerTrackCaseId'];
couplerTrackCaseTypeId = json['couplerTrackCaseTypeId'];
couplerGroupId = json['couplerGroupId'];
checklistRef = json['checklistRef'];
totalCount = json['totalCount'];
currentProgressId = json['currentProgressId'];
firstConcretingPersonId = json['firstConcretingPersonId'];
firstConcretingPersonDate = json['firstConcretingPersonDate'];
secondConcretingPersonId = json['secondConcretingPersonId'];
secondConcretingPersonDate = json['secondConcretingPersonDate'];
rcCheckerPersonId = json['rcCheckerPersonId'];
rseCheckerPersonId = json['rseCheckerPersonId'];
locationId = json['locationId'];
couplerGroup = json['couplerGroup'] != null
? new CouplerGroup.fromJson(json['couplerGroup'])
: null;
if (json['couplerTrackStageList'] != null) {
couplerTrackStageList = new List<CouplerTrackStageList>();
json['couplerTrackStageList'].forEach((v) {
couplerTrackStageList.add(new CouplerTrackStageList.fromJson(v));
});
}
currentProgress = json['currentProgress'] != null
? new CurrentProgress.fromJson(json['currentProgress'])
: null;
locationOfSite = json['locationOfSite'] != null
? new LocationOfSite.fromJson(json['locationOfSite'])
: null;
if (json['couplerTrackCaseReferenceList'] != null) {
couplerTrackCaseReferenceList = new List<CouplerTrackCaseReferenceList>();
json['couplerTrackCaseReferenceList'].forEach((v) {
couplerTrackCaseReferenceList
.add(new CouplerTrackCaseReferenceList.fromJson(v));
});
}
if (json['couplerTrackCaseOrderNumberList'] != null) {
couplerTrackCaseOrderNumberList =
new List<CouplerTrackCaseOrderNumberList>();
json['couplerTrackCaseOrderNumberList'].forEach((v) {
couplerTrackCaseOrderNumberList
.add(new CouplerTrackCaseOrderNumberList.fromJson(v));
});
}
if (json['couplerTrackCaseArrivalList'] != null) {
couplerTrackCaseArrivalList = new List<CouplerTrackCaseArrivalList>();
json['couplerTrackCaseArrivalList'].forEach((v) {
couplerTrackCaseArrivalList
.add(new CouplerTrackCaseArrivalList.fromJson(v));
});
}
checkingPersonRcName = json['checkingPersonRcName'];
checkingPersonRcFrequency = json['checkingPersonRcFrequency'];
checkingPersonRseName = json['checkingPersonRseName'];
checkingPersonRseFrequency = json['checkingPersonRseFrequency'];
orderNumber = json['orderNumber'];
referenceDesc = json['referenceDesc'];
couplerTrackCaseArrivalDate = json['couplerTrackCaseArrivalDate'];
checkingPersonRseGrade = json['checkingPersonRseGrade'];
checkingPersonRcGrade = json['checkingPersonRcGrade'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerTrackCaseId'] = this.couplerTrackCaseId;
data['couplerTrackCaseTypeId'] = this.couplerTrackCaseTypeId;
data['couplerGroupId'] = this.couplerGroupId;
data['checklistRef'] = this.checklistRef;
data['totalCount'] = this.totalCount;
data['currentProgressId'] = this.currentProgressId;
data['firstConcretingPersonId'] = this.firstConcretingPersonId;
data['firstConcretingPersonDate'] = this.firstConcretingPersonDate;
data['secondConcretingPersonId'] = this.secondConcretingPersonId;
data['secondConcretingPersonDate'] = this.secondConcretingPersonDate;
data['rcCheckerPersonId'] = this.rcCheckerPersonId;
data['rseCheckerPersonId'] = this.rseCheckerPersonId;
data['locationId'] = this.locationId;
if (this.couplerGroup != null) {
data['couplerGroup'] = this.couplerGroup.toJson();
}
if (this.couplerTrackStageList != null) {
data['couplerTrackStageList'] =
this.couplerTrackStageList.map((v) => v.toJson()).toList();
}
if (this.currentProgress != null) {
data['currentProgress'] = this.currentProgress.toJson();
}
if (this.locationOfSite != null) {
data['locationOfSite'] = this.locationOfSite.toJson();
}
if (this.couplerTrackCaseReferenceList != null) {
data['couplerTrackCaseReferenceList'] =
this.couplerTrackCaseReferenceList.map((v) => v.toJson()).toList();
}
if (this.couplerTrackCaseOrderNumberList != null) {
data['couplerTrackCaseOrderNumberList'] =
this.couplerTrackCaseOrderNumberList.map((v) => v.toJson()).toList();
}
if (this.couplerTrackCaseArrivalList != null) {
data['couplerTrackCaseArrivalList'] =
this.couplerTrackCaseArrivalList.map((v) => v.toJson()).toList();
}
data['checkingPersonRcName'] = this.checkingPersonRcName;
data['checkingPersonRcFrequency'] = this.checkingPersonRcFrequency;
data['checkingPersonRseName'] = this.checkingPersonRseName;
data['checkingPersonRseFrequency'] = this.checkingPersonRseFrequency;
data['orderNumber'] = this.orderNumber;
data['referenceDesc'] = this.referenceDesc;
data['couplerTrackCaseArrivalDate'] = this.couplerTrackCaseArrivalDate;
data['checkingPersonRseGrade'] = this.checkingPersonRseGrade;
data['checkingPersonRcGrade'] = this.checkingPersonRcGrade;
return data;
}
}
@HiveType(typeId: 5)
class CouplerGroup {
int couplerGroupId;
int couplerTypeId;
String siteId;
int towerId;
int floorId;
String groupDesc;
int rebarSum;
CouplerType couplerType;
CouplerTrackCaseType couplerTrackCaseType;
Site site;
Tower tower;
Floor floor;
List<CouplerGroupRebarSetups> couplerGroupRebarSetups;
List<CouplerGroupImages> couplerGroupImages;
CouplerGroup(
{this.couplerGroupId,
this.couplerTypeId,
this.siteId,
this.towerId,
this.floorId,
this.groupDesc,
this.rebarSum,
this.couplerType,
this.couplerTrackCaseType,
this.site,
this.tower,
this.floor,
this.couplerGroupRebarSetups,
this.couplerGroupImages});
CouplerGroup.fromJson(Map<String, dynamic> json) {
couplerGroupId = json['couplerGroupId'];
couplerTypeId = json['couplerTypeId'];
siteId = json['siteId'];
towerId = json['towerId'];
floorId = json['floorId'];
groupDesc = json['groupDesc'];
rebarSum = json['rebarSum'];
couplerType = json['couplerType'] != null
? new CouplerType.fromJson(json['couplerType'])
: null;
couplerTrackCaseType = json['couplerTrackCaseType'] != null
? new CouplerTrackCaseType.fromJson(json['couplerTrackCaseType'])
: null;
site = json['site'] != null ? new Site.fromJson(json['site']) : null;
tower = json['tower'] != null ? new Tower.fromJson(json['tower']) : null;
floor = json['floor'] != null ? new Floor.fromJson(json['floor']) : null;
if (json['couplerGroupRebarSetups'] != null) {
couplerGroupRebarSetups = new List<CouplerGroupRebarSetups>();
json['couplerGroupRebarSetups'].forEach((v) {
couplerGroupRebarSetups.add(new CouplerGroupRebarSetups.fromJson(v));
});
}
if (json['couplerGroupImages'] != null) {
couplerGroupImages = new List<CouplerGroupImages>();
json['couplerGroupImages'].forEach((v) {
couplerGroupImages.add(new CouplerGroupImages.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerGroupId'] = this.couplerGroupId;
data['couplerTypeId'] = this.couplerTypeId;
data['siteId'] = this.siteId;
data['towerId'] = this.towerId;
data['floorId'] = this.floorId;
data['groupDesc'] = this.groupDesc;
data['rebarSum'] = this.rebarSum;
if (this.couplerType != null) {
data['couplerType'] = this.couplerType.toJson();
}
if (this.couplerTrackCaseType != null) {
data['couplerTrackCaseType'] = this.couplerTrackCaseType.toJson();
}
if (this.site != null) {
data['site'] = this.site.toJson();
}
if (this.tower != null) {
data['tower'] = this.tower.toJson();
}
if (this.floor != null) {
data['floor'] = this.floor.toJson();
}
if (this.couplerGroupRebarSetups != null) {
data['couplerGroupRebarSetups'] =
this.couplerGroupRebarSetups.map((v) => v.toJson()).toList();
}
if (this.couplerGroupImages != null) {
data['couplerGroupImages'] =
this.couplerGroupImages.map((v) => v.toJson()).toList();
}
return data;
}
}
@HiveType(typeId: 6)
class CouplerType {
int couplerTypeId;
int couplerTrackCaseTypeId;
String couplerTypeDesc;
double rcInspectFrequency;
double rseInspectFrequency;
CouplerType(
{this.couplerTypeId,
this.couplerTrackCaseTypeId,
this.couplerTypeDesc,
this.rcInspectFrequency,
this.rseInspectFrequency});
CouplerType.fromJson(Map<String, dynamic> json) {
couplerTypeId = json['couplerTypeId'];
couplerTrackCaseTypeId = json['couplerTrackCaseTypeId'];
couplerTypeDesc = json['couplerTypeDesc'];
rcInspectFrequency = json['rcInspectFrequency'];
rseInspectFrequency = json['rseInspectFrequency'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerTypeId'] = this.couplerTypeId;
data['couplerTrackCaseTypeId'] = this.couplerTrackCaseTypeId;
data['couplerTypeDesc'] = this.couplerTypeDesc;
data['rcInspectFrequency'] = this.rcInspectFrequency;
data['rseInspectFrequency'] = this.rseInspectFrequency;
return data;
}
}
@HiveType(typeId: 7)
class CouplerTrackCaseType {
int couplerTrackCaseTypeId;
String caseTypeDesc;
CouplerTrackCaseType({this.couplerTrackCaseTypeId, this.caseTypeDesc});
CouplerTrackCaseType.fromJson(Map<String, dynamic> json) {
couplerTrackCaseTypeId = json['couplerTrackCaseTypeId'];
caseTypeDesc = json['caseTypeDesc'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerTrackCaseTypeId'] = this.couplerTrackCaseTypeId;
data['caseTypeDesc'] = this.caseTypeDesc;
return data;
}
}
@HiveType(typeId: 8)
class Site {
String siteId;
String siteDesc;
String handGeometry;
String teamId;
String contractNo;
String startDate;
String contractTypeId;
String companyId;
String parentSiteId;
String handkeyMifare;
String archived;
String projectName;
String isDegrade;
Site(
{this.siteId,
this.siteDesc,
this.handGeometry,
this.teamId,
this.contractNo,
this.startDate,
this.contractTypeId,
this.companyId,
this.parentSiteId,
this.handkeyMifare,
this.archived,
this.projectName,
this.isDegrade});
Site.fromJson(Map<String, dynamic> json) {
siteId = json['siteId'];
siteDesc = json['siteDesc'];
handGeometry = json['handGeometry'];
teamId = json['teamId'];
contractNo = json['contractNo'];
startDate = json['startDate'];
contractTypeId = json['contractTypeId'];
companyId = json['companyId'];
parentSiteId = json['parentSiteId'];
handkeyMifare = json['handkeyMifare'];
archived = json['archived'];
projectName = json['projectName'];
isDegrade = json['isDegrade'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['siteId'] = this.siteId;
data['siteDesc'] = this.siteDesc;
data['handGeometry'] = this.handGeometry;
data['teamId'] = this.teamId;
data['contractNo'] = this.contractNo;
data['startDate'] = this.startDate;
data['contractTypeId'] = this.contractTypeId;
data['companyId'] = this.companyId;
data['parentSiteId'] = this.parentSiteId;
data['handkeyMifare'] = this.handkeyMifare;
data['archived'] = this.archived;
data['projectName'] = this.projectName;
data['isDegrade'] = this.isDegrade;
return data;
}
}
@HiveType(typeId: 9)
class Tower {
int towerId;
String towerDesc;
String enable;
String towerShortName;
String towerDescStr;
Tower(
{this.towerId,
this.towerDesc,
this.enable,
this.towerShortName,
this.towerDescStr});
Tower.fromJson(Map<String, dynamic> json) {
towerId = json['towerId'];
towerDesc = json['towerDesc'];
enable = json['enable'];
towerShortName = json['towerShortName'];
towerDescStr = json['towerDescStr'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['towerId'] = this.towerId;
data['towerDesc'] = this.towerDesc;
data['enable'] = this.enable;
data['towerShortName'] = this.towerShortName;
data['towerDescStr'] = this.towerDescStr;
return data;
}
}
@HiveType(typeId: 10)
class Floor {
int floorId;
String floorDesc;
String enable;
String floorShortName;
String floorDescStr;
Floor(
{this.floorId,
this.floorDesc,
this.enable,
this.floorShortName,
this.floorDescStr});
Floor.fromJson(Map<String, dynamic> json) {
floorId = json['floorId'];
floorDesc = json['floorDesc'];
enable = json['enable'];
floorShortName = json['floorShortName'];
floorDescStr = json['floorDescStr'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['floorId'] = this.floorId;
data['floorDesc'] = this.floorDesc;
data['enable'] = this.enable;
data['floorShortName'] = this.floorShortName;
data['floorDescStr'] = this.floorDescStr;
return data;
}
}
@HiveType(typeId: 11)
class CouplerGroupRebarSetups {
int couplerGroupRebarSetupId;
int couplerGroupId;
int referenceRebarFrom;
int referenceRebarTo;
String referenceDesc;
String rebarDesc;
String flagMultiple;
List<CouplerGroupRebars> couplerGroupRebars;
CouplerGroupRebarSetups(
{this.couplerGroupRebarSetupId,
this.couplerGroupId,
this.referenceRebarFrom,
this.referenceRebarTo,
this.referenceDesc,
this.rebarDesc,
this.flagMultiple,
this.couplerGroupRebars});
CouplerGroupRebarSetups.fromJson(Map<String, dynamic> json) {
couplerGroupRebarSetupId = json['couplerGroupRebarSetupId'];
couplerGroupId = json['couplerGroupId'];
referenceRebarFrom = json['referenceRebarFrom'];
referenceRebarTo = json['referenceRebarTo'];
referenceDesc = json['referenceDesc'];
rebarDesc = json['rebarDesc'];
flagMultiple = json['flagMultiple'];
if (json['couplerGroupRebars'] != null) {
couplerGroupRebars = new List<CouplerGroupRebars>();
json['couplerGroupRebars'].forEach((v) {
couplerGroupRebars.add(new CouplerGroupRebars.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['couplerGroupRebarSetupId'] = this.couplerGroupRebarSetupId;
data['couplerGroupId'] = this.couplerGroupId;
data['referenceRebarFrom'] = this.referenceRebarFrom;
data['referenceRebarTo'] = this.referenceRebarTo;
data['referenceDesc'] = this.referenceDesc;
data['rebarDesc'] = this.rebarDesc;
data['flagMultiple'] = this.flagMultiple;
if (this.couplerGroupRebars != null) {
data['couplerGroupRebars'] =
this.couplerGroupRebars.map((v) => v.toJson()).toList();
}
return data;
}
}