@wearesage/schema
Version:
A flexible schema definition and validation system for TypeScript with multi-database support
31 lines (25 loc) • 604 B
text/typescript
import "reflect-metadata";
import { Entity, Id, Property, OneToMany, ManyToOne } from "../..";
import { Organization } from "./Organization";
import { TaskBucket } from "./TaskBucket";
()
export class Project {
()
id: string;
({ required: true })
name: string;
()
description: string;
({
target: () => Organization,
inverse: "projects",
name: "BELONGS_TO_ORGANIZATION",
})
organization: Organization;
({
target: () => TaskBucket,
inverse: "project",
name: "HAS_BUCKET",
})
buckets: TaskBucket[] = [];
}