mirror of
https://github.com/immich-app/immich
synced 2026-08-22 13:13:05 +00:00
19 lines
672 B
Dart
19 lines
672 B
Dart
import 'package:drift/drift.dart' hide Index;
|
|
import 'package:immich_data/db/util/defaults_mixin.dart';
|
|
import 'package:immich_data/model/user/user.dart';
|
|
|
|
class UserEntity extends Table with DriftDefaultsMixin {
|
|
const UserEntity();
|
|
|
|
TextColumn get id => text()();
|
|
TextColumn get name => text()();
|
|
TextColumn get email => text()();
|
|
|
|
// Profile image
|
|
BoolColumn get hasProfileImage => boolean().withDefault(const Constant(false))();
|
|
DateTimeColumn get profileChangedAt => dateTime().withDefault(currentDateAndTime)();
|
|
IntColumn get avatarColor => intEnum<AvatarColor>().withDefault(const Constant(0))();
|
|
|
|
@override
|
|
Set<Column> get primaryKey => {id};
|
|
}
|