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.
32 lines
693 B
Dart
32 lines
693 B
Dart
import 'package:test_sa/models/new_models/assigned_employee.dart';
|
|
|
|
class AssistantEmployees {
|
|
AssistantEmployees({
|
|
this.id,
|
|
this.user,
|
|
});
|
|
|
|
AssistantEmployees.fromJson(dynamic json) {
|
|
id = json['id'];
|
|
user = json['user'] != null ? AssignedEmployee.fromJson(json['user']) : null;
|
|
}
|
|
num id;
|
|
AssignedEmployee user;
|
|
AssistantEmployees copyWith({
|
|
num id,
|
|
AssignedEmployee user,
|
|
}) =>
|
|
AssistantEmployees(
|
|
id: id ?? this.id,
|
|
user: user ?? this.user,
|
|
);
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['id'] = id;
|
|
if (user != null) {
|
|
map['user'] = user.toJson();
|
|
}
|
|
return map;
|
|
}
|
|
}
|