mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 18:47:09 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			755 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			755 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
| 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();
 | |
| 
 | |
|   TextColumn get albumId => text().references(RemoteAlbumEntity, #id, onDelete: KeyAction.cascade)();
 | |
| 
 | |
|   TextColumn get userId => text().references(UserEntity, #id, onDelete: KeyAction.cascade)();
 | |
| 
 | |
|   IntColumn get role => intEnum<AlbumUserRole>()();
 | |
| 
 | |
|   @override
 | |
|   Set<Column> get primaryKey => {albumId, userId};
 | |
| }
 |