Org.ts
403 Bytes
import {
Entity,
CreateDateColumn,
PrimaryGeneratedColumn,
Column,
ManyToMany,
ManyToOne,
EntityOptions,
OneToMany,
OneToOne
} from "typeorm";
import Contract from "./Contract";
@Entity("orgs")
export default class Org {
@PrimaryGeneratedColumn()
id: string;
@Column()
name: string;
@OneToMany(type => Contract, contract => contract.org)
contracts: Array<Contract>;
}