28 lines
573 B
Dart
28 lines
573 B
Dart
library angel_serialize.test.models.author;
|
|
|
|
import 'package:angel_framework/common.dart';
|
|
import 'package:angel_serialize/angel_serialize.dart';
|
|
import 'book.dart';
|
|
|
|
part 'author.g.dart';
|
|
|
|
part 'author.serializer.g.dart';
|
|
|
|
@serializable
|
|
abstract class _Author extends Model {
|
|
String get name;
|
|
int get age;
|
|
List<Book> get books;
|
|
Book get newestBook;
|
|
|
|
@exclude
|
|
String get secret;
|
|
|
|
@Exclude(canDeserialize: true)
|
|
String get obscured;
|
|
}
|
|
|
|
@Serializable(serializers: Serializers.all)
|
|
abstract class _Library extends Model {
|
|
Map<String, Book> get collection;
|
|
}
|