2025-04-02 19:28:17 +05:30
|
|
|
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();
|
|
|
|
|
2025-06-03 21:31:50 +05:30
|
|
|
TextColumn get sharedById =>
|
|
|
|
text().references(UserEntity, #id, onDelete: KeyAction.cascade)();
|
2025-04-02 19:28:17 +05:30
|
|
|
|
2025-06-03 21:31:50 +05:30
|
|
|
TextColumn get sharedWithId =>
|
|
|
|
text().references(UserEntity, #id, onDelete: KeyAction.cascade)();
|
2025-04-02 19:28:17 +05:30
|
|
|
|
|
|
|
BoolColumn get inTimeline => boolean().withDefault(const Constant(false))();
|
|
|
|
|
|
|
|
@override
|
|
|
|
Set<Column> get primaryKey => {sharedById, sharedWithId};
|
|
|
|
}
|