toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = Map<String, dynamic>();
data['createdByUserName'] = this.createdByUserName;
data['updatedByUserName'] = this.updatedByUserName;
data['createdBy'] = this.createdBy;
data['createdDate'] = this.createdDate;
data['updatedBy'] = this.updatedBy;
data['updatedDate'] = this.updatedDate;
data['id'] = this.id;
data['ownerId'] = this.ownerId;
data['description'] = this.description;
if (this.address != null) {
data['address'] = this.address!.toJson();
}
data['openingTime'] = this.openingTime;
data['closingTime'] = this.closingTime;
data['emailId'] = this.emailId;
data['contactNumber'] = this.contactNumber;
data['hasStoreInventory'] = this.hasStoreInventory;
data['defaultAmount'] = this.defaultAmount;
if (this.status != null) {
data['status'] = this.status!.toJson();
}
data['name'] = this.name;
data['archived'] = this.archived;
data['location'] = this.location;
data['createdByName'] = this.createdByName;
data['updatedByName'] = this.updatedByName;
data['agentOwnerId'] = this.agentOwnerId;
if (this.denominations != null) {
data['denominations'] =
this.denominations!.map((v) => v.toJson()).toList();
}
data['glCode'] = this.glCode;
if (this.department != null) {
data['department'] = this.department!.toJson();
}
data['satchelNumber'] = this.satchelNumber;
data['satchelNumbers'] = this.satchelNumbers;
data['activeStoreForUser'] = this.activeStoreForUser;
if (this.satchelInfoList != null) {
data['satchelInfoList'] =
this.satchelInfoList!.map((v) => v.toJson()).toList();
}
return data;
}