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.
cloudsolutions-atoms/lib/modules/signup/models/department_model.dart

38 lines
935 B
Dart

import 'package:test_sa/models/base.dart';
class DepartmentModel extends Base {
final int? id;
final String? departmentName;
final String? departmentCode;
final String? ntCode;
final String? operationalHours;
DepartmentModel({
this.id,
this.departmentName,
this.departmentCode,
this.ntCode,
this.operationalHours,
}) : super(name: departmentName, identifier: id?.toString());
factory DepartmentModel.fromJson(Map<String, dynamic> json) {
return DepartmentModel(
id: json['id'],
departmentName: json['departmentName'],
departmentCode: json['departmentCode'],
ntCode: json['ntCode'],
operationalHours: json['operationalHours'],
);
}
Map<String, dynamic> toJson() {
return {
'id': id,
'departmentName': departmentName,
'departmentCode': departmentCode,
'ntCode': ntCode,
'operationalHours': operationalHours,
};
}
}