package com.crunii.micro.domain.entity.main;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "YCQ_MESSAGE_TEMPLATE")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of = {"templateId"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "消息通知表")
public class YcqMessageTemplate {
    @Id
    @GeneratedValue(generator = "idGenerator")
    @Column(name = "TEMPLATE_ID")
    @ApiModelProperty(name = "模板id",notes = "")
    private Long templateId ;
    /** 系统id */
    @ApiModelProperty(name = "系统id",notes = "")
    @Column(name = "APP_ID")
    private Long appId ;
    /** 系统名称 */
    @ApiModelProperty(name = "系统名称",notes = "")
    @Column(name = "SYSTEM_NAME")
    private String systemName ;
    /** 场景名称 */
    @ApiModelProperty(name = "场景名称",notes = "")
    @Column(name = "SCENE_NAME")
    private String sceneName ;
    /** 标题 */
    @ApiModelProperty(name = "标题",notes = "")
    @Column(name = "TITLE")
    private String title ;
    /** 消息模板 */
    @ApiModelProperty(name = "消息模板",notes = "")
    @Column(name = "MESSAGE_TEMPLATE")
    private String messageTemplate ;
    /** 推送方式 */
    @ApiModelProperty(name = "推送方式",notes = "")
    @Column(name = "PUSH_TYPE")
    private String pushType ;
    /** 推送终端 */
    @ApiModelProperty(name = "推送终端",notes = "")
    @Column(name = "PUSH_ENDPOINT")
    private String pushEndpoint ;
    /** 是否为常用模板 */
    @ApiModelProperty(name = "是否为常用模板",notes = "")
    @Column(name = "TEMPLATE_TYPE")
    private Byte templateType ;
    /** 是否启用 */
    @ApiModelProperty(name = "是否启用",notes = "")
    @Column(name = "status")
    private Byte status;
    /** 删除标识 */
    @ApiModelProperty(name = "删除标识",notes = "")
    @Column(name = "DEL_FLAG")
    private Byte delFlag ;
    /** 乐观锁 */
    @ApiModelProperty(name = "乐观锁",notes = "")
    @Column(name = "revision")
    private Integer revision ;
    /** 创建人 */
    @ApiModelProperty(name = "创建人",notes = "")
    @Column(name = "CREATE_ID")
    private Integer createId ;
    /** 创建时间 */
    @ApiModelProperty(name = "创建时间",notes = "")
    @Column(name = "CREATE_TIME")
    private Date createTime ;
    /** 更新人 */
    @ApiModelProperty(name = "更新人",notes = "")
    @Column(name = "UPDATE_ID")
    private Integer updateId ;
    /** 更新时间 */
    @ApiModelProperty(name = "更新时间",notes = "")
    @Column(name = "UPDATE_TIME")
    private Date updateTime ;

    @Column(name = "ORG_ID")
    private String orgId;

    @ApiModelProperty(name = "阿里云模板id",notes = "")
    @Column(name = "TEMPLATE_CODE")
    private String templateCode;

}
