package com.jeesite.modules.consult.entity;

import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

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 wxm
 * @version 2022-06-07
 */
@Table(name="${_prefix}consult_help", alias="a", label="咨询帮助 主表信息", columns={
		@Column(name="id", attrName="id", label="主键id", isPK=true),
		@Column(name="consult_type", attrName="consultType", label="咨询类型"),
		@Column(name="net_url", attrName="netUrl", label="网页地址"),
		@Column(name="content", attrName="content", label="咨询内容"),
		@Column(name="title", attrName="title", label="咨询标题", queryType=QueryType.LIKE),
		@Column(name="dept_id", attrName="deptId", label="受理部门id", isUpdateForce=true),
		@Column(name="user_id", attrName="userId", label="用户id", isUpdateForce=true),
		@Column(name="user_name", attrName="userName", label="咨询人姓名", queryType=QueryType.LIKE),
		@Column(name="del", attrName="del", label="0 默认 1 删除", isUpdateForce=true),
		@Column(name="create_time", attrName="createTime", label="咨询时间", isUpdateForce=true),
	}, orderBy="a.id DESC"
)
public class ConsultHelp extends DataEntity<ConsultHelp> {
	
	private static final long serialVersionUID = 1L;
	private String consultType;		// 咨询类型
	private String title;		// 咨询标题
	private String deptId;		// 受理部门id
	private String userId;		// 用户id
	private String userName;		// 咨询人姓名
	private String del;		// 0 默认 1 删除
	private Date createTime;		// 咨询时间
	private String netUrl; //网址链接
	private String content; //咨询内容
	private List<ConsultHelpSlave> consultHelpSlaves = new ArrayList<>();  //存放回复|评论过我的所有数据集合
	
	public ConsultHelp() {
		this(null);
	}
	
	public ConsultHelp(String id){
		super(id);
	}
	
	@Size(min=0, max=50, message="咨询类型长度不能超过 50 个字符")
	public String getConsultType() {
		return consultType;
	}

	public void setConsultType(String consultType) {
		this.consultType = consultType;
	}
	
	@Size(min=0, max=100, message="咨询标题长度不能超过 100 个字符")
	public String getTitle() {
		return title;
	}

	@Size(min=0, max=200, message="网址链接长度不能超过 200 个字符")
	public String getNetUrl() {
		return netUrl;
	}

	public void setNetUrl(String netUrl) {
		this.netUrl = netUrl;
	}

	@Size(min=0, max=200, message="咨询内容长度不能超过 200个字符")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getDeptId() {
		return deptId;
	}

	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}
	
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	@Size(min=0, max=255, message="咨询人姓名长度不能超过 255 个字符")
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	public String getDel() {
		return del;
	}

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

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

	public List<ConsultHelpSlave> getConsultHelpSlaves() {
		return consultHelpSlaves;
	}

	public void setConsultHelpSlaves(List<ConsultHelpSlave> consultHelpSlaves) {
		this.consultHelpSlaves = consultHelpSlaves;
	}
}