immich/mobile/test/unit/factories/remote_asset_factory.dart
shenlong 04a38ba91c
refactor: asset update method (#30201)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2026-07-27 10:15:36 -04:00

37 lines
864 B
Dart

import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
import '../../utils.dart';
class RemoteAssetFactory {
const RemoteAssetFactory();
static RemoteAsset create({
String? id,
String? name,
String? ownerId,
bool isFavorite = false,
AssetVisibility visibility = .timeline,
AssetType type = .image,
String? stackId,
DateTime? deletedAt,
String? localId,
}) {
id = TestUtils.uuid(id);
return RemoteAsset(
id: id,
name: name ?? 'remote_$id.jpg',
ownerId: TestUtils.uuid(ownerId),
checksum: 'checksum-$id',
type: type,
createdAt: TestUtils.yesterday(),
updatedAt: TestUtils.now(),
isFavorite: isFavorite,
visibility: visibility,
stackId: stackId,
isEdited: false,
deletedAt: deletedAt,
localId: localId,
);
}
}