2025-05-29 21:12:00 +05:30
|
|
|
import 'package:drift/drift.dart';
|
|
|
|
|
import 'package:immich_mobile/infrastructure/entities/local_album.entity.dart';
|
|
|
|
|
import 'package:immich_mobile/infrastructure/entities/local_asset.entity.dart';
|
|
|
|
|
import 'package:immich_mobile/infrastructure/utils/drift_default.mixin.dart';
|
|
|
|
|
|
|
|
|
|
class LocalAlbumAssetEntity extends Table with DriftDefaultsMixin {
|
|
|
|
|
const LocalAlbumAssetEntity();
|
|
|
|
|
|
2025-07-25 08:07:22 +05:30
|
|
|
TextColumn get assetId => text().references(LocalAssetEntity, #id, onDelete: KeyAction.cascade)();
|
2025-05-29 21:12:00 +05:30
|
|
|
|
2025-07-25 08:07:22 +05:30
|
|
|
TextColumn get albumId => text().references(LocalAlbumEntity, #id, onDelete: KeyAction.cascade)();
|
2025-05-29 21:12:00 +05:30
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Set<Column> get primaryKey => {assetId, albumId};
|
|
|
|
|
}
|