package com.gic.haoban.manage.api.enums;

/**
 * Created by hua on 2021/12/17.
 */
public enum NoticeMessageTypeEnum {

    ACTIVITY_START(1001, "活动开始通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_start", "/pages/route/index?pageType=", "hbapp_activity_detail"),
    ACTIVITY_NEW(1002, "活动上新通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_new", "/pages/route/index?pageType=", "hbapp_activity_detail"),
    ACTIVITY_DEL(1003, "活动删除通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_del", "/pages/route/index", ""),
    ACTIVITY_OFFLINE(1004, "活动下线通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_offline", "/pages/route/index?pageType=", "hbapp_activity_ranking"),
    ACTIVITY_END(1005, "活动结束通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_end", "/pages/route/index?pageType=", "hbapp_activity_ranking"),
    ACTIVITY_RANK(1006, "活动排名通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_rank", "/pages/route/index?pageType=", "hbapp_activity_ranking"),
    ACTIVITY_AWARD(1007, "活动奖励通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_award", "/pages/route/index?pageType=", "hbapp_activity_ranking"),

    TEL_TASK_CREATE(2001, "话务任务通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "task_create", "/pages/route/index?pageType=", "hbapp_task_list_new"),
    TEL_TASK_OVERDUE(2002, "话务任务逾期推送", NoticeMessageCategoryTypeEnum.TASK.getType(), "task_overdue", "/pages/route/index?pageType=", "hbapp_marketing_task_list"),
    //没集成 还没有
    TEL_TASK_INVALID(2003, "话务任务逾期失效通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "task_nvalid", "/pages/route/index?pageType=", "hbapp_marketing_task_list"),
    GROUP_TASK_CREATE(2004, "群发任务通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "group_task_create", "/pages/route/index?pageType=", "hbapp_marketing_task_list"),
    GROUP_TASK_OVERDUE(2005, "群发任务逾期通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "group_task_overdue", "/pages/route/index?pageType=", "hbapp_marketing_task_list"),
    //没集成 还没有
    GROUP_TASK_INVALID(2006, "群发任务逾期失效通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "group_task_invalid", "/pages/route/index?pageType=", "hbapp_marketing_task_list"),
    PERFORMANCE_TASK_CREATE(2007, "指标任务通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "performance_task_create", "/pages/route/index?pageType=", "hbapp_task_kpi_detail"),
    EVALUATE_TASK_CREATE(2008, "不良评价通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "evaluate_task_create", "/pages/route/index?pageType=", "hbapp_task_detail"),
    PERFORMANCE_TASK_CHANGE(2009, "指标任务通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "performance_task_change", "/pages/route/index?pageType=", "hbapp_task_kpi_detail"),

    TASK_TRANS(2010, "话务任务通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "task_trans", "/pages/route/index?pageType=", "hbapp_task_list_new"),


    STORE_ACCOUNT(3001, "账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account", "/pages/route/index?pageType=", "store_relate_store_record_list"),
    MEMBER_FACE(3002, "账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "member_face", "/pages/route/index?pageType=", "hbapp_customer_edit_tag"),
    STORE_ACCOUNT_REFUSE(3010, "账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account_refuse", "/pages/route/index?pageType=", "store_relate_store_record_list"),
    STORE_ACCOUNT_AGREE(3011, "账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account_agree", "/pages/route/index?pageType=", "store_relate_store_record_list"),

    CLERK_ADD_REFUSE(3020, "导购新增通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "clerk_add_refuse", "/pages/route/index?pageType=", "store_relate_store_record_list"),
    CLERK_ADD_AGREE(3021, "导购新增通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "clerk_add_agree", "/pages/route/index?pageType=", "store_relate_store_record_list"),
    CLERK_DEL_REFUSE(3022, "导购删除通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "clerk_del_refuse", "/pages/route/index?pageType=", "store_relate_store_record_list"),
    CLERK_DEL_AGREE(3023, "导购删除通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "clerk_del_agree", "/pages/route/index?pageType=", "store_relate_store_record_list"),
    STORE_EDIT_REFUSE(3024, "门店信息修改通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_edit_refuse", "/pages/route/index?pageType=", "store_detail"),
    STORE_EDIT_AGREE(3025, "门店信息修改通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_edit_agree", "/pages/route/index?pageType=", "store_detail"),
    DAILY_REPORT(3031, "云日报通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "daily_report", "/pages/route/index?pageType=", "hbapp_task_daily_report_detail"),
    DAILY_REPORT_TRANS(3033, "云日报通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "daily_report_trans", "/pages/route/index?pageType=", "hbapp_task_daily_report_detail"),

    CASH_OUT_REFUSE(3040, "提现通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "cash_out_refuse", "/pages/route/index?pageType=", "hbapp_withdraw_list"),
    
    OFFLINE_PRE(3041, "预约提醒", NoticeMessageCategoryTypeEnum.OTHER.getType(), "task_overdue", "/pages/route/index?pageType=", "hbapp_appointment_list"),


    CUSTOMER_MOVE(3052, "客户变动通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "customer_move", "/pages/route/index?pageType=", "hbapp_customer_list"),
    CUSTOMER_MOVED(3053, "客户变动通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "customer_moved", "/pages/route/index?pageType=", "hbapp_customer_list"),
    CUSTOMER_UNBIND(3054, "客户变动通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "customer_unbind", "/pages/route/index?pageType=", "hbapp_customer_list"),

    CUSTOMER_ORDER_CREATE(4001, "客户下单通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_order_create", "/pages/route/index?pageType=", "hbapp_customer_order_detail"),
    CUSTOMER_ORDER_REFUND(4002, "客户退单通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_order_refund", "/pages/route/index?pageType=", "hbapp_withdraw_list"),
    CUSTOMER_ORDER_LOOK(4003, "客户浏览通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_order_look", "/pages/route/index?pageType=", "hbapp_customer_look_goods"),
    CUSTOMER_GET_COUPON(4004, "客户领券通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_get_coupon", "/pages/route/index?pageType=", "hbapp_customer_detail"),
    CUSTOMER_APPLY_ORDER_REFUND(4005, "客户申请退单通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_apply_order_refund", "/pages/route/index?pageType=", "hbapp_customer_order_detail"),
    CUSTOMER_SUCCESS_ORDER_REFUND(4006, "客户成功退单通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_success_order_refund", "/pages/route/index?pageType=", "hbapp_user_bill_detail"),

    MATERIAL_NEW_NOTIFY(6001, "素材上新通知", NoticeMessageCategoryTypeEnum.MATERIAL.getType(), "material_new_notify", "/pages/route/index?pageType=", "hbapp_material_center"),
    MATERIAL_WEEK_REPORT(6002, "素材周报通知", NoticeMessageCategoryTypeEnum.MATERIAL.getType(), "material_week_notify", "/pages/route/index?pageType=", "hbapp_material_report"),

    ;
    /**
     * 消息类型
     */
    private int type;
    /**
     * 消息名称
     */
    private String name;
    /**
     * 大类
     */
    private int category;
    /**
     * 模板类型
     */
    private String templateCode;

    /**
     * 活动页面
     */
    private String pageUrl;
    /**
     * 前端的页面类型
     */
    private String pageType;

    NoticeMessageTypeEnum(int type, String name, int category, String templateCode, String pageUrl, String pageType) {
        this.type = type;
        this.name = name;
        this.category = category;
        this.templateCode = templateCode;
        this.pageUrl = pageUrl;
        this.pageType = pageType;
    }


    public String getTemplateCode() {
        return templateCode;
    }

    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }

    public String getPageType() {
        return pageType;
    }

    public void setPageType(String pageType) {
        this.pageType = pageType;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCategory() {
        return category;
    }

    public void setCategory(int category) {
        this.category = category;
    }

    public String getPageUrl() {
        return pageUrl;
    }

    public void setPageUrl(String pageUrl) {
        this.pageUrl = pageUrl;
    }

    public static NoticeMessageTypeEnum getByType(int type) {
        for (NoticeMessageTypeEnum messageTypeEnum : values()) {
            if (messageTypeEnum.getType() == type) {
                return messageTypeEnum;
            }
        }
        return null;
    }
}
