package com.jeesite.modules.admin.wenjuan.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 wlc
 * @version 2022-06-22
 */
@Table(name="admin_questionnaire_record", alias="a", label="问卷调查记录表信息", columns={
		@Column(name="questionrecord_id", attrName="questionrecordId", label="主键ID", isPK=true),
		@Column(name="user_code", attrName="userCode", label="用户编码", comment="用户编码(区分用户)"),
		@Column(name="questionnaire_id", attrName="questionnaireId", label="调查问卷ID"),
		@Column(name="record_date", attrName="recordDate", label="记录日期", isUpdateForce=true),
		@Column(name="ip", attrName="ip", label="IP"),
		@Column(name="cookie", attrName="cookie", label="Cookie"),
		@Column(name="ques_total", attrName="quesTotal", label="问卷总票数", isUpdateForce=true),
		@Column(name="item_total", attrName="itemTotal", label="问卷项总票数", isUpdateForce=true),
		@Column(name="opt_total", attrName="optTotal", label="问卷选项总票数", isUpdateForce=true),
		@Column(name="create_by", attrName="createBy", label="创建者", isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isUpdateForce=true),
		@Column(name="update_by", attrName="updateBy", label="更新者", isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="更新时间", isUpdateForce=true),
		@Column(name="remarks", attrName="remarks", label="备注"),
	}, orderBy="a.update_date DESC"
)
public class AdminQuestionnaireRecord extends DataEntity<AdminQuestionnaireRecord> {
	
	private static final long serialVersionUID = 1L;
	private String questionrecordId;		// 主键ID
	private String userCode;		// 用户编码(区分用户)
	private String questionnaireId;		// 调查问卷ID
	private Date recordDate;		// 记录日期
	private String ip;		// IP
	private String cookie;		// Cookie
	private Long quesTotal;		// 问卷总票数
	private Long itemTotal;		// 问卷项总票数
	private Long optTotal;		// 问卷选项总票数
	
	public AdminQuestionnaireRecord() {
		this(null);
	}
	
	public AdminQuestionnaireRecord(String id){
		super(id);
	}
	
	public String getQuestionrecordId() {
		return questionrecordId;
	}

	public void setQuestionrecordId(String questionrecordId) {
		this.questionrecordId = questionrecordId;
	}
	
	@Size(min=0, max=255, message="用户编码长度不能超过 255 个字符")
	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	
	@Size(min=0, max=255, message="调查问卷ID长度不能超过 255 个字符")
	public String getQuestionnaireId() {
		return questionnaireId;
	}

	public void setQuestionnaireId(String questionnaireId) {
		this.questionnaireId = questionnaireId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getRecordDate() {
		return recordDate;
	}

	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}
	
	@Size(min=0, max=255, message="IP长度不能超过 255 个字符")
	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}
	
	@Size(min=0, max=255, message="Cookie长度不能超过 255 个字符")
	public String getCookie() {
		return cookie;
	}

	public void setCookie(String cookie) {
		this.cookie = cookie;
	}
	
	public Long getQuesTotal() {
		return quesTotal;
	}

	public void setQuesTotal(Long quesTotal) {
		this.quesTotal = quesTotal;
	}
	
	public Long getItemTotal() {
		return itemTotal;
	}

	public void setItemTotal(Long itemTotal) {
		this.itemTotal = itemTotal;
	}
	
	public Long getOptTotal() {
		return optTotal;
	}

	public void setOptTotal(Long optTotal) {
		this.optTotal = optTotal;
	}
	
}