added identifier for loan request department model

cleaner_module_new_flow
WaseemAbbasi22 3 weeks ago
parent eea2f6b4e9
commit f2b472f4df

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

Loading…
Cancel
Save