members-database/entities/executive_position.ts

24 lines
622 B
TypeScript
Raw Permalink Normal View History

import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
import { member_executive_positions } from "./member_executive_positions";
2024-08-17 14:38:08 +00:00
@Entity()
export class executive_position {
@PrimaryColumn({ generated: "increment", type: "int" })
id: number;
2024-08-17 14:38:08 +00:00
@Column({ type: "varchar", length: 255 })
postition: string;
2024-08-19 10:47:10 +00:00
@Column({ type: "int", default: -1 })
2024-08-17 14:38:08 +00:00
number_of_performers: string;
@OneToMany(
() => member_executive_positions,
(member_executive_positions) => member_executive_positions.executive_position,
{
onDelete: "RESTRICT",
}
)
members: member_executive_positions[];
2024-08-17 14:38:08 +00:00
}