Skip to content

High performance self-hosted photo and video management solution.

999 B
Raw Blame
import 'package:immich_mobile/domain/models/album/album.model.dart';

import '../../utils.dart';

class 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,
  }) {
    final albumId = TestUtils.uuid(id);
    return RemoteAlbum(
      id: albumId,
      name: name ?? 'remote_album_$albumId',
      ownerId: TestUtils.uuid(ownerId),
      description: description ?? '',
      createdAt: TestUtils.date(createdAt),
      updatedAt: TestUtils.date(updatedAt),
      thumbnailAssetId: thumbnailAssetId,
      isActivityEnabled: isActivityEnabled,
      order: order,
      assetCount: assetCount,
      ownerName: ownerName ?? 'owner_$albumId',
      isShared: isShared,
    );
  }
}