package com.chushang.system.entity.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;
import com.chushang.common.core.web.EnumUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * by zhaowenyuan create 2022/5/19 18:20
 */
@Getter
@AllArgsConstructor
public enum LoginStatusEnum implements IEnum<Integer> {
    LOGIN_SUCCESS(0, "登录成功"),
    LOGOUT_SUCCESS(1, "登录失败"),
    REGISTER_SUCCESS(2, "注册成功"),
    LOGIN_FAIL_STATUS(3, "注销成功"),
    ;

    @JsonValue
    @EnumValue
    private final Integer code;
    private final String desc;

    @Override
    public Integer getValue() {
        return this.code;
    }
}
