1
0
forked from Yara724/api

Fix ratings and statistics

This commit is contained in:
SepehrYahyaee
2026-01-31 17:42:25 +03:30
parent 4eef873f91
commit f3982e7d5d
4 changed files with 164 additions and 1 deletions

View File

@@ -69,6 +69,11 @@ export class ExpertInsurerController {
);
}
@Get("statistics")
async getExpertStatistics(@CurrentUser() actor) {
return await this.expertInsurerService.getExpertStatisticsReport(actor);
}
@ApiParam({ name: "expertId" })
@ApiQuery({ name: "role", enum: ["claim", "blame"] })
@Get("/:expertId")
@@ -120,13 +125,28 @@ export class ExpertInsurerController {
example: 4,
description: "تشخیص درست وسیله نقلیه مقصر",
},
botRating: {
type: "number",
minimum: 0,
maximum: 5,
example: 4,
description: "برای امتیاز دادن به بات",
},
},
required: [
"collisionMethodAccuracy",
"evaluationTimeliness",
"accidentCauseAccuracy",
"guiltyVehicleIdentification",
"botRating",
],
example: {
collisionMethodAccuracy: 4,
evaluationTimeliness: 3,
accidentCauseAccuracy: 5,
guiltyVehicleIdentification: 4,
botRating: 4,
},
},
})
@ApiParam({ name: "requestId" })