package cn.axzo.msg.center.domain.entity;

import cn.axzo.msg.center.domain.enums.RequestReplayType;
import cn.axzo.msg.center.domain.persistence.BaseEntityExt;
import cn.axzo.msg.center.domain.utils.IgnorePropsJsonTypeHandler;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

/**
 * @author yanglin
 */
@Setter
@Getter
@TableName(value = "request_replay", autoResultMap = true)
public class RequestReplay extends BaseEntityExt<RequestReplay> {

    /**
     * 模版编码
     */
    private String templateCode;

    /**
     * 业务编码
     */
    private String bizCode;

    /**
     * 子业务编码
     */
    private String subBizCode;

    /**
     * 请求类型. TODO_SEND: 发送待办, IM_CARD_SEND: 发送IM卡片
     */
    private RequestReplayType type;

    /**
     * 请求的hash值, 具体hash算法未指定
     */
    private String hash;

    /**
     * 请求
     */
    @TableField(typeHandler = IgnorePropsJsonTypeHandler.class)
    private JSONObject request;

}