package com.cloudcross.ssp.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.cloudcross.ssp.common.utils.FieldInfo;

/**
 * 创建人：rongying
 * 创建时间：2015.12.11
 * dsp-广告主实体对象
 */

@SuppressWarnings("serial")
public class DspAdvertiser implements Serializable {
	
	private Long dspId;//DSP厂商ID（t_dsp_agent.id）
	
	private Long advertiserId;//对应DSP系统的广告主id
	
	private Long industryId;//行业id

	private String name;//广告主名称
	
	private String regName;//公司注册名
	
	private String homepage;//网址
	
	private String tel;//电话
	
	private String email;//邮箱
	
	private String licencePath;//营业执照路径
	
	private String idPath;//法人代表身份证路径
	
	private String orgPath;//企业机构代码路径
	
	private String cpiPath;//CPI文件路径
	
	private Integer state;//状态（0通过，1待检查，2检查未通过）
	
	private String memo;//备注

	private Date updated;//最后更新时间

	public Long getDspId() {
		return dspId;
	}

	public void setDspId(Long dspId) {
		this.dspId = dspId;
	}
	
	public Long getAdvertiserId() {
		return advertiserId;
	}

	public void setAdvertiserId(Long advertiserId) {
		this.advertiserId = advertiserId;
	}

	public Long getIndustryId() {
		return industryId;
	}

	public void setIndustryId(Long industryId) {
		this.industryId = industryId;
	}

	public String getName() {
		return name;
	}

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

	public String getRegName() {
		return regName;
	}

	public void setRegName(String regName) {
		this.regName = regName;
	}

	public String getHomepage() {
		return homepage;
	}

	public void setHomepage(String homepage) {
		this.homepage = homepage;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getLicencePath() {
		return licencePath;
	}

	public void setLicencePath(String licencePath) {
		this.licencePath = licencePath;
	}

	public String getIdPath() {
		return idPath;
	}

	public void setIdPath(String idPath) {
		this.idPath = idPath;
	}

	public String getOrgPath() {
		return orgPath;
	}

	public void setOrgPath(String orgPath) {
		this.orgPath = orgPath;
	}

	public String getCpiPath() {
		return cpiPath;
	}

	public void setCpiPath(String cpiPath) {
		this.cpiPath = cpiPath;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public Date getUpdated() {
		return updated;
	}

	public void setUpdated(Date updated) {
		this.updated = updated;
	}

	@Override
	public String toString() {
		return "DspAdvertiser [dspId=" + dspId + ", advertiserId=" + advertiserId + ", industryId="
				+ industryId + ", name=" + name + ", regName=" + regName + ", "
				+ "homepage=" + homepage + ", tel=" + tel + ", " + "email=" 
				+ email + ", licencePath=" + licencePath + ", idPath=" + idPath
				+ ", orgPath=" + orgPath + ", cpiPath=" + cpiPath + ", state=" + state
				+ ", memo=" + memo + ", updated=" + updated + "]";
	}
	
	/**
	 * 组装t_dsp_advertiser表结构
	 * @return
	 */
	public static Map<String,FieldInfo> getFieldInfoForDspAdvertiser(){
		Map<String,FieldInfo> map = new HashMap<String,FieldInfo>();
		String[] columnNames = {"dspId","advertiserId","industryId","name","regName","homepage","tel","email","licencePath","idPath","orgPath","cpiPath","state","memo","updated"};
		String[] isNulls = {"NO","NO","NO","NO","YES","YES","YES","YES","YES","YES","YES","YES","NO","YES","NO"};
		String[] dataTypes= {"Long","Long","Long","String","String","String","String","String","String","String","String","String","Integer","String","Date"};
		int[] maxLengths = {11,11,11,255,255,255,255,255,255,255,255,255,3,255,0};
		for (int i = 0, l = columnNames.length; i<l; i++) {
			FieldInfo field = new FieldInfo();
			field.setColumnName(columnNames[i]);
			field.setIsNull(isNulls[i]);
			field.setDataType(dataTypes[i]);
			field.setMaxLength(maxLengths[i]);
			field.setPointNum(0);
			map.put(columnNames[i], field);
		}
		return map;
	}

}

