2024-08-19 10:47:10 +00:00
|
|
|
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
2024-08-23 07:10:40 +00:00
|
|
|
import { memberAwards } from "./memberAwards";
|
2024-08-19 10:47:10 +00:00
|
|
|
|
|
|
|
@Entity()
|
|
|
|
export class award {
|
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 })
|
|
|
|
award: string;
|
|
|
|
|
2024-08-23 07:10:40 +00:00
|
|
|
@OneToMany(() => memberAwards, (member) => member.award, {
|
2024-08-19 10:47:10 +00:00
|
|
|
onDelete: "RESTRICT",
|
|
|
|
})
|
2024-08-23 07:10:40 +00:00
|
|
|
members: memberAwards[];
|
2024-08-19 10:47:10 +00:00
|
|
|
}
|