platform/angel_serialize_generator/test/models/author.dart

29 lines
545 B
Dart
Raw Normal View History

2017-12-07 07:08:32 +00:00
library angel_serialize.test.models.author;
import 'package:angel_framework/common.dart';
import 'package:angel_serialize/angel_serialize.dart';
import 'book.dart';
2018-03-29 19:58:36 +00:00
2017-12-07 07:08:32 +00:00
part 'author.g.dart';
2018-03-29 19:58:36 +00:00
2018-02-28 01:10:57 +00:00
part 'author.serializer.g.dart';
2017-12-07 07:08:32 +00:00
@serializable
abstract class _Author extends Model {
String name;
int age;
List<Book> books;
Book newestBook;
2017-12-07 07:08:32 +00:00
@exclude
String secret;
@Exclude(canDeserialize: true)
String obscured;
2017-12-07 07:08:32 +00:00
}
2018-03-29 19:58:36 +00:00
@Serializable(serializers: Serializers.all)
2017-12-07 07:08:32 +00:00
abstract class _Library extends Model {
Map<String, Book> collection;
2018-02-28 00:36:53 +00:00
}