19 lines
518 B
TypeScript
19 lines
518 B
TypeScript
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
|
import { communication } from "./communication";
|
|
|
|
@Entity()
|
|
export class communicationType {
|
|
@PrimaryColumn({ generated: "increment", type: "int" })
|
|
id: number;
|
|
|
|
@Column({ type: "varchar", length: 255 })
|
|
type: string;
|
|
|
|
@Column({ type: "varchar", length: 255, default: "" })
|
|
useColumns: string;
|
|
|
|
@OneToMany(() => communication, (communication) => communication.type, {
|
|
onDelete: "RESTRICT",
|
|
})
|
|
communications: communication[];
|
|
}
|