fix(server): missing integer type (#20075)

This commit is contained in:
Daimolean 2025-07-22 17:29:14 +08:00 committed by GitHub
parent 166452640d
commit 496b0c7076
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 24 additions and 18 deletions

View File

@ -27,19 +27,19 @@ class SyncAssetFaceV1 {
String assetId;
num boundingBoxX1;
int boundingBoxX1;
num boundingBoxX2;
int boundingBoxX2;
num boundingBoxY1;
int boundingBoxY1;
num boundingBoxY2;
int boundingBoxY2;
String id;
num imageHeight;
int imageHeight;
num imageWidth;
int imageWidth;
String? personId;
@ -104,13 +104,13 @@ class SyncAssetFaceV1 {
return SyncAssetFaceV1(
assetId: mapValueOfType<String>(json, r'assetId')!,
boundingBoxX1: num.parse('${json[r'boundingBoxX1']}'),
boundingBoxX2: num.parse('${json[r'boundingBoxX2']}'),
boundingBoxY1: num.parse('${json[r'boundingBoxY1']}'),
boundingBoxY2: num.parse('${json[r'boundingBoxY2']}'),
boundingBoxX1: mapValueOfType<int>(json, r'boundingBoxX1')!,
boundingBoxX2: mapValueOfType<int>(json, r'boundingBoxX2')!,
boundingBoxY1: mapValueOfType<int>(json, r'boundingBoxY1')!,
boundingBoxY2: mapValueOfType<int>(json, r'boundingBoxY2')!,
id: mapValueOfType<String>(json, r'id')!,
imageHeight: num.parse('${json[r'imageHeight']}'),
imageWidth: num.parse('${json[r'imageWidth']}'),
imageHeight: mapValueOfType<int>(json, r'imageHeight')!,
imageWidth: mapValueOfType<int>(json, r'imageWidth')!,
personId: mapValueOfType<String>(json, r'personId'),
sourceType: mapValueOfType<String>(json, r'sourceType')!,
);

View File

@ -13805,25 +13805,25 @@
"type": "string"
},
"boundingBoxX1": {
"type": "number"
"type": "integer"
},
"boundingBoxX2": {
"type": "number"
"type": "integer"
},
"boundingBoxY1": {
"type": "number"
"type": "integer"
},
"boundingBoxY2": {
"type": "number"
"type": "integer"
},
"id": {
"type": "string"
},
"imageHeight": {
"type": "number"
"type": "integer"
},
"imageWidth": {
"type": "number"
"type": "integer"
},
"personId": {
"nullable": true,

View File

@ -261,11 +261,17 @@ export class SyncAssetFaceV1 {
id!: string;
assetId!: string;
personId!: string | null;
@ApiProperty({ type: 'integer' })
imageWidth!: number;
@ApiProperty({ type: 'integer' })
imageHeight!: number;
@ApiProperty({ type: 'integer' })
boundingBoxX1!: number;
@ApiProperty({ type: 'integer' })
boundingBoxY1!: number;
@ApiProperty({ type: 'integer' })
boundingBoxX2!: number;
@ApiProperty({ type: 'integer' })
boundingBoxY2!: number;
sourceType!: string;
}