mobile_skt/lib/models/sale_quotaion_group.model.dart

34 lines
864 B
Dart

class SaleQuotationGroupModel {
SaleQuotationGroupModel({
required this.id,
required this.createdAt,
required this.updatedAt,
required this.name,
required this.isDelete,
});
final int? id;
final DateTime? createdAt;
final DateTime? updatedAt;
final String? name;
final int? isDelete;
factory SaleQuotationGroupModel.fromJson(Map<String, dynamic> json) {
return SaleQuotationGroupModel(
id: json["id"],
createdAt: DateTime.tryParse(json["createdAt"] ?? ""),
updatedAt: DateTime.tryParse(json["updatedAt"] ?? ""),
name: json["name"],
isDelete: json["isDelete"],
);
}
Map<String, dynamic> toJson() => {
"id": id,
"createdAt": createdAt?.toIso8601String(),
"updatedAt": updatedAt?.toIso8601String(),
"name": name,
"isDelete": isDelete,
};
}