import {
  Entity,
  PrimaryGeneratedColumn,
  Column,
  OneToMany
} from "typeorm";
import { Student } from "./Student";

@Entity()
export class TitleStudent {
  @PrimaryGeneratedColumn()
  id!: number;

  @Column()
  name!: string;

  @Column("text")
  description!: string;

  @Column({ default: true })
  enable: boolean = true;

  @OneToMany(() => Student, student => student.TitleStudent)
  Students!: Student[];
}
