package com.yonge.cooleshow.biz.dal.wrapper.im;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 客服消息
 * Created by Eric.Shang on 2022/9/30.
 */
public class CustomerService {

    /**
     * 客服通知消息
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class NotifyMessage implements Serializable {

        private List<String> receives;

        private String title;
        private String txtMessage;
        private String imgMessage;
        private String imgUrl;

        public static NotifyMessage from(String recv) {

            return JSON.parseObject(recv, NotifyMessage.class);
        }
    }
}
