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.
 
 
 
 
 
 

78 lines
2.2 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;
DateTime? created_at;
DateTime? updated_at;
DateTime? deleted_at;
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,
this.created_at,
this.updated_at,
this.deleted_at,
});
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,
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,
);
}
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,
'created_at': created_at,
'updated_at': updated_at,
'deleted_at': deleted_at,
};
}