package com.zhiwei.manage.bean;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.stereotype.Component;

@Component
@Document(collection = "Template")
public class Template implements Serializable {

	/**
	 * 
	 */
	@Indexed
	@Id
	private String templateId;
	private String tempName;// 模板名
	private boolean mailPush;
	private String mail;// 错误信息邮箱
	private boolean needPing;// 是否需要检测连通性
	private int pingInterval;// 连通性测试间隔
	private String pingUrlOne;// 网站1
	private String pingUrlTwo;// 网站2

	private int newsNumber;// 新闻数量，每晚12点入库当日数量

	private boolean needDelayed;// 是否需要检测延时
	private double newsDelayed;// 平均延时达标时间
	private int delayedInterval;// 延时间隔

	private int testCount;// 测试需要多少条数据

	private boolean needField;// 是否需要检测字段缺失
	private String field;// 检测的字段
	private double fieldIntegrityRate;// 字段缺失率
	private int fieldInterval;// 字段缺失率统计间隔

	private String creator;// 创建者
	private Date createDate;// 创建日期
	private int templateLv;// 模板等级

	private String type;
	private String source;
	private String pt;// 渠道
	private boolean open;// 开启关闭
	private String host;// 地址
	private int port;// 端口
	private String collection;// 表名
	private String dBName;// 数据库名
	private String time;
	private String savetime;
	private String spyderInfoId;

	private boolean wechatPush;
	private String openid;

	public String getTemplateId() {
		return templateId;
	}

	public void setTemplateId(String templateId) {
		this.templateId = templateId;
	}

	public String getTempName() {
		return tempName;
	}

	public void setTempName(String tempName) {
		this.tempName = tempName;
	}

	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public boolean isNeedPing() {
		return needPing;
	}

	public void setNeedPing(boolean needPing) {
		this.needPing = needPing;
	}

	public int getPingInterval() {
		return pingInterval;
	}

	public void setPingInterval(int pingInterval) {
		this.pingInterval = pingInterval;
	}

	public String getPingUrlOne() {
		return pingUrlOne;
	}

	public void setPingUrlOne(String pingUrlOne) {
		this.pingUrlOne = pingUrlOne;
	}

	public String getPingUrlTwo() {
		return pingUrlTwo;
	}

	public void setPingUrlTwo(String pingUrlTwo) {
		this.pingUrlTwo = pingUrlTwo;
	}

	public int getNewsNumber() {
		return newsNumber;
	}

	public void setNewsNumber(int newsNumber) {
		this.newsNumber = newsNumber;
	}

	public boolean isNeedDelayed() {
		return needDelayed;
	}

	public void setNeedDelayed(boolean needDelayed) {
		this.needDelayed = needDelayed;
	}

	public double getNewsDelayed() {
		return newsDelayed;
	}

	public void setNewsDelayed(double newsDelayed) {
		this.newsDelayed = newsDelayed;
	}

	public int getDelayedInterval() {
		return delayedInterval;
	}

	public void setDelayedInterval(int delayedInterval) {
		this.delayedInterval = delayedInterval;
	}

	public int getTestCount() {
		return testCount;
	}

	public void setTestCount(int testCount) {
		this.testCount = testCount;
	}

	public boolean isNeedField() {
		return needField;
	}

	public void setNeedField(boolean needField) {
		this.needField = needField;
	}

	public String getField() {
		return field;
	}

	public void setField(String field) {
		this.field = field;
	}

	public double getFieldIntegrityRate() {
		return fieldIntegrityRate;
	}

	public void setFieldIntegrityRate(double fieldIntegrityRate) {
		this.fieldIntegrityRate = fieldIntegrityRate;
	}

	public int getFieldInterval() {
		return fieldInterval;
	}

	public void setFieldInterval(int fieldInterval) {
		this.fieldInterval = fieldInterval;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public int getTemplateLv() {
		return templateLv;
	}

	public void setTemplateLv(int templateLv) {
		this.templateLv = templateLv;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getPt() {
		return pt;
	}

	public void setPt(String pt) {
		this.pt = pt;
	}

	public boolean isOpen() {
		return open;
	}

	public void setOpen(boolean open) {
		this.open = open;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getCollection() {
		return collection;
	}

	public void setCollection(String collection) {
		this.collection = collection;
	}

	public String getdBName() {
		return dBName;
	}

	public void setdBName(String dBName) {
		this.dBName = dBName;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public String getSavetime() {
		return savetime;
	}

	public void setSavetime(String savetime) {
		this.savetime = savetime;
	}

	public String getSpyderInfoId() {
		return spyderInfoId;
	}

	public void setSpyderInfoId(String spyderInfoId) {
		this.spyderInfoId = spyderInfoId;
	}

	public boolean isMailPush() {
		return mailPush;
	}

	public void setMailPush(boolean mailPush) {
		this.mailPush = mailPush;
	}

	public boolean isWechatPush() {
		return wechatPush;
	}

	public void setWechatPush(boolean wechatPush) {
		this.wechatPush = wechatPush;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	@Override
	public String toString() {
		return "Template [templateId=" + templateId + ", tempName=" + tempName + ", mailPush=" + mailPush + ", mail="
				+ mail + ", needPing=" + needPing + ", pingInterval=" + pingInterval + ", pingUrlOne=" + pingUrlOne
				+ ", pingUrlTwo=" + pingUrlTwo + ", newsNumber=" + newsNumber + ", needDelayed=" + needDelayed
				+ ", newsDelayed=" + newsDelayed + ", delayedInterval=" + delayedInterval + ", testCount=" + testCount
				+ ", needField=" + needField + ", field=" + field + ", fieldIntegrityRate=" + fieldIntegrityRate
				+ ", fieldInterval=" + fieldInterval + ", creator=" + creator + ", createDate=" + createDate
				+ ", templateLv=" + templateLv + ", type=" + type + ", source=" + source + ", pt=" + pt + ", open="
				+ open + ", host=" + host + ", port=" + port + ", collection=" + collection + ", dBName=" + dBName
				+ ", time=" + time + ", savetime=" + savetime + ", spyderInfoId=" + spyderInfoId + ", wechatPush="
				+ wechatPush + ", openid=" + openid + "]";
	}

}
