package com.ruoyi.cai.mq.dto;

import com.ruoyi.cai.mq.CommonDelayTypeEnum;
import lombok.Data;

@Data
public class CommonDelayDto {
    /**
     * @see com.ruoyi.cai.mq.CommonDelayTypeEnum
     */
    private Integer type;
    private Long forbidId;

    public CommonDelayTypeEnum getTypeEnum(){
        CommonDelayTypeEnum[] values = CommonDelayTypeEnum.values();
        for (CommonDelayTypeEnum value : values) {
            if(value.getCode().equals(this.type)){
                return value;
            }
        }
        return null;
    }
}
