mirror of
https://github.com/immich-app/immich.git
synced 2025-06-23 15:30:51 -04:00
32 lines
917 B
Dart
32 lines
917 B
Dart
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
|
import 'package:immich_mobile/domain/models/local_album.model.dart';
|
|
import 'package:immich_mobile/infrastructure/entities/local_album.entity.drift.dart';
|
|
import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart';
|
|
|
|
extension LocalAlbumEntityDataHelper on LocalAlbumEntityData {
|
|
LocalAlbum toDto({int assetCount = 0}) {
|
|
return LocalAlbum(
|
|
id: id,
|
|
name: name,
|
|
updatedAt: updatedAt,
|
|
assetCount: assetCount,
|
|
backupSelection: backupSelection,
|
|
);
|
|
}
|
|
}
|
|
|
|
extension LocalAssetEntityDataHelper on LocalAssetEntityData {
|
|
LocalAsset toDto() {
|
|
return LocalAsset(
|
|
id: id,
|
|
name: name,
|
|
checksum: checksum,
|
|
type: type,
|
|
createdAt: createdAt,
|
|
updatedAt: updatedAt,
|
|
durationInSeconds: durationInSeconds,
|
|
isFavorite: isFavorite,
|
|
);
|
|
}
|
|
}
|