members-database/entities/qualification.ts

20 lines
484 B
TypeScript
Raw Normal View History

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