package com.hfkj.sysenum.cms;

import lombok.Getter;

import java.util.Objects;

/**
 * @className: CmsTypeEnum
 * @author: HuRui
 * @date: 2024/9/24
 **/
@Getter
public enum CmsStatusEnum {
    /**
     * 删除
     */
    status0(0 , "删除"),
    /**
     * 编辑中
     */
    status1(1 , "编辑中"),
    /**
     * 已上线
     */
    status2(2 , "已上线"),
    /**
     * 已下线
     */
    status3(3 , "已下线"),
    ;

    private Integer status;

    private String name;

    CmsStatusEnum(int status , String name) {
        this.status = status;
        this.name = name;
    }

    public static CmsStatusEnum getDataByType(Integer status) {
        for (CmsStatusEnum ele : values()) {
            if(Objects.equals(status,ele.getStatus())) return ele;
        }
        return null;
    }

}
