import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('vehicle_upgrades')
export class VehicleUpgradeEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column({ type: 'varchar', length: 32 }) category: string;
    @Column({ type: 'varchar', length: 32 }) name: string;
    @Column({ type: 'varchar', length: 255 }) description: string;
    @Column() price: number;
    @Column({ nullable: true }) requires_vehicle_upgrade: number;
    @Column({ type: 'varchar', length: 45 }) upgrade_function: string;
    @Column({ type: 'json' }) conflicts: number[];
    @Column({ type: 'int' }) sort_id: number;
    @Column({ type: 'tinyint' }) dealership_available: boolean;
    @Column({ type: 'tinyint' }) mechanic_available: boolean;
}
