26 lines
803 B
TypeScript
26 lines
803 B
TypeScript
|
|
import { DomainEntity, type UniqueID } from "@repo/rdx-ddd";
|
||
|
|
|
||
|
|
import type { SupportValues } from "./value-objects/support-values";
|
||
|
|
export type SupportConnectionRevisionProps = Readonly<{
|
||
|
|
values: SupportValues;
|
||
|
|
actorId: UniqueID;
|
||
|
|
recordedAt: string;
|
||
|
|
}>;
|
||
|
|
export class SupportConnectionRevision extends DomainEntity<SupportConnectionRevisionProps> {
|
||
|
|
static create(props: SupportConnectionRevisionProps) {
|
||
|
|
return new SupportConnectionRevision(Object.freeze({ ...props }));
|
||
|
|
}
|
||
|
|
static rehydrate(props: SupportConnectionRevisionProps, id: UniqueID) {
|
||
|
|
return new SupportConnectionRevision(Object.freeze({ ...props }), id);
|
||
|
|
}
|
||
|
|
get values() {
|
||
|
|
return this.props.values;
|
||
|
|
}
|
||
|
|
get actorId() {
|
||
|
|
return this.props.actorId;
|
||
|
|
}
|
||
|
|
get recordedAt() {
|
||
|
|
return this.props.recordedAt;
|
||
|
|
}
|
||
|
|
}
|