|
|
|
|
@ -3,9 +3,9 @@ import 'package:test_sa/models/new_models/room_model.dart';
|
|
|
|
|
import '../base.dart';
|
|
|
|
|
|
|
|
|
|
class TrafDepartment extends Base {
|
|
|
|
|
TrafDepartment(
|
|
|
|
|
{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
|
|
|
|
|
TrafDepartment({
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
TrafDepartment.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
departmentName = json['departmentName'] ?? json['name'];
|
|
|
|
|
@ -15,7 +15,6 @@ class TrafDepartment extends Base {
|
|
|
|
|
costCenterName = json['costCenterName'];
|
|
|
|
|
name = json['name'];
|
|
|
|
|
id = json['id'];
|
|
|
|
|
identifier = id?.toString() ?? '';
|
|
|
|
|
createdBy = json['createdBy'];
|
|
|
|
|
createdDate = json['createdDate'];
|
|
|
|
|
modifiedBy = json['modifiedBy'];
|
|
|
|
|
|