mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 11:07:10 -05:00 
			
		
		
		
	* refactor: user entity * chore: rebase fixes * refactor: remove int user Id * refactor: migrate store userId from int to string * refactor: rename uid to id * feat: drift * pr feedback * refactor: move common overrides to mixin --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
		
			
				
	
	
		
			19 lines
		
	
	
		
			639 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			639 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
import 'package:drift/drift.dart';
 | 
						|
import 'package:immich_mobile/infrastructure/entities/user.entity.dart';
 | 
						|
import 'package:immich_mobile/infrastructure/utils/drift_default.mixin.dart';
 | 
						|
 | 
						|
class PartnerEntity extends Table with DriftDefaultsMixin {
 | 
						|
  const PartnerEntity();
 | 
						|
 | 
						|
  BlobColumn get sharedById =>
 | 
						|
      blob().references(UserEntity, #id, onDelete: KeyAction.cascade)();
 | 
						|
 | 
						|
  BlobColumn get sharedWithId =>
 | 
						|
      blob().references(UserEntity, #id, onDelete: KeyAction.cascade)();
 | 
						|
 | 
						|
  BoolColumn get inTimeline => boolean().withDefault(const Constant(false))();
 | 
						|
 | 
						|
  @override
 | 
						|
  Set<Column> get primaryKey => {sharedById, sharedWithId};
 | 
						|
}
 |