members-database/entities/executivePosition.ts

20 lines
586 B
TypeScript
Raw Permalink Normal View History

2024-08-23 07:10:40 +00:00
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
import { memberExecutivePositions } from "./memberExecutivePositions";
@Entity()
export class executivePosition {
@PrimaryColumn({ generated: "increment", type: "int" })
id: number;
@Column({ type: "varchar", length: 255 })
postition: string;
@Column({ type: "int", default: -1 })
numberOfPerformers: string;
@OneToMany(() => memberExecutivePositions, (memberExecutivePositions) => memberExecutivePositions.executivePosition, {
onDelete: "RESTRICT",
})
members: memberExecutivePositions[];
}