This commit is contained in:
2025-12-29 22:27:33 +01:00
parent 3f610c1cb6
commit 7a853d4e43
96 changed files with 14790 additions and 111 deletions

View File

@@ -27,6 +27,7 @@ export interface UserRatingProps {
trust: RatingDimension;
fairness: RatingDimension;
overallReputation: number;
calculatorVersion?: string;
createdAt: Date;
updatedAt: Date;
}
@@ -82,6 +83,10 @@ export class UserRating implements IValueObject<UserRatingProps> {
return this.props.updatedAt;
}
get calculatorVersion(): string | undefined {
return this.props.calculatorVersion;
}
static create(userId: string): UserRating {
if (!userId || userId.trim().length === 0) {
throw new Error('UserRating userId is required');
@@ -96,6 +101,7 @@ export class UserRating implements IValueObject<UserRatingProps> {
trust: { ...DEFAULT_DIMENSION, lastUpdated: now },
fairness: { ...DEFAULT_DIMENSION, lastUpdated: now },
overallReputation: 50,
calculatorVersion: '1.0',
createdAt: now,
updatedAt: now,
});