package com.yuchen.saas.park.api.enums;

import lombok.AllArgsConstructor;

/**
 * 拍报类型:0其他,1违规停车占道,2设备异常故障,3环境卫生问题,4违规不良行为
 */
@AllArgsConstructor
public enum SnapshotNewspaperEnum {


    OTHER(0, "其他"),
    ILLEGAL_PARKING_AND_OBSTRUCTION(1, "违规停车占道,"),
    EQUIPMENT_ABNORMAL_FAULT(2, "设备异常故障"),
    ENVIRONMENTAL_HEALTH_PROBLEM(3, "环境卫生问题"),
    ILLEGAL_AND_BAD_BEHAVIOR(4, "违规不良行为");

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    private String description;

    public static String getDescByCode(Integer code) {
        SnapshotNewspaperEnum[] enumArray = SnapshotNewspaperEnum.values();
        for (SnapshotNewspaperEnum e : enumArray) {
            if (e.getCode().equals(code)) {
                return e.getDescription();
            }
        }
        return "";
    }
}
