package de.avatic.lcc.dto.generic;

import de.avatic.lcc.model.db.packaging.PackagingDimension;

public enum PalletType {
    INDUSTRIAL_PALLET(1200,1000), EURO_PALLET(1200,800);

    private final int width;
    private final int length;

    PalletType(int length, int width) {
        this.length = length;
        this.width = width;
    }

    public int getLength() {
        return length;
    }
    public int getWidth() {
        return width;
    }

    public boolean fitsOn(PackagingDimension dimension) {
        return (dimension.getLength() <= this.length && dimension.getWidth() <= this.width) || (dimension.getLength() <= this.width && dimension.getWidth() <= this.length);
    }



}
