TblTRLoadingWeighingTO.fromJson constructor

TblTRLoadingWeighingTO.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory TblTRLoadingWeighingTO.fromJson(Map<String, dynamic> json) {
  return TblTRLoadingWeighingTO(
    idWeighing: json['IdWeighing'] as int?,
    vehicleNo: json['VehicleNo'] as String?,
    loadingId: json['LoadingId'] as int?,
    loadingTypeId: json['LoadingTypeId'] as int?,
    tareWeight: json['TareWeight'] as num?,
    grossWeight: json['GrossWeight'] as num?,
    actualWeight: json['ActualWeight'] as num?,
    netWeight: json['NetWeight'] as num?,
    rstNumber: json['RstNumber'] as String?,
    weighingStageId: json['WeighingStageId'] as int?,
    weighingMachineId: json['WeighingMachineId'] as int?,
    weighingMeasureTypeId: json['WeighingMeasureTypeId'] as int?,
    createdBy: json['CreatedBy'] as int?,
    updatedBy: json['UpdatedBy'] as int?,
    createdOn:
        json['CreatedOn'] != null ? DateTime.parse(json['CreatedOn']) : null,
    updatedOn:
        json['UpdatedOn'] != null ? DateTime.parse(json['UpdatedOn']) : null,
    isActive: json['IsActive'] as int?,
    machineName: json['MachineName'] as String?,
    isWeighingCompleted: json['IsWeighingCompleted'] as int?,
    machineIP: json['MachineIP'] as String?,
    rstNo: json['RSTNo'] as String?,
    wbVehicleNo: json['WBVehicleNo'] as String?,
    commodity: json['Commodity'] as String?,
    loadOrUnload: json['LoadOrUnload'] as String?,
    flag: json['Flag'] as String?,
    material: json['Material'] as String?,
    weighingDate: json['WeighingDate'] != null
        ? DateTime.parse(json['WeighingDate'])
        : null,
    weighingTime: json['WeighingTime'] != null
        ? DateTime.parse(json['WeighingTime'])
        : null,
    phase: json['Phase'] as String?,
    manualGateOpenTO: json['ManualGateOpenTO'] != null
        ? ManualGateOpenTO.fromJson(json['ManualGateOpenTO'])
        : null,
    wtMismatchCmt: json['WtMismatchCmt'] as String?,
    wtFtNotFoundCmt: json['WtFtNotFoundCmt'] as String?,
    wtVehicleNoMismatchCmt: json['WtVehicleNoMismatchCmt'] as String?,
  );
}