marco.pms.mobileapp/lib/model/project_model.dart
Vaibhav Surve a5dd5e19fc Add Windows runner implementation for Flutter application
- Created CMakeLists.txt for Flutter and runner components.
- Implemented resource script (Runner.rc) for application metadata.
- Developed main entry point (main.cpp) for the Windows application.
- Added FlutterWindow class to manage the Flutter view within a Win32 window.
- Implemented utility functions for console management and command line argument parsing.
- Established Win32Window class for high DPI-aware window handling.
- Included application icon and manifest for proper Windows integration.
- Set up build configurations and dependencies for the Flutter application on Windows.
2025-04-23 09:55:31 +05:30

63 lines
2.1 KiB
Dart

class ProjectModel {
final int id; // Unique identifier for the project
final String name; // Name of the project
final String projectAddress; // Address of the project
final String contactPerson; // Contact person for the project
final DateTime startDate; // Start date of the project
final DateTime endDate; // End date of the project
final int teamSize; // Number of people in the team
final int completedWork; // Completed work percentage
final int plannedWork; // Planned work for the project
final int projectStatusId; // Status ID for the project
final int tenantId; // Tenant ID associated with the project
// Constructor
ProjectModel({
required this.id,
required this.name,
required this.projectAddress,
required this.contactPerson,
required this.startDate,
required this.endDate,
required this.teamSize,
required this.completedWork,
required this.plannedWork,
required this.projectStatusId,
required this.tenantId,
});
// Factory method to create an instance of ProjectModel from a JSON object
factory ProjectModel.fromJson(Map<String, dynamic> json) {
return ProjectModel(
id: json['id'],
name: json['name'],
projectAddress: json['projectAddress'],
contactPerson: json['contactPerson'],
startDate: DateTime.parse(json['startDate']),
endDate: DateTime.parse(json['endDate']),
teamSize: json['teamSize'],
completedWork: json['completedWork'],
plannedWork: json['plannedWork'],
projectStatusId: json['projectStatusId'],
tenantId: json['tenantId'],
);
}
// Method to convert the ProjectModel instance back to a JSON object
Map<String, dynamic> toJson() {
return {
'id': id,
'name': name,
'projectAddress': projectAddress,
'contactPerson': contactPerson,
'startDate': startDate.toIso8601String(),
'endDate': endDate.toIso8601String(),
'teamSize': teamSize,
'completedWork': completedWork,
'plannedWork': plannedWork,
'projectStatusId': projectStatusId,
'tenantId': tenantId,
};
}
}