package com.daya.live_teaching.model;

/**
 * 请求行为
 */
public enum InviteAction {
    INVITE(0), // 邀请

    REJECT(1), // 拒绝

    APPROVE(2), // 同意

    UNKNOWN(-999);

    private int type;

    InviteAction(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public static InviteAction getAction(int type) {
        InviteAction[] values = InviteAction.values();
        for (InviteAction action : values) {
            if (action.type == type) {
                return action;
            }
        }

        return UNKNOWN;
    }
}
