website refactor

This commit is contained in:
2026-01-16 16:46:57 +01:00
parent 37b1aa626c
commit 2f53727702
445 changed files with 1160 additions and 1150 deletions

View File

@@ -5,7 +5,7 @@
* Immutable entity with factory methods and domain validation.
*/
import type { Entity } from '@core/shared/domain/Entity';
import { Entity } from '@core/shared/domain/Entity';
import { NotificationDomainError } from '../errors/NotificationDomainError';
import { NotificationId } from '../value-objects/NotificationId';
@@ -86,8 +86,9 @@ export interface NotificationProps {
respondedAt?: Date;
}
export class Notification implements Entity<string> {
private constructor(private readonly props: NotificationProps) {}
export class Notification extends Entity<NotificationId> {
private constructor(private readonly props: NotificationProps) {
super(props.id);}
static create(props: Omit<NotificationProps, 'id' | 'status' | 'createdAt' | 'urgency'> & {
id: string;
@@ -115,7 +116,6 @@ export class Notification implements Entity<string> {
});
}
get id(): string { return this.props.id.value; }
get recipientId(): string { return this.props.recipientId; }
get type(): NotificationType { return this.props.type; }
get title(): string { return this.props.title; }