import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

export enum TruckingContainerMissionType {
    FORKLIFT = 'forklift',
    STRAP = 'strap',
    TRAILER = 'trailer',
}

@Entity('trucking_containers')
export class TruckingContainerEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column({ type: 'varchar', length: 64 }) name: string;
    @Column({ type: 'varchar', length: 64 }) name_plural: string;
    @Column({ type: 'varchar', length: 32 }) type: string;
    @Column({ type: 'varchar', length: 64 }) model: string;
    @Column() capacity_weight: number;
    @Column() capacity_volume: number;
    @Column({ type: 'json' }) bounding_box: BoundingBox;
    @Column({ type: 'enum', enum: TruckingContainerMissionType, default: TruckingContainerMissionType.FORKLIFT }) mission_type:
        | 'forklift'
        | 'trailer'
        | 'strap';
}
