29 lines
763 B
TypeScript
29 lines
763 B
TypeScript
|
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
|
||
|
import { member } from "./member";
|
||
|
import { executive_position } from "./executive_position";
|
||
|
|
||
|
@Entity()
|
||
|
export class member_executive_positions {
|
||
|
@PrimaryColumn({ generated: "increment", type: "int" })
|
||
|
id: number;
|
||
|
|
||
|
@Column({ type: "boolean", default: true })
|
||
|
given: boolean;
|
||
|
|
||
|
@Column({ type: "varchar", length: 255, nullable: true, default: null })
|
||
|
note?: string;
|
||
|
|
||
|
@Column({ type: "date" })
|
||
|
date: Date;
|
||
|
|
||
|
@ManyToOne(() => member, (member) => member.awards, {
|
||
|
onDelete: "RESTRICT",
|
||
|
})
|
||
|
member: member;
|
||
|
|
||
|
@ManyToOne(() => executive_position, (executive_position) => executive_position.members, {
|
||
|
onDelete: "RESTRICT",
|
||
|
})
|
||
|
executive_position: executive_position;
|
||
|
}
|