import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm'; import { License } from './license.entity'; @Entity('raidablebases_configs') export class RaidableBasesConfig { @PrimaryGeneratedColumn('uuid') id: string; @Column({ type: 'uuid' }) license_id: string; @Column({ type: 'varchar', length: 100 }) config_name: string; @Column({ type: 'text', nullable: true }) description: string | null; @Column({ type: 'jsonb', default: () => "'{}'" }) config_data: Record; @Column({ type: 'boolean', default: false }) is_active: boolean; @Column({ type: 'timestamptz', default: () => 'NOW()' }) created_at: Date; @Column({ type: 'timestamptz', default: () => 'NOW()' }) updated_at: Date; @ManyToOne(() => License, { onDelete: 'CASCADE' }) @JoinColumn({ name: 'license_id' }) license: License; }