32 lines
856 B
Dart
32 lines
856 B
Dart
class ProjectSummaryApiModel {
|
|
final int id;
|
|
final String name;
|
|
final String projectAddress;
|
|
final String contactPerson;
|
|
final DateTime startDate;
|
|
final DateTime endDate;
|
|
final int projectStatusId;
|
|
|
|
ProjectSummaryApiModel({
|
|
required this.id,
|
|
required this.name,
|
|
required this.projectAddress,
|
|
required this.contactPerson,
|
|
required this.startDate,
|
|
required this.endDate,
|
|
required this.projectStatusId,
|
|
});
|
|
|
|
factory ProjectSummaryApiModel.fromJson(Map<String, dynamic> json) {
|
|
return ProjectSummaryApiModel(
|
|
id: json['id'],
|
|
name: json['name'],
|
|
projectAddress: json['projectAddress'],
|
|
contactPerson: json['contactPerson'],
|
|
startDate: DateTime.parse(json['startDate']),
|
|
endDate: DateTime.parse(json['endDate']),
|
|
projectStatusId: json['projectStatusId'],
|
|
);
|
|
}
|
|
}
|