2025-06-26 19:20:39 +05:30
|
|
|
import 'package:drift/drift.dart';
|
|
|
|
|
import 'package:immich_mobile/domain/models/album/album.model.dart';
|
|
|
|
|
import 'package:immich_mobile/infrastructure/entities/remote_album.entity.dart';
|
|
|
|
|
import 'package:immich_mobile/infrastructure/entities/user.entity.dart';
|
|
|
|
|
import 'package:immich_mobile/infrastructure/utils/drift_default.mixin.dart';
|
|
|
|
|
|
|
|
|
|
class RemoteAlbumUserEntity extends Table with DriftDefaultsMixin {
|
|
|
|
|
const RemoteAlbumUserEntity();
|
|
|
|
|
|
2025-07-25 08:07:22 +05:30
|
|
|
TextColumn get albumId => text().references(RemoteAlbumEntity, #id, onDelete: KeyAction.cascade)();
|
2025-06-26 19:20:39 +05:30
|
|
|
|
2025-07-25 08:07:22 +05:30
|
|
|
TextColumn get userId => text().references(UserEntity, #id, onDelete: KeyAction.cascade)();
|
2025-06-26 19:20:39 +05:30
|
|
|
|
|
|
|
|
IntColumn get role => intEnum<AlbumUserRole>()();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Set<Column> get primaryKey => {albumId, userId};
|
|
|
|
|
}
|