2024-08-21 12:13:39 +00:00
|
|
|
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
|
2024-08-19 10:47:10 +00:00
|
|
|
import { member } from "./member";
|
2024-08-23 07:10:40 +00:00
|
|
|
import { executivePosition } from "./executivePosition";
|
2024-08-19 10:47:10 +00:00
|
|
|
|
|
|
|
@Entity()
|
2024-08-23 07:10:40 +00:00
|
|
|
export class memberExecutivePositions {
|
2024-08-21 12:13:39 +00:00
|
|
|
@PrimaryColumn({ generated: "increment", type: "int" })
|
|
|
|
id: number;
|
2024-08-19 10:47:10 +00:00
|
|
|
|
|
|
|
@Column({ type: "varchar", length: 255, nullable: true, default: null })
|
2024-08-21 12:13:39 +00:00
|
|
|
note?: string;
|
2024-08-19 10:47:10 +00:00
|
|
|
|
|
|
|
@Column({ type: "date" })
|
2024-08-23 07:10:40 +00:00
|
|
|
start: Date;
|
|
|
|
|
|
|
|
@Column({ type: "date" })
|
|
|
|
end: Date;
|
2024-08-19 10:47:10 +00:00
|
|
|
|
|
|
|
@ManyToOne(() => member, (member) => member.awards, {
|
|
|
|
onDelete: "RESTRICT",
|
|
|
|
})
|
|
|
|
member: member;
|
|
|
|
|
2024-08-23 07:10:40 +00:00
|
|
|
@ManyToOne(() => executivePosition, (executivePosition) => executivePosition.members, {
|
2024-08-19 10:47:10 +00:00
|
|
|
onDelete: "RESTRICT",
|
|
|
|
})
|
2024-08-23 07:10:40 +00:00
|
|
|
executivePosition: executivePosition;
|
2024-08-19 10:47:10 +00:00
|
|
|
}
|