import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm"; import { member } from "./member"; import { executivePosition } from "./executivePosition"; @Entity() export class memberExecutivePositions { @PrimaryColumn({ generated: "increment", type: "int" }) id: number; @Column({ type: "varchar", length: 255, nullable: true, default: null }) note?: string; @Column({ type: "date" }) start: Date; @Column({ type: "date" }) end: Date; @ManyToOne(() => member, (member) => member.awards, { onDelete: "RESTRICT", }) member: member; @ManyToOne(() => executivePosition, (executivePosition) => executivePosition.members, { onDelete: "RESTRICT", }) executivePosition: executivePosition; }