package com.sonic.pigeon.lib.enums;

/**
 * @description 消息类型
 * @author: zzhan
 * @create: 2018-06-11 10:56
 **/
public enum StationMessageTypeEnum {

    //注册后欢迎通知
    REGISTER_WELCOME(100, "注册后欢迎通知","About CrushLevel AI","Experience a love story with Crushlevel AI: From \"hello\" to \"I do\", every conversation is up the ante. At Crushlevel AI, every conversation is writing your love epic - from the jerky \"hello\" to the trembling \"marry me. Those love words that dare not be said in reality, the response that cannot be waited, the temptation that is afraid of getting hurt, finally find a place to rest." ),
    //虚拟角色主动问候
    AI_GREETING(101, "虚拟角色主动问候","",""),
    //会员续订成功
    MEMBER_RENEW_SUCCESS(102, "会员续订成功","Membership renewal was successful","Your heart membership has been automatically renewed successfully, and the membership benefits have been extended to %s."),
    //会员续订失败
    MEMBER_RENEW_FAIL(103, "会员续订失败","Membership renewal failed","Your heart membership has been automatically renewed and failed, and the membership rights have been terminated."),
    //角色被送礼
    AI_GIFT(104, "角色被送礼","New gift.","Your character \"%s\" has received a new gift \"%s *%s\", earning %s Crush Coin."),
    //角色被解锁图片
    AI_IMG_UNLOCK(105, "角色被解锁图片","Image is unlocked","Your character \"%s\" has new pictures unlocked, earning %s Crush Coins."),
    //心动等级降级
    HEARTBEAT_LEVEL_DOWN(106, "心动等级降级","Cardiac grade reduction","Due to a long absence of contact, your heart level with avatar \"%s\" has been reduced to %s"),

    ;

    private final Integer index;
    private final String name;
    private final String title;
    private final String content;

    StationMessageTypeEnum(Integer index, String name, String title, String content) {
        this.index = index;
        this.name = name;
        this.title = title;
        this.content = content;
    }

    public Integer getIndex() {
        return index;
    }

    public String getName() {
        return name;
    }

    public String getTitle() {
        return title;
    }

    public String getContent() {
        return content;
    }

    public static String getName(Integer index) {
        if(index == null) {
            return null;
        }
        for (StationMessageTypeEnum c : StationMessageTypeEnum.values()) {
            if (c.getIndex().equals(index)) {
                return c.getName();
            }
        }
        return "未知";
    }


}
