platform/packages/orm/angel_orm/example/main.g.dart

73 lines
1.6 KiB
Dart
Raw Normal View History

2018-12-01 17:21:34 +00:00
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'main.dart';
// **************************************************************************
// JsonModelGenerator
// **************************************************************************
@generatedSerializable
class Employee extends _Employee {
Employee(
{this.id,
this.firstName,
this.lastName,
this.salary,
this.createdAt,
this.updatedAt});
@override
2021-05-02 07:32:24 +00:00
final String? id;
2018-12-01 17:21:34 +00:00
@override
2021-05-02 07:32:24 +00:00
final String? firstName;
2018-12-01 17:21:34 +00:00
@override
2021-05-02 07:32:24 +00:00
final String? lastName;
2018-12-01 17:21:34 +00:00
@override
2021-05-02 07:32:24 +00:00
final double? salary;
2018-12-01 17:21:34 +00:00
@override
2021-05-02 07:32:24 +00:00
final DateTime? createdAt;
2018-12-01 17:21:34 +00:00
@override
2021-05-02 07:32:24 +00:00
final DateTime? updatedAt;
2018-12-01 17:21:34 +00:00
Employee copyWith(
2021-05-02 07:32:24 +00:00
{String? id,
String? firstName,
String? lastName,
double? salary,
DateTime? createdAt,
DateTime? updatedAt}) {
2019-07-04 21:30:21 +00:00
return Employee(
2018-12-01 17:21:34 +00:00
id: id ?? this.id,
firstName: firstName ?? this.firstName,
lastName: lastName ?? this.lastName,
salary: salary ?? this.salary,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt);
}
2021-06-26 13:13:43 +00:00
@override
2018-12-01 17:21:34 +00:00
bool operator ==(other) {
return other is _Employee &&
other.id == id &&
other.firstName == firstName &&
other.lastName == lastName &&
other.salary == salary &&
other.createdAt == createdAt &&
other.updatedAt == updatedAt;
}
@override
int get hashCode {
return hashObjects([id, firstName, lastName, salary, createdAt, updatedAt]);
}
Map<String, dynamic> toJson() {
return EmployeeSerializer.toMap(this);
}
}