package com.storlead.message.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import com.storlead.framework.annotate.Dict;
import com.storlead.framework.mybatis.entity.SysBaseField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 实践规则模板
 * </p>
 *
 * @author chenkq
 * @since 2024-04-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("message_template_event_group")
@ApiModel(value="MessageTemplateEventGroupEntity对象", description="实践规则模板")
public class MessageTemplateEventGroupEntity extends SysBaseField {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "模块名称")
    private String templateServiceName;

    @ApiModelProperty(value = "应用 ID，对应 sys_app.id")
    private Long appId;

    @ApiModelProperty(value = "业务模块，对应消息类型")
    @Dict(dictCode = "work_data_group",valueField = "templateServiceName")
    private Integer templateServiceType;

    @ApiModelProperty(value = " 对应server 业务模块，匹配表名")
    private String templateServiceCode;

    @ApiModelProperty(value = "事件")
    private String eventName;

    @ApiModelProperty(value = "事件 code")
    private String eventCode;

    @ApiModelProperty(value = "事件规则")
    private String eventRuleScript;

    @ApiModelProperty(value = "接收人key")
    private String receiverKey;

    @ApiModelProperty(value = "通知的APPCODE")
    private String noticeAppCode;

    @ApiModelProperty(value = "模板变量配置 JSON，元素结构同 MessageArgTemplateVO：propertyName、propertyKey")
    private String argTemplateJson;

}
