package digital.laboratory.platform.imr.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 申请的状态
 */
@Getter
@RequiredArgsConstructor
public enum ApplyStatus {

    //FAIL
    FIRST_LEVEL_FAIL(-2,"一级审核不通过"),
    SECOND_LEVEL_FAIL(-3,"二级审核不通过"),
    APPROVAL_FAILED(-4,"审批不通过"),
    TO_BE_SUBMITTED(0,"已创建待提交"),
    WITHDRAWN(-1,"已撤回"),
    FIRST_LEVEL(1,"待一级审核"),
    SECOND_LEVEL(2,"待二级审核"),
    PENDING_APPROVAL(3,"待审批"),
    APPROVED(4,"审批通过");
    @EnumValue//标记数据库存的值是status
    private final int status;
    @JsonValue//标记返回前端字段
    private final String description;

}
