package com.goafanti.common.model;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.goafanti.common.constant.AFTConstants;
import com.goafanti.common.utils.FileUtils;

public class PatentInfo {
	private String	id;

	private String	uid;
	
	/**
	 * 合同ID
	 */
	private String contractId;

	/**
	 * 编号
	 */
	private Integer	serialNumber;

	/**
	 * 申请号/专利号
	 */
	private String	patentNumber;

	/**
	 * 专利名称
	 */
	private String	patentName;

	/**
	 * 专利类型
	 */
	private Integer	patentCatagory;

	/**
	 * 专利状态
	 */
	private Integer	patentState;

	/**
	 * 专利领域
	 */
	private Integer	patentField;

	/**
	 * 专利简介
	 */
	private String	patentDes;

	/**
	 * 专利代理委托书
	 */
	private String	patentProryStatementUrl;

	/**
	 * 专利稿件
	 */
	private String	patentWritingUrl;

	/**
	 * 授权通知书
	 */
	private String	authorizationNoticeUrl;

	/**
	 * 专利证书
	 */
	private String	patentCertificateUrl;

	/**
	 * 申请日/受理日
	 */
	private Date	patentApplicationDate;

	/**
	 * 第一发明人
	 */
	private String	firstInventorName;

	/**
	 * 第一发明人国籍
	 */
	private String	firstInventorNationality;

	/**
	 * 第一发明人身份证号
	 */
	private String	firstInventorIdNumber;

	/**
	 * 第一发明人是否公布(0--不公布,1--公布)
	 */
	private Integer	firstInventorIsPublish;

	/**
	 * 第二发明人姓名
	 */
	private String	secondInventorName;

	/**
	 * 第二发明人国际
	 */
	private String	secondInventorNationality;

	/**
	 * 第二发明人是否公布(0--不公布,1--公布)
	 */
	private Integer	secondInventorIsPublish;

	/**
	 * 第三发明人姓名
	 */
	private String	thirdInventorName;

	/**
	 * 第三发明人国籍
	 */
	private String	thirdInventorNationality;

	/**
	 * 第三发明人是否公布(0--不公布,1--公布)
	 */
	private Integer	thirdInventorIsPublish;

	/**
	 * 创建时间
	 */
	private Date	createTime;

	/**
	 * 撰写人
	 */
	private String	author;

	/**
	 * 授权日/发文日
	 */
	private Date	authorizedDate;

	/**
	 * 事务所
	 */
	private String	office;

	/**
	 * 负责人
	 */
	private String	principal;

	/**
	 * 用户确认申报材料
	 */
	private Integer	confirmState;

	/**
	 * 专利发文时间
	 */
	private Date	recordTime;

	/**
	 * 删除标记
	 */
	private Integer	deletedSign;

	/**
	 * 联系人及联系方式
	 */
	private Integer	contacts;
	
	/**
	 * 申请创建人
	 */
	private String founder;
	
	

	public String getFounder() {
		return founder;
	}

	public void setFounder(String founder) {
		this.founder = founder;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}
	

	public String getContractId() {
		return contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	public Integer getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(Integer serialNumber) {
		this.serialNumber = serialNumber;
	}

	public String getPatentNumber() {
		return patentNumber;
	}

	public void setPatentNumber(String patentNumber) {
		this.patentNumber = patentNumber;
	}

	public String getPatentName() {
		return patentName;
	}

	public void setPatentName(String patentName) {
		this.patentName = patentName;
	}

	@JsonFormat(shape = Shape.STRING)
	public Integer getPatentCatagory() {
		return patentCatagory;
	}

	public void setPatentCatagory(Integer patentCatagory) {
		this.patentCatagory = patentCatagory;
	}

	@JsonFormat(shape = Shape.STRING)
	public Integer getPatentState() {
		return patentState;
	}

	public void setPatentState(Integer patentState) {
		this.patentState = patentState;
	}

	@JsonFormat(shape = Shape.STRING)
	public Integer getPatentField() {
		return patentField;
	}

	public void setPatentField(Integer patentField) {
		this.patentField = patentField;
	}

	public String getPatentDes() {
		return patentDes;
	}

	public void setPatentDes(String patentDes) {
		this.patentDes = patentDes;
	}

	public String getPatentProryStatementUrl() {
		return patentProryStatementUrl;
	}

	public void setPatentProryStatementUrl(String patentProryStatementUrl) {
		this.patentProryStatementUrl = patentProryStatementUrl;
	}

	public String getPatentWritingUrl() {
		return patentWritingUrl;
	}

	public void setPatentWritingUrl(String patentWritingUrl) {
		this.patentWritingUrl = patentWritingUrl;
	}

	public String getAuthorizationNoticeUrl() {
		return authorizationNoticeUrl;
	}

	public void setAuthorizationNoticeUrl(String authorizationNoticeUrl) {
		this.authorizationNoticeUrl = authorizationNoticeUrl;
	}

	public String getPatentCertificateUrl() {
		return patentCertificateUrl;
	}

	public void setPatentCertificateUrl(String patentCertificateUrl) {
		this.patentCertificateUrl = patentCertificateUrl;
	}

	public Date getPatentApplicationDate() {
		return patentApplicationDate;
	}

	public void setPatentApplicationDate(Date patentApplicationDate) {
		this.patentApplicationDate = patentApplicationDate;
	}

	public String getFirstInventorName() {
		return firstInventorName;
	}

	public void setFirstInventorName(String firstInventorName) {
		this.firstInventorName = firstInventorName;
	}

	public String getFirstInventorNationality() {
		return firstInventorNationality;
	}

	public void setFirstInventorNationality(String firstInventorNationality) {
		this.firstInventorNationality = firstInventorNationality;
	}

	public String getFirstInventorIdNumber() {
		return firstInventorIdNumber;
	}

	public void setFirstInventorIdNumber(String firstInventorIdNumber) {
		this.firstInventorIdNumber = firstInventorIdNumber;
	}

	public Integer getFirstInventorIsPublish() {
		return firstInventorIsPublish;
	}

	public void setFirstInventorIsPublish(Integer firstInventorIsPublish) {
		this.firstInventorIsPublish = firstInventorIsPublish;
	}

	public String getSecondInventorName() {
		return secondInventorName;
	}

	public void setSecondInventorName(String secondInventorName) {
		this.secondInventorName = secondInventorName;
	}

	public String getSecondInventorNationality() {
		return secondInventorNationality;
	}

	public void setSecondInventorNationality(String secondInventorNationality) {
		this.secondInventorNationality = secondInventorNationality;
	}

	public Integer getSecondInventorIsPublish() {
		return secondInventorIsPublish;
	}

	public void setSecondInventorIsPublish(Integer secondInventorIsPublish) {
		this.secondInventorIsPublish = secondInventorIsPublish;
	}

	public String getThirdInventorName() {
		return thirdInventorName;
	}

	public void setThirdInventorName(String thirdInventorName) {
		this.thirdInventorName = thirdInventorName;
	}

	public String getThirdInventorNationality() {
		return thirdInventorNationality;
	}

	public void setThirdInventorNationality(String thirdInventorNationality) {
		this.thirdInventorNationality = thirdInventorNationality;
	}

	public Integer getThirdInventorIsPublish() {
		return thirdInventorIsPublish;
	}

	public void setThirdInventorIsPublish(Integer thirdInventorIsPublish) {
		this.thirdInventorIsPublish = thirdInventorIsPublish;
	}

	public Date getCreateTime() {
		return createTime;
	}

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

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getOffice() {
		return office;
	}

	public void setOffice(String office) {
		this.office = office;
	}

	public String getPrincipal() {
		return principal;
	}

	public void setPrincipal(String principal) {
		this.principal = principal;
	}

	public Date getAuthorizedDate() {
		return authorizedDate;
	}

	public void setAuthorizedDate(Date authorizedDate) {
		this.authorizedDate = authorizedDate;
	}

	public Integer getConfirmState() {
		return confirmState;
	}

	public void setConfirmState(Integer confirmState) {
		this.confirmState = confirmState;
	}

	@JsonIgnore
	public Date getRecordTime() {
		return recordTime;
	}

	public void setRecordTime(Date recordTime) {
		this.recordTime = recordTime;
	}

	@JsonIgnore
	public Integer getDeletedSign() {
		return deletedSign;
	}

	public void setDeletedSign(Integer deletedSign) {
		this.deletedSign = deletedSign;
	}
	
	@JsonFormat(shape = Shape.STRING)
	public Integer getContacts() {
		return contacts;
	}

	public void setContacts(Integer contacts) {
		this.contacts = contacts;
	}

	// 授权日/发文日
	public String getAuthorizedFormattedDate() {
		if (this.authorizedDate == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.getAuthorizedDate(), AFTConstants.YYYYMMDDHHMMSS);
		}
	}

	public void setAuthorizedFormattedDate(String authorizedFormattedDate) {

	}

	// 申请日/受理日
	public String getPatentApplicationFormattedDate() {
		if (this.patentApplicationDate == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.getPatentApplicationDate(), AFTConstants.YYYYMMDDHHMMSS);
		}
	}

	public void setPatentApplicationFormattedDate(String patentApplicationFormattedDate) {

	}

	// 创建时间
	public String getCreateTimeFormattedDate() {
		if (this.createTime == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
		}
	}

	public void setCreateTimeFormattedDate(String createTimeFormattedDate) {

	}

	// 专利代理委托书
	public String getPatentProryStatementDownloadFileName() {
		if (StringUtils.isBlank(this.patentProryStatementUrl)) {
			return null;
		} else {
			return FileUtils.getDownloadFileName(this.patentProryStatementUrl);
		}
	}

	public void setPatentProryStatementDownloadFileName(String patentProryStatementDownloadFileName) {

	}

	// 专利稿件
	public String getPatentWritingDownloadFileName() {
		if (StringUtils.isBlank(this.patentWritingUrl)) {
			return null;
		} else {
			return FileUtils.getDownloadFileName(this.patentWritingUrl);
		}
	}

	public void setPatentWritingDownloadFileName(String patentWritingDownloadFileName) {

	}

	// 授权通知书
	public String getAuthorizationNoticeDownloadFileName() {
		if (StringUtils.isBlank(this.authorizationNoticeUrl)) {
			return null;
		} else {
			return FileUtils.getDownloadFileName(this.authorizationNoticeUrl);
		}
	}

	public void setAuthorizationNoticeDownloadFileName(String authorizationNoticeDownloadFileName) {

	}

	// 专利证书
	public String getPatentCertificateDownloadFileName() {
		if (StringUtils.isBlank(this.patentCertificateUrl)) {
			return null;
		} else {
			return FileUtils.getDownloadFileName(this.patentCertificateUrl);
		}
	}

	public void setPatentCertificateDownloadFileName(String patentCertificateDownloadFileName) {

	}

}