test: implement resource template propagation tests for resource revisions feat: create prepareResourceTemplateUpdates function for handling resource template updates feat: add resource revision specifications for managing resource revisions in the database test: add tests for entity column visibility and local storage handling feat: implement entity column visibility storage for managing column preferences feat: create synchronizeTemplateStructure utility for managing template field and section synchronization
38 lines
869 B
TypeScript
38 lines
869 B
TypeScript
import type { UniqueID } from "@repo/rdx-ddd";
|
|
import { DomainEntity } from "@repo/rdx-ddd";
|
|
|
|
import type { ResourceSpecification, ResourceValues } from "./value-objects/resource-values.vo";
|
|
|
|
export type ResourceRevisionProps = Readonly<{
|
|
values: ResourceValues;
|
|
specification: ResourceSpecification;
|
|
actorId: UniqueID;
|
|
recordedAt: string;
|
|
}>;
|
|
|
|
export class ResourceRevision extends DomainEntity<ResourceRevisionProps> {
|
|
static create(props: ResourceRevisionProps) {
|
|
return new ResourceRevision(props);
|
|
}
|
|
|
|
static rehydrate(props: ResourceRevisionProps, id: UniqueID) {
|
|
return new ResourceRevision(props, id);
|
|
}
|
|
|
|
get specification() {
|
|
return this.props.specification;
|
|
}
|
|
|
|
get values() {
|
|
return this.props.values;
|
|
}
|
|
|
|
get actorId() {
|
|
return this.props.actorId;
|
|
}
|
|
|
|
get recordedAt() {
|
|
return this.props.recordedAt;
|
|
}
|
|
}
|