Siopas Inventory PETI for ISTW Mobile
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

84 lines
2.5 KiB

class DisposalPetiModel {
int? id;
String? mobile_id;
int? peti_id;
int? customer_id;
int? warehouse_id;
DateTime? date_disposal;
String? description;
String? status_disposal;
DateTime? created_at;
DateTime? updated_at;
DateTime? deleted_at;
String? created_by;
String? updated_by;
DisposalPetiModel({
this.id,
this.mobile_id,
this.peti_id,
this.customer_id,
this.warehouse_id,
this.date_disposal,
this.description,
this.status_disposal,
this.created_at,
this.updated_at,
this.deleted_at,
this.created_by,
this.updated_by,
});
factory DisposalPetiModel.fromJson(Map<String, dynamic> json) =>
DisposalPetiModel(
id: json['id'],
mobile_id:
json['mobile_id'] != null ? json['mobile_id'].toString() : null,
peti_id: json['peti_id'] != null
? int.parse(json['peti_id'].toString())
: null,
customer_id: json['customer_id'] != null
? int.parse(json['customer_id'].toString())
: null,
warehouse_id: json['warehouse_id'] != null
? int.parse(json['warehouse_id'].toString())
: null,
date_disposal: json['date_disposal'] != null
? DateTime.parse(json['date_disposal'])
: null,
description:
json['description'] != null ? json['description'].toString() : null,
status_disposal: json['status_disposal'] != null
? json['status_disposal'].toString()
: null,
created_at: json['created_at'] != null
? DateTime.parse(json['created_at'])
: null,
updated_at: json['updated_at'] != null
? DateTime.parse(json['updated_at'])
: null,
deleted_at: json['deleted_at'] != null
? DateTime.parse(json['deleted_at'])
: null,
created_by:
json['created_by'] != null ? json['created_by'].toString() : null,
updated_by:
json['updated_by'] != null ? json['updated_by'].toString() : null,
);
Map<String, dynamic> toJson() => {
"id": id,
"mobile_id": mobile_id,
"peti_id": peti_id,
"customer_id": customer_id,
"warehouse_id": warehouse_id,
"date_disposal": date_disposal,
"description": description,
"status_disposal": status_disposal,
"created_at": created_at,
"updated_at": updated_at,
"deleted_at": deleted_at,
"created_by": created_by,
"updated_by": updated_by,
};
}