|
|
|
|
@ -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,6 +15,7 @@ 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'];
|
|
|
|
|
@ -33,24 +34,22 @@ class TrafDepartment extends Base {
|
|
|
|
|
String? modifiedBy;
|
|
|
|
|
String? modifiedDate;
|
|
|
|
|
|
|
|
|
|
// TrafDepartment copyWith({
|
|
|
|
|
// num? id, // Parameters are now nullable
|
|
|
|
|
// String? departmentName,
|
|
|
|
|
// String? departmentCode,
|
|
|
|
|
// String? departmentId,
|
|
|
|
|
// String? ntCode,
|
|
|
|
|
// List<Rooms>? rooms,
|
|
|
|
|
// }) =>
|
|
|
|
|
// TrafDepartment(
|
|
|
|
|
// id: id ?? this.id,
|
|
|
|
|
// departmentName: departmentName ?? this.departmentName,
|
|
|
|
|
// departmentCode: departmentCode ?? this.departmentCode,
|
|
|
|
|
// departmentId: departmentId ?? this.departmentId,
|
|
|
|
|
// ntCode: ntCode ?? this.ntCode,
|
|
|
|
|
// rooms: rooms ?? this.rooms,
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TrafDepartment copyWith({
|
|
|
|
|
// num? id, // Parameters are now nullable
|
|
|
|
|
// String? departmentName,
|
|
|
|
|
// String? departmentCode,
|
|
|
|
|
// String? departmentId,
|
|
|
|
|
// String? ntCode,
|
|
|
|
|
// List<Rooms>? rooms,
|
|
|
|
|
// }) =>
|
|
|
|
|
// TrafDepartment(
|
|
|
|
|
// id: id ?? this.id,
|
|
|
|
|
// departmentName: departmentName ?? this.departmentName,
|
|
|
|
|
// departmentCode: departmentCode ?? this.departmentCode,
|
|
|
|
|
// departmentId: departmentId ?? this.departmentId,
|
|
|
|
|
// ntCode: ntCode ?? this.ntCode,
|
|
|
|
|
// rooms: rooms ?? this.rooms,
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// class TrafDepartment extends Base {
|
|
|
|
|
|