import {
  Entity,
  PrimaryGeneratedColumn,
  Column,
  OneToMany,
} from 'typeorm';
import { Quest } from './quest.entity';

@Entity('quest_arcs')
export class QuestArc {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Column({ length: 100 })
  name: string;

  @Column('text')
  description: string;

  @Column({ length: 50, nullable: true, type: 'varchar' })
  zone: string | null; // 'marais', 'foret', etc.

  @Column({ name: 'sort_order', default: 0 })
  sortOrder: number;

  @Column({ name: 'min_level', default: 1 })
  minLevel: number;

  @OneToMany(() => Quest, (q) => q.arc)
  quests: Quest[];
}
