package org.springblade.modules.app.common.enums;

public enum PictureTypeEnum {
    //1-合同 2-血检 3-空车 4-装运 5-A票 6-验收
    CONTRACT(1, "合同"),
    BLOOD_TEST(2, "血检"),
    EMPTY_CAR(3, "空车"),
    LOAD_CAR(4, "装运"),
    A_TICKET(5, "A票"),
    ACCEPT(6, "验收"),
    ;
    private int code;
    private String text;

    PictureTypeEnum(int code, String text) {
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

    public static PictureTypeEnum findByCode(int code) {
        for (PictureTypeEnum demoEnum : values()) {
            if (code == demoEnum.getCode()) {
                return demoEnum;
            }
        }
        return null;
    }

}
