74 lines
1.6 KiB
Dart
74 lines
1.6 KiB
Dart
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||
|
|
||
|
part of angel_orm.generator.models.book;
|
||
|
|
||
|
// **************************************************************************
|
||
|
// JsonModelGenerator
|
||
|
// **************************************************************************
|
||
|
|
||
|
@generatedSerializable
|
||
|
class Book extends _Book {
|
||
|
Book(
|
||
|
{this.id,
|
||
|
this.author,
|
||
|
this.partnerAuthor,
|
||
|
this.authorId,
|
||
|
this.name,
|
||
|
this.createdAt,
|
||
|
this.updatedAt});
|
||
|
|
||
|
@override
|
||
|
final String id;
|
||
|
|
||
|
@override
|
||
|
final dynamic author;
|
||
|
|
||
|
@override
|
||
|
final dynamic partnerAuthor;
|
||
|
|
||
|
@override
|
||
|
final int authorId;
|
||
|
|
||
|
@override
|
||
|
final String name;
|
||
|
|
||
|
@override
|
||
|
final DateTime createdAt;
|
||
|
|
||
|
@override
|
||
|
final DateTime updatedAt;
|
||
|
|
||
|
Book copyWith(
|
||
|
{String id,
|
||
|
dynamic author,
|
||
|
dynamic partnerAuthor,
|
||
|
int authorId,
|
||
|
String name,
|
||
|
DateTime createdAt,
|
||
|
DateTime updatedAt}) {
|
||
|
return new Book(
|
||
|
id: id ?? this.id,
|
||
|
author: author ?? this.author,
|
||
|
partnerAuthor: partnerAuthor ?? this.partnerAuthor,
|
||
|
authorId: authorId ?? this.authorId,
|
||
|
name: name ?? this.name,
|
||
|
createdAt: createdAt ?? this.createdAt,
|
||
|
updatedAt: updatedAt ?? this.updatedAt);
|
||
|
}
|
||
|
|
||
|
bool operator ==(other) {
|
||
|
return other is _Book &&
|
||
|
other.id == id &&
|
||
|
other.author == author &&
|
||
|
other.partnerAuthor == partnerAuthor &&
|
||
|
other.authorId == authorId &&
|
||
|
other.name == name &&
|
||
|
other.createdAt == createdAt &&
|
||
|
other.updatedAt == updatedAt;
|
||
|
}
|
||
|
|
||
|
Map<String, dynamic> toJson() {
|
||
|
return BookSerializer.toMap(this);
|
||
|
}
|
||
|
}
|