package com.api.doc.search.util;

import com.api.browser.util.ConditionType;


/**
 * 高级搜索字段
 * @author wangqs
 * */
public enum DocCondition {

	/**
	 * 属性
	 */
	DOC_SUBJECT("docsubject",ConditionType.INPUT,"","344",DbType.VARCHAR,LogicOperation.CUSTOM),//主题
	LABEL_NAME("labelName",ConditionType.INPUT,"","15456",DbType.VARCHAR,LogicOperation.CUSTOM),//字段显示名
	DOC_SUBJECT1("docsubject",ConditionType.INPUT,"","229",DbType.VARCHAR,LogicOperation.CUSTOM),//主题
	FTP_DOC_TITLE("docsubject",ConditionType.INPUT,"","229",DbType.VARCHAR,LogicOperation.CUSTOM),//标题
	SEC_CATEGORY("seccategory",ConditionType.BROWSER,BrowserType.CATEGORY,"16398",DbType.INT,LogicOperation.EQ),//目录id
	SEC_CATEGORYNAME("categoryname",ConditionType.INPUT,"","24764",DbType.VARCHAR,LogicOperation.CUSTOM),//目录名称
	SEC_CATEGORYID("categoryid",ConditionType.INPUT,"","529851",DbType.VARCHAR,LogicOperation.CUSTOM),//目录id
	DOC_NO("doccode",ConditionType.INPUT,"","714",DbType.VARCHAR,LogicOperation.LIKE), //编号（文档归档号）
	DOC_PUBLISH_TYPE("docpublishtype",ConditionType.SELECT,"","19789",DbType.INT,LogicOperation.EQ), //新闻类型(发布类型)
	TREE_DOC_FIELD_ID("treeDocFieldId",ConditionType.BROWSER,BrowserType.DUMMY,"20482",DbType.INT,LogicOperation.CUSTOM),//虚拟目录
	KEYWORD("keyword",ConditionType.INPUT,"","2005",DbType.VARCHAR,LogicOperation.CUSTOM),//关键字
	REPLAY_DOC_COUNT("replaydoccount",ConditionType.SCOPE,"","2001",DbType.INT,LogicOperation.CUSTOM),//回复数
	DOC_ISREPLY("isreply",ConditionType.SELECT,"","89",DbType.INT,LogicOperation.IN),//显示
	DOC_STATUS("docstatus",ConditionType.SELECT,"","602",DbType.INT,LogicOperation.CUSTOM), // 文档状态
	DOC_LANGURAGE("doclangurage",ConditionType.SELECT,"","231",DbType.INT,LogicOperation.EQ),//文档语言
	CRMID("crmid",ConditionType.BROWSER,"7","783",DbType.INT,LogicOperation.EQ),//相关客户id
	ASSETID("assetid",ConditionType.BROWSER,"23","858",DbType.INT,LogicOperation.EQ),//相关资产id
	HRMRESID("hrmresid",ConditionType.BROWSER,"1","792",DbType.INT,LogicOperation.EQ),//相关人员id
	PROJECTID("projectid",ConditionType.BROWSER,"8","782",DbType.INT,LogicOperation.EQ),//相关项目id
	DOC_TITLE("doctitle",ConditionType.INPUT,"","23038",DbType.VARCHAR,LogicOperation.CUSTOM),//公文标题
	DOC_REQUESTTITLE("doctitle",ConditionType.INPUT,"","26876",DbType.VARCHAR,LogicOperation.CUSTOM),//流程标题
	DOC_SENDART("docsendart",ConditionType.INPUT,"","16980",DbType.VARCHAR,LogicOperation.CUSTOM),//发文字号
	SECRET_LEVEL("secretLevel",ConditionType.BROWSER,"312","500520",DbType.INT,LogicOperation.EQ_OR_IN),//文档密级

	SUBSCRIPTION_STATE("state",ConditionType.SELECT,"","",DbType.INT,LogicOperation.EQ),//当前状态(文档订阅)
	
	CONTENTNAME("contentname",ConditionType.INPUT,"","",DbType.VARCHAR,LogicOperation.EQ),//文档目录(文本输入框)
	CONTENTNAME_DOCMONITOR("seccategory",ConditionType.INPUT,"","",DbType.VARCHAR,LogicOperation.EQ),//文档目录(用于文档监控，文本输入框)
	DOC_PUBLICLABEL("publiclabel",ConditionType.BROWSER,"257","385073",DbType.VARCHAR,LogicOperation.CUSTOM),//公共标签
	DOC_PRIVATELABEL("privatelabel",ConditionType.BROWSER,"162","127308",DbType.VARCHAR,LogicOperation.CUSTOM),//个人标签

	/**
	 * 人员相关
	 */
	DOC_CREATER_TYPE("usertype",ConditionType.SELECT_LINKAGE,"","",DbType.INT,LogicOperation.EQ),//创建人类型
	DOC_CREATER_ID("doccreaterid",ConditionType.BROWSER,BrowserType.USER,"882",DbType.INT,LogicOperation.EQ),//创建人id
	DEPARTMENT_ID("departmentid",ConditionType.BROWSER,BrowserType.DEPARTMENT,"19225",DbType.INT,LogicOperation.CUSTOM),//创建人部门id
	CREATER_SUBCOMPANY_ID("creatersubcompanyid",ConditionType.BROWSER,BrowserType.SUBCOMPANY,"22788",DbType.INT,LogicOperation.CUSTOM), //创建人分部
	OWNER_TYPE("ownertype",ConditionType.SELECT_LINKAGE,"","",DbType.INT,LogicOperation.EQ), //所有者类型
	OWNER_ID("ownerid",ConditionType.BROWSER,BrowserType.USER,"79",DbType.INT,LogicOperation.EQ), //所有者
	OWNER_DEPARTMENT_ID("ownerdepartmentid",ConditionType.BROWSER,BrowserType.DEPARTMENT,"130033",DbType.INT,LogicOperation.CUSTOM), //所有者部门
	OWNER_SUBCOMPANY_ID("ownersubcompanyid",ConditionType.BROWSER,BrowserType.SUBCOMPANY,"130032",DbType.INT,LogicOperation.CUSTOM), // 所有者分部
	DOC_LAST_MODUSER_ID("doclastmoduserid",ConditionType.BROWSER,BrowserType.USER,"3002",DbType.INT,LogicOperation.EQ),//最后修改人id
	DOC_ARCHIVE_USER_ID("docarchiveuserid",ConditionType.BROWSER,BrowserType.USER,"3003",DbType.INT,LogicOperation.EQ),//归档人id
	DOC_APPROVE_USER_ID("docapproveuserid",ConditionType.BROWSER,BrowserType.USER,"3001",DbType.INT,LogicOperation.EQ),//最后审批人id
	DOC_RECYCLE_DELETE_USER_ID("docdeleteuserid",ConditionType.BROWSER,BrowserType.USER,"26684",DbType.INT,LogicOperation.EQ),//删除人id
	
	
	/**
	 * 时间相关
	 */
	DOC_CREATEDATE_SELECT("doccreatedate",ConditionType.DATE,"","722",null,null),//创建日期
	DATE2DURING("date2during",ConditionType.SELECT,"","81675",DbType.VARCHAR,LogicOperation.CUSTOM), //修改期间
	DOC_LAST_MODDATE("doclastmoddate",ConditionType.DATE,"","723",null,null),//修改日期
	DOC_ARCHIVE_DATE("docarchivedate",ConditionType.DATE,"","3000",null,null), //归档日期
	DOC_APPROVE_DATE("docapprovedate",ConditionType.DATE,"","1425",null,null), //审批日期
	DOC_OPERATIONS_DATE("docoperationdate",ConditionType.DATE,"","18008",null,null), //操作时间

	DOC_IMPORT_DATE("importdate",ConditionType.DATE,"","27420",null,null),  //导入日期(虚拟目录)
	
	SUBSCRIPTION_DATE("subscribedate",ConditionType.DATE,"","18657",null,null), //订阅时间（文档订阅）
	SUBSCRIPTION_APPROVE_DATE("approvedate",ConditionType.DATE,"","18658",null,null), //订阅批准时间（文档订阅）
	
	DOC_RECYCLE_DELETE_DATE("docdeletedate",ConditionType.DATE,"","31840",null,null), //回收站（文档删除日期）

	/**
	 *水印相关
	 */
	WATER_NAME("watername",ConditionType.INPUT,"","538150",DbType.VARCHAR,LogicOperation.CUSTOM),
	WATER_ID("watercode",ConditionType.INPUT,"","538152",DbType.VARCHAR,LogicOperation.CUSTOM),
	WATER_DESCRIPTION("description",ConditionType.INPUT,"","538151",DbType.VARCHAR,LogicOperation.CUSTOM),
	WATER_TYPE("watermarktype",ConditionType.SELECT,"","389186",DbType.INT,LogicOperation.CUSTOM),


	/**编号规则**/
	RULE_NAME("ruleName",ConditionType.INPUT,"","19829",DbType.VARCHAR,LogicOperation.CUSTOM),
	RULE_DESCRIPTION("ruleDescription",ConditionType.INPUT,"","540824",DbType.VARCHAR,LogicOperation.CUSTOM),

	;
	
	
	
	
	
	
	private String name;   
	private String browserType;
	private String language;
	private DbType dbType;
	private LogicOperation logic;
	private ConditionType conditionType;
	
	private DocCondition(String name,ConditionType conditionType,String browserType,String language,DbType db,LogicOperation logic){
		this.name = name;
		this.browserType = browserType;
		this.language = language;
		this.dbType = db;
		this.logic = logic;
		this.conditionType = conditionType;
	}
	

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	

	public String getBrowserType() {
		return browserType;
	}


	public void setBrowserType(String browserType) {
		this.browserType = browserType;
	}


	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	public DbType getDbType() {
		return dbType;
	}

	public void setDbType(DbType dbType) {
		this.dbType = dbType;
	}

	public LogicOperation getLogic() {
		return logic;
	}

	public void setLogic(LogicOperation logic) {
		this.logic = logic;
	}


	public ConditionType getConditionType() {
		return conditionType;
	}


	public void setConditionType(ConditionType conditionType) {
		this.conditionType = conditionType;
	}
	
}
