members-database/entities/executive_position.ts
2024-08-19 12:47:10 +02:00

19 lines
486 B
TypeScript

import { Column, Entity, ManyToMany, PrimaryColumn } from "typeorm";
import { member } from "./member";
@Entity()
export class executive_position {
@PrimaryColumn({ generated: "uuid", type: "varchar", length: 36 })
id: string;
@Column({ type: "varchar", length: 255 })
postition: string;
@Column({ type: "int", default: -1 })
number_of_performers: string;
@ManyToMany(() => member, (member) => member.positions, {
onDelete: "RESTRICT",
})
members: member[];
}