immich/mobile/lib/infrastructure/utils/asset.mixin.dart
shenlong-tanwen dbe1a127c9 Merge branch 'feat/sqlite-device-assets' into feat/sqlite-remote-assets
# Conflicts:
#	mobile/drift_schemas/main/drift_schema_v1.json
#	mobile/lib/domain/models/asset/asset.model.dart
#	mobile/lib/domain/models/asset/local_asset.model.dart
#	mobile/lib/domain/models/asset/merged_asset.model.dart
#	mobile/lib/domain/models/asset/remote_asset.model.dart
#	mobile/lib/infrastructure/entities/local_asset.entity.dart
#	mobile/lib/infrastructure/entities/local_asset.entity.drift.dart
2025-04-30 23:01:23 +05:30

11 lines
450 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()();
}