package com.seer.teach.user.app.auth;

import com.fasterxml.jackson.annotation.JsonValue;

public enum LoginType {

    /**
     * 孩子账号登录
     */
    CHILDREN_ACCOUNT("children_account", "孩子账号登录"),

    /**
     * 微信小程序登录
     */
    WECHAT_MINI("wechat_mini", "微信小程序登录"),

    /**
     * 微信公众号登录
     */
    WECHAT_OAUTH("wechat_oauth", "微信公众号登录"),

    /**
     * 仓库登录
     */
    WAREHOUSE_ACCOUNT("warehouse_account", "仓库登录"),

    /**
     * 微信公众号账号密码登录
     */
    WECHAT_OAUTH_WITH_ACCOUNT("wechat_oauth_with_account", "微信公众号账号密码登录");

    private String code;

    private String desc;

    LoginType(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    @JsonValue
    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}