ulthar-framework/apps/syntropy/domain/models/project.ts

12 lines
344 B
TypeScript

import { Field, Model, type ModelToType } from "@fabric/domain";
export const ProjectModel = Model.aggregateFrom("projects", {
name: Field.string(),
description: Field.string(),
userId: Field.reference({
targetModel: "users",
}),
});
export type ProjectModel = typeof ProjectModel;
export type Project = ModelToType<ProjectModel>;