2026-07-27 19:45:36 +05:30
|
|
|
import 'package:immich_mobile/domain/models/album/album.model.dart';
|
|
|
|
|
|
|
|
|
|
import '../../utils.dart';
|
|
|
|
|
|
|
|
|
|
class RemoteAlbumFactory {
|
|
|
|
|
const RemoteAlbumFactory();
|
|
|
|
|
|
|
|
|
|
static RemoteAlbum create({
|
|
|
|
|
String? id,
|
|
|
|
|
String? name,
|
|
|
|
|
String? ownerId,
|
|
|
|
|
String? description,
|
|
|
|
|
DateTime? createdAt,
|
|
|
|
|
DateTime? updatedAt,
|
|
|
|
|
String? thumbnailAssetId,
|
|
|
|
|
bool isActivityEnabled = false,
|
|
|
|
|
AlbumAssetOrder order = AlbumAssetOrder.desc,
|
|
|
|
|
int assetCount = 0,
|
|
|
|
|
String? ownerName,
|
|
|
|
|
bool isShared = false,
|
|
|
|
|
}) {
|
2026-08-15 16:55:45 +05:30
|
|
|
final albumId = TestUtils.uuid(id);
|
2026-07-27 19:45:36 +05:30
|
|
|
return RemoteAlbum(
|
2026-08-15 16:55:45 +05:30
|
|
|
id: albumId,
|
|
|
|
|
name: name ?? 'remote_album_$albumId',
|
2026-07-27 19:45:36 +05:30
|
|
|
ownerId: TestUtils.uuid(ownerId),
|
|
|
|
|
description: description ?? '',
|
|
|
|
|
createdAt: TestUtils.date(createdAt),
|
|
|
|
|
updatedAt: TestUtils.date(updatedAt),
|
|
|
|
|
thumbnailAssetId: thumbnailAssetId,
|
|
|
|
|
isActivityEnabled: isActivityEnabled,
|
|
|
|
|
order: order,
|
|
|
|
|
assetCount: assetCount,
|
2026-08-15 16:55:45 +05:30
|
|
|
ownerName: ownerName ?? 'owner_$albumId',
|
2026-07-27 19:45:36 +05:30
|
|
|
isShared: isShared,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|