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.
 
 
 
 
 
 

60 lines
1.6 KiB

class CustomerModel {
int? id;
String? name;
String? code_customer;
String? lot_no;
String? nip;
String? no_hp;
DateTime? tgl_lahir;
String? jenis_kelamin;
String? agama;
String? created_by;
String? updated_by;
CustomerModel({
this.id,
this.name,
this.code_customer,
this.lot_no,
this.nip,
this.no_hp,
this.tgl_lahir,
this.jenis_kelamin,
this.agama,
this.created_by,
this.updated_by,
});
factory CustomerModel.fromJson(Map<String, dynamic> json) {
return CustomerModel(
id: json['id'],
name: json['name'] != null ? json['name'] : null,
code_customer:
json['code_customer'] != null ? json['code_customer'] : null,
lot_no: json['lot_no'] != null ? json['lot_no'] : null,
nip: json['nip'] != null ? json['nip'] : null,
no_hp: json['no_hp'] != null ? json['no_hp'] : null,
tgl_lahir:
json['tgl_lahir'] != null ? DateTime.parse(json['tgl_lahir']) : null,
jenis_kelamin:
json['jenis_kelamin'] != null ? json['jenis_kelamin'] : null,
agama: json['agama'] != null ? json['agama'] : null,
created_by: json['created_by'] != null ? json['created_by'] : null,
updated_by: json['updated_by'] != null ? json['updated_by'] : null,
);
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'code_customer': code_customer,
'lot_no': lot_no,
'nip': nip,
'no_hp': no_hp,
'tgl_lahir': tgl_lahir,
'jenis_kelamin': jenis_kelamin,
'agama': agama,
'created_by': created_by,
'updated_by': updated_by,
};
}