mirror of
https://github.com/immich-app/immich.git
synced 2025-10-18 12:30:37 -04:00
* feat: sync AuthUserV1 * migration * chore: fix analyze * fix user updatedAt check * fix: auth user sync query * generate sql * bump schema version and update migration --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Jason Rasmussen <jason@rasm.me> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
28 lines
987 B
Dart
28 lines
987 B
Dart
import 'package:drift/drift.dart';
|
|
import 'package:immich_mobile/domain/models/user.model.dart';
|
|
import 'package:immich_mobile/infrastructure/utils/drift_default.mixin.dart';
|
|
|
|
class AuthUserEntity extends Table with DriftDefaultsMixin {
|
|
const AuthUserEntity();
|
|
|
|
TextColumn get id => text()();
|
|
TextColumn get name => text()();
|
|
TextColumn get email => text()();
|
|
BoolColumn get isAdmin => boolean().withDefault(const Constant(false))();
|
|
|
|
// Profile image
|
|
BoolColumn get hasProfileImage => boolean().withDefault(const Constant(false))();
|
|
DateTimeColumn get profileChangedAt => dateTime().withDefault(currentDateAndTime)();
|
|
IntColumn get avatarColor => intEnum<AvatarColor>()();
|
|
|
|
// Quota
|
|
IntColumn get quotaSizeInBytes => integer().withDefault(const Constant(0))();
|
|
IntColumn get quotaUsageInBytes => integer().withDefault(const Constant(0))();
|
|
|
|
// Locked Folder
|
|
TextColumn get pinCode => text().nullable()();
|
|
|
|
@override
|
|
Set<Column> get primaryKey => {id};
|
|
}
|