package com.goafanti.copyright.bo;

import org.apache.commons.lang3.StringUtils;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
import com.goafanti.common.enums.AttachmentType;
import com.goafanti.common.utils.FileUtils;

public class CopyrightInfoDetail extends CopyrightInfoSummary {
	private Integer	city;
	private Integer	area;
	private String	postcode;
	private String	orgCode;
	private String	postalAddress;

	/**
	 * 软著名字
	 */
	private String	copyrightInfo;

	/**
	 * 证书附件地址
	 */
	private String	certificateUrl;

	/**
	 * 申请书附件地址
	 */
	private String	applicationUrl;

	@JsonFormat(shape = Shape.STRING)
	public Integer getCity() {
		return city;
	}

	public void setCity(Integer city) {
		this.city = city;
	}
	
	@JsonFormat(shape = Shape.STRING)
	public Integer getArea() {
		return area;
	}

	public void setArea(Integer area) {
		this.area = area;
	}

	public String getPostcode() {
		return postcode;
	}

	public void setPostcode(String postcode) {
		this.postcode = postcode;
	}

	public String getCertificateUrl() {
		return certificateUrl;
	}

	public void setCertificateUrl(String certificateUrl) {
		this.certificateUrl = certificateUrl;
	}

	public String getApplicationUrl() {
		return applicationUrl;
	}

	public void setApplicationUrl(String applicationUrl) {
		this.applicationUrl = applicationUrl;
	}

	// 软著证书
	public String getCertificateUrlDownloadFileName() {
		if (StringUtils.isBlank(this.applicationUrl)) {
			return "";
		} else {
			return AttachmentType.COPYRIGHT_AUTH.getDesc() + FileUtils.getSuffix(this.applicationUrl);
		}
	}

	public void setCertificateUrlDownloadFileName(String certificateUrlDownloadFileName) {

	}

	// 软著申请书
	public String getApplicationUrlDownloadFileName() {
		if (StringUtils.isBlank(this.applicationUrl)) {
			return "";
		} else {
			return AttachmentType.COPYRIGHT_APPLY.getDesc() + FileUtils.getSuffix(this.applicationUrl);
		}
	}

	public void setApplicationUrlDownloadFileName(String applicationUrlDownloadFileName) {

	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getCopyrightInfo() {
		return copyrightInfo;
	}

	public void setCopyrightInfo(String copyrightInfo) {
		this.copyrightInfo = copyrightInfo;
	}

	public String getPostalAddress() {
		return postalAddress;
	}

	public void setPostalAddress(String postalAddress) {
		this.postalAddress = postalAddress;
	}
    
	
}
