2025-07-02 14:18:37 -05:00
|
|
|
import 'package:drift/drift.dart';
|
|
|
|
|
import 'package:immich_mobile/infrastructure/entities/memory.entity.dart';
|
|
|
|
|
import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.dart';
|
|
|
|
|
import 'package:immich_mobile/infrastructure/utils/drift_default.mixin.dart';
|
|
|
|
|
|
|
|
|
|
class MemoryAssetEntity extends Table with DriftDefaultsMixin {
|
|
|
|
|
const MemoryAssetEntity();
|
|
|
|
|
|
2025-07-25 08:07:22 +05:30
|
|
|
TextColumn get assetId => text().references(RemoteAssetEntity, #id, onDelete: KeyAction.cascade)();
|
2025-07-02 14:18:37 -05:00
|
|
|
|
2025-07-25 08:07:22 +05:30
|
|
|
TextColumn get memoryId => text().references(MemoryEntity, #id, onDelete: KeyAction.cascade)();
|
2025-07-02 14:18:37 -05:00
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Set<Column> get primaryKey => {assetId, memoryId};
|
|
|
|
|
}
|