mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: memories sync (#19644)
* feat: memories sync * Update mobile/lib/infrastructure/repositories/sync_stream.repository.dart Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update mobile/lib/infrastructure/repositories/sync_stream.repository.dart Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * show sync information * tests and pr feedback * pr feedback --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
7855974a29
commit
445f9174ea
16 changed files with 3491 additions and 33 deletions
36
mobile/lib/infrastructure/entities/memory.entity.dart
Normal file
36
mobile/lib/infrastructure/entities/memory.entity.dart
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import 'package:drift/drift.dart';
|
||||
import 'package:immich_mobile/domain/models/memory.model.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/user.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/utils/drift_default.mixin.dart';
|
||||
|
||||
class MemoryEntity extends Table with DriftDefaultsMixin {
|
||||
const MemoryEntity();
|
||||
|
||||
TextColumn get id => text()();
|
||||
|
||||
DateTimeColumn get createdAt => dateTime().withDefault(currentDateAndTime)();
|
||||
|
||||
DateTimeColumn get updatedAt => dateTime().withDefault(currentDateAndTime)();
|
||||
|
||||
DateTimeColumn get deletedAt => dateTime().nullable()();
|
||||
|
||||
TextColumn get ownerId =>
|
||||
text().references(UserEntity, #id, onDelete: KeyAction.cascade)();
|
||||
|
||||
IntColumn get type => intEnum<MemoryTypeEnum>()();
|
||||
|
||||
TextColumn get data => text()();
|
||||
|
||||
BoolColumn get isSaved => boolean().withDefault(const Constant(false))();
|
||||
|
||||
DateTimeColumn get memoryAt => dateTime()();
|
||||
|
||||
DateTimeColumn get seenAt => dateTime().nullable()();
|
||||
|
||||
DateTimeColumn get showAt => dateTime().nullable()();
|
||||
|
||||
DateTimeColumn get hideAt => dateTime().nullable()();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {id};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue