package org.springblade.thirdparty.ocr.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Collections;
import java.util.List;

/**
 *  ocr 图像类型枚举
 * @author bfhuange
 * @date 2024/11/4
 */
@AllArgsConstructor
@Getter
public enum OCRImageType {
    /**
     *  身份证-正⻚
     */
    ID_CARD_MAIN("IDCard-Main", "身份证-正⻚", OCRKey.ID_CARD_MAIN_KEYS),
    /**
     *  身份证-副⻚
     */
    ID_CARD_SIDE("IDCard-Side", "身份证-副⻚", OCRKey.ID_CARD_SIDE_KEYS),
    /**
     *  驾驶证-电子版
     */
    DRIVER_LICENSE_ELEC("DriverLicense-Elec", "驾驶证-电子版", OCRKey.DRIVER_LICENSE_MAIN_KEYS),
    /**
     *  驾驶证-正⻚
     */
    DRIVER_LICENSE_MAIN("DriverLicense-Main", "驾驶证-正⻚", OCRKey.DRIVER_LICENSE_MAIN_KEYS),
    /**
     *  驾驶证-副⻚
     */
    DRIVER_LICENSE_SIDE("DriverLicense-Side", "驾驶证-副⻚", OCRKey.DRIVER_LICENSE_SIDE_KEYS),
    /**
     *  ⾏驶证-正⻚-挂车
     */
    VEHICLE_LICENSE_MAIN_GUA("VehicleLicense-Main-Gua", "⾏驶证-正⻚-挂车", OCRKey.VEHICLE_LICENSE_MAIN_KEYS),
    /**
     *  ⾏驶证-正⻚-其他
     */
    VEHICLE_LICENSE_MAIN_OTHERS("VehicleLicense-Main-Others", "⾏驶证-正⻚-其他", OCRKey.VEHICLE_LICENSE_MAIN_KEYS),
    /**
     *  ⾏驶证-正⻚
     */
    VEHICLE_LICENSE_MAIN("VehicleLicense-Main", "⾏驶证-正⻚", OCRKey.VEHICLE_LICENSE_MAIN_KEYS),
    /**
     *  ⾏驶证-副⻚
     */
    VEHICLE_LICENSE_SIDE("VehicleLicense-Side", "⾏驶证-副⻚", OCRKey.VEHICLE_LICENSE_SIDE_KEYS),
    /**
     *  ⻋头
     */
    CAR_FRONT("Car-Front", "⻋头", OCRKey.CAR_FRONT_KEYS),
    /**
     *  ⻋尾
     */
    CAR_BACK("Car-Back", "⻋尾", OCRKey.CAR_BACK_KEYS),
    // =======================下面是非erp识别所需信息，录入配置非磅单类型====================
    /**
     *  未知
     */
    UNKNOWN("UNK", "未知"),
    /**
     *  其他
     */
    OTHERS("Others", "其他"),
    /**
     *  证件
     */
    CARD("CARD", "证件"),
    /**
     *  碎片
     */
    SCRAP("Scrap", "碎片"),
    /**
     *  有⻋辆没有检测到⻋牌
     */
    NO_PLATE("NoPlate", "有⻋辆没有检测到⻋牌"),
    /**
     *  ⽆⻋
     */
    NO_CAR("NoCar", "⽆⻋"),
    ;
    /**
     *  类型标识
     */
    private final String id;
    /**
     *  类型
     */
    private final String type;
    /**
     *  key列表
     */
    private final List<OCRKey.KeyInfo> keys;

    OCRImageType(String id, String type) {
        this.id = id;
        this.type = type;
        this.keys = Collections.emptyList();
    }
}
