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

@Entity('cf_ai_improvement')
export class AIImprovement {
  @PrimaryGeneratedColumn()
  id: number;

  @Column('varchar', { length: 50 })
  type: 'code' | 'performance' | 'business' | 'security';

  @Column('varchar', { length: 255 })
  title: string;

  @Column('text')
  description: string;

  @Column('varchar', { length: 20 })
  severity: 'low' | 'medium' | 'high';

  @Column('varchar', { length: 20 })
  priority: 'low' | 'medium' | 'high';

  @Column('varchar', { length: 20 })
  status: 'pending' | 'implemented' | 'dismissed';

  @CreateDateColumn()
  createdAt: Date;

  @UpdateDateColumn()
  updatedAt: Date;
}
