import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
import { CharacterTattooEntity } from './character-tattoo.entity';

@Entity('tattoos')
export class TattooEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column({ type: 'varchar', length: 64 }) name: string;
    @Column({ type: 'varchar', length: 32 }) zone: string;
    @Column({ type: 'varchar', length: 64, nullable: true }) zone_detail: string;
    @Column({ type: 'int', nullable: true }) gender: number | null;
    @Column({ type: 'varchar', length: 128 }) opaque_collection: string;
    @Column({ type: 'varchar', length: 128 }) opaque_overlay: string;
    @Column({ type: 'varchar', length: 128 }) opaque_txd: string;
    @Column({ type: 'varchar', length: 128 }) opaque_txt: string;
    @Column({ type: 'varchar', length: 128 }) transparent_collection: string;
    @Column({ type: 'varchar', length: 128 }) transparent_overlay: string;
    @Column({ type: 'varchar', length: 128 }) transparent_txd: string;
    @Column({ type: 'varchar', length: 128 }) transparent_txt: string;
    @Column() price: number;
    @Column({ type: 'int' }) available: boolean;
    @Column({ type: 'int', nullable: true }) faction: number | null; 

    @OneToMany(() => CharacterTattooEntity, (cte) => cte.character)
    characterTattoos: CharacterTattooEntity[];
}
