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_type", alias="a", label="消息类型信息", columns={
		@Column(name="message_type_id", attrName="messageTypeId", label="id", isPK=true),
		@Column(name="type_code", attrName="typeCode", label="类型编码"),
		@Column(name="type_name", attrName="typeName", label="名称", queryType=QueryType.LIKE),
		@Column(name="type_sort", attrName="typeSort", label="排序", isUpdateForce=true),
		@Column(name="type_icon", attrName="typeIcon", label="图标"),
		@Column(name="small_icon", attrName="smallIcon", label="小图标"),
		@Column(name="open_type", attrName="openType", label="打开方式"),
		@Column(name="page_callback", attrName="pageCallback", label="页面回调"),
		@Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
		@Column(name="create_time", attrName="createTime", label="create_time", isUpdateForce=true),
	}, orderBy="a.message_type_id DESC"
)
public class YinetMessageType extends DataEntity<YinetMessageType> {
	
	private static final long serialVersionUID = 1L;
	private Long messageTypeId;		// id
	private String typeCode;		// 类型编码
	private String typeName;		// 名称
	private Long typeSort;		// 排序
	private String typeIcon;		// 图标
	private String smallIcon;		// 小图标
	private String openType;		// 打开方式
	private String pageCallback;		// 页面回调
	private Date createTime;		// create_time
	
	public YinetMessageType() {
		this(null);
	}
	
	public YinetMessageType(String id){
		super(id);
	}
	
	public Long getMessageTypeId() {
		return messageTypeId;
	}

	public void setMessageTypeId(Long messageTypeId) {
		this.messageTypeId = messageTypeId;
	}
	
	@Size(min=0, max=50, message="类型编码长度不能超过 50 个字符")
	public String getTypeCode() {
		return typeCode;
	}

	public void setTypeCode(String typeCode) {
		this.typeCode = typeCode;
	}
	
	@Size(min=0, max=50, message="名称长度不能超过 50 个字符")
	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	
	public Long getTypeSort() {
		return typeSort;
	}

	public void setTypeSort(Long typeSort) {
		this.typeSort = typeSort;
	}
	
	@Size(min=0, max=255, message="图标长度不能超过 255 个字符")
	public String getTypeIcon() {
		return typeIcon;
	}

	public void setTypeIcon(String typeIcon) {
		this.typeIcon = typeIcon;
	}
	
	@Size(min=0, max=255, message="小图标长度不能超过 255 个字符")
	public String getSmallIcon() {
		return smallIcon;
	}

	public void setSmallIcon(String smallIcon) {
		this.smallIcon = smallIcon;
	}
	
	@Size(min=0, max=255, message="打开方式长度不能超过 255 个字符")
	public String getOpenType() {
		return openType;
	}

	public void setOpenType(String openType) {
		this.openType = openType;
	}
	
	@Size(min=0, max=255, message="页面回调长度不能超过 255 个字符")
	public String getPageCallback() {
		return pageCallback;
	}

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

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