nc-photos/app/lib/entity/person.dart

45 lines
860 B
Dart
Raw Normal View History

import 'package:equatable/equatable.dart';
import 'package:nc_photos/account.dart';
class Person with EquatableMixin {
Person({
2021-09-10 19:10:26 +02:00
required this.name,
required this.thumbFaceId,
required this.count,
});
2021-09-10 19:10:26 +02:00
@override
toString() {
return "$runtimeType {"
"name: '$name', "
"thumbFaceId: '$thumbFaceId', "
"count: '$count', "
"}";
}
@override
get props => [
name,
2021-09-10 19:10:26 +02:00
thumbFaceId,
count,
];
2021-09-10 19:10:26 +02:00
final String name;
final int thumbFaceId;
final int count;
}
class PersonRepo {
const PersonRepo(this.dataSrc);
/// See [PersonDataSource.list]
2021-09-15 08:58:06 +02:00
Future<List<Person>> list(Account account) => dataSrc.list(account);
final PersonDataSource dataSrc;
}
abstract class PersonDataSource {
/// List all people for this account
Future<List<Person>> list(Account account);
}