package com.ruoyi.enums.message;

import java.util.Arrays;

/**
 * 订单消息枚举
 * @Author liwenlong
 */
public enum OrderMessageEnums {

    STORE_RELEASE_ORDER(1, "表现师发布订单","您有新的订单 请及时查看"),
    RECEIVING_ORDER(2, "订单确认提醒","您发布的orderNo订单已经有表现师接单"),
    CONFIRM(3, "客户已确定表现师","orderNo订单，您已接单成功"),

    NOT_CONFIRM(4, "未确认提醒","您接取的orderNo订单，未被确认"),

    APPEAL(5, "申诉提醒","您的orderNo订单已被投诉，请尽快处理"),

    CANCEL_APPEAL(501, "取消申诉提醒","您的orderNo订单投诉已取消"),

    ADJUST_PRICE(6, "申请调价提醒","您的orderNo订单有调价申请,请及时查看"),

    ADJUST_PRICE_CONFIRM(7, "调价确认","您的orderNo订单的调价申请已通过"),

    ADJUST_PRICE_REFUSE(8, "调价拒绝","您的orderNo订单的调价申请已被拒绝"),

    FINAL_PAY(9, "客户已支付尾款","客户已支付尾款，请及时上传大图"),

    EXTENSION(10, "延期提醒","您的orderNo订单有延期申请,请及时查看 "),

    EXTENSION_CONFIRM(11, "延期确认","您的orderNo订单的延期申请已通过"),

    EXTENSION_REFUSE(12, "延期拒绝","您的orderNo订单的延期申请已被拒绝"),

    ORDER_AUTO_CONFIRM_DELIVER(13, "对图时间已超时","您的orderNo订单对图时间已超时"),


    APPEAL_RESULT(14, "申诉结果提醒","申诉结果提醒"),

    UPLOAD_LARGE_IMAGES(15, "大图上传提醒","表现师已上传大图"),





    MALL_PAY_ORDER(16, "您已下单成功！","您已下单成功，我们将尽快为您发货"),

    MALL_ORDER_SEND(17, "订单发货","您的商品已发货，请及时关注物流信息"),

    MALL_ORDER_REFUND(18, "售后申请成功！","亲，您已售后申请成功，等待平台审核中......"),


    APPEAL_MESSAGE(19, "申诉消息","%1s发送了一条申诉消息"),

    FIRST_PRICE_PAY(20, "定金支付提醒","您的orderNo订单定金已支付"),

    CUSTOMER_CHOOSE_STORE(21, "设计师指定表现师发布订单","您有新的订单 请及时查看"),

    EVALUATE_ORDER(22, "订单评分提醒","您的orderNo订单评分已完成，请注意查看"),

    ORDER_STORE_CANCEL(23, "订单取消提醒","您的orderNo订单被表现师取消"),

    ORDER_ILLEGAL_DEDUCTION(24, "订单扣款提醒","你因订单%s被扣款%s元;扣款原因：%s"),

    ORDER_ILLEGAL_DEDUCTION_CANCEL(25, "订单扣款退回提醒","您的orderNo订单平台扣款amount元已退回"),
    ;

    private final Integer code;
    private final String title;
    private final String content;

    public static String getTitle(Integer code) {
        return getOrderMessageEnums(code).title;
    }

    public static String getContent(Integer code) {
        return getOrderMessageEnums(code).content;
    }

    public static OrderMessageEnums getOrderMessageEnums(Integer code) {
        return Arrays.stream(OrderMessageEnums.values()).filter(c->c.getCode().equals(code)).findFirst().get();
    }

    OrderMessageEnums(Integer code, String title, String content) {
        this.code = code;
        this.title = title;
        this.content = content;
    }

    public Integer getCode() {
        return code;
    }

    public String getTitle() {
        return title;
    }


    public String getContent() {
        return content;
    }


}
