package com.yonge.cooleshow.biz.dal.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.yonge.toolset.base.enums.BaseEnum;

/**
 * Description 收费类型(FREE:免费;VIP:会员;CHARGE:单曲收费)
 *
 * @author: liujunchi
 * @date: 2022-03-30
 */
public enum ChargeTypeEnum implements BaseEnum<String, ChargeTypeEnum> {
    FREE("免费"),
    VIP("会员"),
    CHARGE("单曲收费");
    @EnumValue
    private String code;
    private String msg;

    ChargeTypeEnum(String msg) {
        this.code = this.name();
        this.msg = msg;
    }

    public String getMsg() {
        return this.msg;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    /**
     * 收费类型匹配
     * @param type 收费类型
     * @return boolean
     */
    public boolean match(String type) {

        return getCode().equals(type);
    }
}
