import { Entity, Column, Unique } from 'typeorm';
import { BaseEntity } from '../database/base.entity';

/**
 * VehicleType entity — tenant-scoped master table.
 *
 * Used by: Vehicle (type field), Transport Pricing (vehicle type column).
 * Seeded on tenant onboarding: Sedan, SUV, Van, Coaster, Bus, Mini Bus, Limousine.
 */
@Entity('vehicle_types')
@Unique(['tenant_id', 'name'])
export class VehicleTypeEntity extends BaseEntity {
  @Column({ type: 'varchar', length: 100 })
  name: string;

  @Column({ type: 'boolean', default: true })
  is_active: boolean;

  @Column({ type: 'boolean', default: false })
  is_system: boolean;
}
