import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
import { ItemTypeEntity } from './item-type.entity';

@Entity('darknet_entity_access')
export class DarknetEntityAccessEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column() entity_type_id: number;
    @Column() entity_id: number;
    @Column() item_type_id: number;
    @Column({ default: 1 }) amount: number;
    @Column() price: number;
    @Column() ooc_price: number;
    @Column() created: Date;
    @Column() created_by: number;

    @ManyToOne(() => ItemTypeEntity, (type) => type.items)
    @JoinColumn({ name: 'item_type_id' })
    itemType: ItemTypeEntity;
}
