import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm"; import { memberEducations } from "../club/member/memberEducations"; @Entity() export class education { @PrimaryColumn({ generated: "increment", type: "int" }) id: number; @Column({ type: "varchar", length: 255, unique: true }) education: string; @Column({ type: "varchar", length: 255, nullable: true }) description?: string; @OneToMany(() => memberEducations, (memberEducations) => memberEducations.education) members: memberEducations[]; }