website refactor
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Represents an achievement earned by a specific user.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
|
||||
export interface UserAchievementProps {
|
||||
id: string;
|
||||
@@ -15,8 +15,7 @@ export interface UserAchievementProps {
|
||||
progress?: number; // For partial progress tracking (0-100)
|
||||
}
|
||||
|
||||
export class UserAchievement implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class UserAchievement extends Entity<string> {
|
||||
readonly userId: string;
|
||||
readonly achievementId: string;
|
||||
readonly earnedAt: Date;
|
||||
@@ -24,7 +23,8 @@ export class UserAchievement implements Entity<string> {
|
||||
readonly progress: number;
|
||||
|
||||
private constructor(props: UserAchievementProps) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.userId = props.userId;
|
||||
this.achievementId = props.achievementId;
|
||||
this.earnedAt = props.earnedAt;
|
||||
|
||||
Reference in New Issue
Block a user