refactor!: migrate class-validator to zod (#26597)

This commit is contained in:
Timon
2026-04-14 23:39:03 +02:00
committed by GitHub
parent 3753b7a4d1
commit 7d8f843be6
318 changed files with 7830 additions and 8316 deletions
+4 -4
View File
@@ -15,7 +15,7 @@ class SyncAssetMetadataV1 {
SyncAssetMetadataV1({
required this.assetId,
required this.key,
required this.value,
this.value = const {},
});
/// Asset ID
@@ -25,13 +25,13 @@ class SyncAssetMetadataV1 {
String key;
/// Value
Object value;
Map<String, Object> value;
@override
bool operator ==(Object other) => identical(this, other) || other is SyncAssetMetadataV1 &&
other.assetId == assetId &&
other.key == key &&
other.value == value;
_deepEquality.equals(other.value, value);
@override
int get hashCode =>
@@ -62,7 +62,7 @@ class SyncAssetMetadataV1 {
return SyncAssetMetadataV1(
assetId: mapValueOfType<String>(json, r'assetId')!,
key: mapValueOfType<String>(json, r'key')!,
value: mapValueOfType<Object>(json, r'value')!,
value: mapCastOfType<String, Object>(json, r'value')!,
);
}
return null;