mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			923 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			923 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
import 'package:immich_mobile/domain/models/album/local_album.model.dart';
 | 
						|
import 'package:immich_mobile/domain/models/asset/base_asset.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,
 | 
						|
    );
 | 
						|
  }
 | 
						|
}
 |