import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
import { CompanyEntity } from './company.entity';

@Entity('changing_rooms')
export class ChangingRoomEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column() company_id: number;
    @Column({ type: 'float' }) x: number;
    @Column({ type: 'float' }) y: number;
    @Column({ type: 'float' }) z: number;
    @Column() dimension: number;

    @ManyToOne(() => CompanyEntity, (company) => company.changingRooms)
    @JoinColumn({ name: 'company_id' })
    company: CompanyEntity;
}
