add full sync
This commit is contained in:
@@ -1,19 +1,15 @@
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:immich_mobile/domain/models/asset.model.dart';
|
||||
import 'package:immich_mobile/domain/models/asset/asset.model.dart';
|
||||
|
||||
class Asset extends Table {
|
||||
const Asset();
|
||||
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
|
||||
TextColumn get name => text()();
|
||||
TextColumn get checksum => text().unique()();
|
||||
IntColumn get height => integer()();
|
||||
IntColumn get width => integer()();
|
||||
IntColumn get height => integer().nullable()();
|
||||
IntColumn get width => integer().nullable()();
|
||||
IntColumn get type => intEnum<AssetType>()();
|
||||
DateTimeColumn get createdTime => dateTime()();
|
||||
DateTimeColumn get modifiedTime =>
|
||||
dateTime().withDefault(currentDateAndTime)();
|
||||
IntColumn get duration => integer().withDefault(const Constant(0))();
|
||||
BoolColumn get isLivePhoto => boolean().withDefault(const Constant(false))();
|
||||
}
|
||||
|
||||
@@ -4,5 +4,8 @@ import 'package:immich_mobile/domain/entities/asset.entity.dart';
|
||||
class LocalAsset extends Asset {
|
||||
const LocalAsset();
|
||||
|
||||
TextColumn get localId => text().unique()();
|
||||
TextColumn get localId => text()();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {localId};
|
||||
}
|
||||
|
||||
@@ -4,5 +4,9 @@ import 'package:immich_mobile/domain/entities/asset.entity.dart';
|
||||
class RemoteAsset extends Asset {
|
||||
const RemoteAsset();
|
||||
|
||||
TextColumn get remoteId => text().unique()();
|
||||
TextColumn get remoteId => text()();
|
||||
TextColumn get livePhotoVideoId => text().nullable()();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {remoteId};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user