/**
 * Per-tenant voice configuration entity.
 *
 * Stores STT provider preference per tenant (e.g. 'openai').
 * Queried by voice-agent at session start to select the appropriate STT engine.
 */
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from 'typeorm';

@Entity('voice_configs')
export class VoiceConfig {
  @PrimaryGeneratedColumn('uuid')
  id!: string;

  @Column({ type: 'varchar', length: 20, unique: true })
  tenantId!: string;

  @Column({ type: 'varchar', length: 30, default: 'openai' })
  sttProvider!: string;

  @CreateDateColumn({ type: 'timestamptz' })
  createdAt!: Date;

  @UpdateDateColumn({ type: 'timestamptz' })
  updatedAt!: Date;
}
