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

@Entity({ name: 'racing_drivers' })
export class DriverOrmEntity {
  @PrimaryColumn({ type: 'uuid' })
  id!: string;

  @Column({ type: 'text' })
  iracingId!: string;

  @Column({ type: 'text' })
  name!: string;

  @Column({ type: 'text' })
  country!: string;

  @Column({ type: 'text', nullable: true })
  bio!: string | null;

  @Column({ type: 'timestamptz' })
  joinedAt!: Date;

  @Column({ type: 'text', nullable: true })
  category!: string | null;

  @Column({ type: 'jsonb', nullable: true })
  avatarRef!: Record<string, unknown> | null;
}