immich/mobile/lib/infrastructure/utils/asset.mixin.dart
wuzihao051119 02b62e5183 refact 1
2025-06-04 19:25:50 +08:00

12 lines
451 B
Dart

import 'package:drift/drift.dart';
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
mixin AssetEntityMixin on Table {
TextColumn get name => text()();
IntColumn get type => intEnum<AssetType>()();
DateTimeColumn get createdAt => dateTime().withDefault(currentDateAndTime)();
DateTimeColumn get updatedAt => dateTime().withDefault(currentDateAndTime)();
IntColumn get durationInSeconds => integer().nullable()();
}