You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.3 KiB
Dart
36 lines
1.3 KiB
Dart
import 'package:test_sa/models/base.dart';
|
|
|
|
class MedicalDepartmentModel extends Base {
|
|
MedicalDepartmentModel(
|
|
{this.departmentName, this.departmentCode, this.ntCode, this.costCenterNumber, this.costCenterName, this.name, this.id, this.createdBy, this.createdDate, this.modifiedBy, this.modifiedDate})
|
|
: super(identifier: id?.toString() ?? '', name: departmentName); // Handle potential null id
|
|
|
|
MedicalDepartmentModel.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
identifier = id?.toString() ?? '';
|
|
name = json['departmentName'] ?? json['name'];
|
|
departmentName = json['departmentName'] ?? json['name'];
|
|
departmentCode = json['departmentCode'];
|
|
ntCode = json['ntCode'];
|
|
costCenterNumber = json['costCenterNumber'];
|
|
costCenterName = json['costCenterName'];
|
|
name = json['name'];
|
|
createdBy = json['createdBy'];
|
|
createdDate = json['createdDate'];
|
|
modifiedBy = json['modifiedBy'];
|
|
modifiedDate = json['modifiedDate'];
|
|
}
|
|
|
|
num? id; // Now nullable
|
|
String? departmentName; // Now nullable
|
|
String? departmentCode; // Now nullable
|
|
String? ntCode;
|
|
String? costCenterNumber;
|
|
String? costCenterName;
|
|
String? name;
|
|
String? createdBy;
|
|
String? createdDate;
|
|
String? modifiedBy;
|
|
String? modifiedDate;
|
|
}
|