Files
immich/mobile/lib/domain/models/asset/asset_metadata.model.dart
T
shenlong-tanwen 254ca4a13d fix types
2025-09-06 01:57:24 +05:30

40 lines
765 B
Dart

import 'dart:convert';
enum RemoteAssetMetadataKey {
mobileApp("mobile-app");
final String key;
const RemoteAssetMetadataKey(this.key);
}
class RemoteAssetMetadataItem {
final RemoteAssetMetadataKey key;
final Object value;
const RemoteAssetMetadataItem({required this.key, required this.value});
Map<String, Object?> toMap() {
return {'key': key.key, 'value': value};
}
String toJson() => json.encode(toMap());
}
class RemoteAssetMobileAppMetadata {
final String? cloudId;
const RemoteAssetMobileAppMetadata({this.cloudId});
Map<String, Object?> toMap() {
final map = <String, Object?>{};
if (cloudId != null) {
map["iCloudId"] = cloudId;
}
return map;
}
String toJson() => json.encode(toMap());
}