import { Collection, Entity, ManyToMany } from '@mikro-orm/core';
import { User } from './user.entity.js';
import { Class } from '../classes/class.entity.js';
import { TeacherRepository } from '../../data/users/teacher-repository.js';

@Entity({ repository: () => TeacherRepository })
export class Teacher extends User {
    @ManyToMany(() => Class)
    classes!: Collection<Class>;

    constructor(
        public username: string,
        public firstName: string,
        public lastName: string
    ) {
        super();
    }
}
