package com.jeesite.modules.yinet.entity;

import javax.validation.constraints.Size;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 消息渠道Entity
 * @author xqx
 * @version 2022-06-18
 */
@Table(name="yinet_message_ditch", alias="a", label="消息渠道信息", columns={
		@Column(name="message_ditch_id", attrName="messageDitchId", label="id", isPK=true),
		@Column(name="ditch_code", attrName="ditchCode", label="渠道编码"),
		@Column(name="ditch_name", attrName="ditchName", label="渠道名称", queryType=QueryType.LIKE),
		@Column(name="is_recall", attrName="isRecall", label="是否支持撤回"),
		@Column(name="ditch_sort", attrName="ditchSort", label="排序", isUpdateForce=true),
		@Column(name="create_by", attrName="createBy", label="创建人", isUpdate=false, isQuery=false),
		@Column(name="create_time", attrName="createTime", label="创建时间", isUpdateForce=true),
	}, orderBy="a.message_ditch_id DESC"
)
public class YinetMessageDitch extends DataEntity<YinetMessageDitch> {
	
	private static final long serialVersionUID = 1L;
	private Long messageDitchId;		// id
	private String ditchCode;		// 渠道编码
	private String ditchName;		// 渠道名称
	private String isRecall;		// 是否支持撤回
	private Long ditchSort;		// 排序
	private Date createTime;		// 创建时间
	
	public YinetMessageDitch() {
		this(null);
	}
	
	public YinetMessageDitch(String id){
		super(id);
	}
	
	public Long getMessageDitchId() {
		return messageDitchId;
	}

	public void setMessageDitchId(Long messageDitchId) {
		this.messageDitchId = messageDitchId;
	}
	
	@Size(min=0, max=255, message="渠道编码长度不能超过 255 个字符")
	public String getDitchCode() {
		return ditchCode;
	}

	public void setDitchCode(String ditchCode) {
		this.ditchCode = ditchCode;
	}
	
	@Size(min=0, max=255, message="渠道名称长度不能超过 255 个字符")
	public String getDitchName() {
		return ditchName;
	}

	public void setDitchName(String ditchName) {
		this.ditchName = ditchName;
	}
	
	@Size(min=0, max=10, message="是否支持撤回长度不能超过 10 个字符")
	public String getIsRecall() {
		return isRecall;
	}

	public void setIsRecall(String isRecall) {
		this.isRecall = isRecall;
	}
	
	public Long getDitchSort() {
		return ditchSort;
	}

	public void setDitchSort(Long ditchSort) {
		this.ditchSort = ditchSort;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}
