import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
import { CommercialDriversLicenseEntity } from './commercial-drivers-license.entity';

@Entity('commercial_drivers_license_types')
export class CommercialDriversLicenseTypeEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column({ type: 'varchar', length: 64 }) name: string;
    @Column() max_load: number;
    @Column() required_xp: number;
    @Column() level: number;
    @Column() reward_multiplier: number;

    @OneToMany(() => CommercialDriversLicenseEntity, (cdle) => cdle.type)
    cdls: CommercialDriversLicenseEntity[];
}
