package com.iformall.domain.po;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Table(name = "wx_merchant_corp")
public class WxMerchantCorp implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@Id
    protected Long id;
    
    @Transient
    protected List<Long> ids;
    @Transient
    protected String sortColumns;
  
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getSortColumns() {
		return sortColumns;
	}
	 
	public List<Long> getIds() {
		return ids;
	}
	public void setIds(List<Long> ids) {
		this.ids = ids;
	}
	
	
	
	/*租户ID**/
	@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
	private String tenantId;
	/*商户ID**/
	@io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId")
	private Long merchantId;
	/*法人证件类型1居民身份证2军官证3学生证4驾驶证6护照**/
	@io.swagger.annotations.ApiModelProperty(value="法人证件类型1居民身份证2军官证3学生证4驾驶证5护照",name="corpPapersType")
	private Integer corpPapersType;
	/*法人证件号码**/
	@io.swagger.annotations.ApiModelProperty(value="法人证件号码",name="corpPapersNumber")
	private String corpPapersNumber;
	/*法人**/
	@io.swagger.annotations.ApiModelProperty(value="法人",name="corpPapersPerson")
	private String corpPapersPerson;
	/*法人证件正面**/
	@io.swagger.annotations.ApiModelProperty(value="法人证件正面",name="corpPapersPicFace")
	private String corpPapersPicFace;
	/*法人证件背面**/
	@io.swagger.annotations.ApiModelProperty(value="法人证件背面",name="corpPapersPicBack")
	private String corpPapersPicBack;
	/*注册地址**/
	@io.swagger.annotations.ApiModelProperty(value="注册地址",name="corpPapersAddress")
	private String corpPapersAddress;
	/*执照注册号**/
	@io.swagger.annotations.ApiModelProperty(value="执照注册号",name="corpPapersRegisterNumber")
	private String corpPapersRegisterNumber;
	/*执照文件**/
	@io.swagger.annotations.ApiModelProperty(value="执照文件",name="corpPapersFile")
	private String corpPapersFile;
	/*创建时间**/
	@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate")
	private Date createDate;
	/*更新时间**/
	@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate")
	private Date updateDate;
	public String  getTenantId() {
		return tenantId;
	}
	public void setTenantId(String _tenantId) {
		tenantId = _tenantId;
	}
	public Long  getMerchantId() {
		return merchantId;
	}
	public void setMerchantId(Long _merchantId) {
		merchantId = _merchantId;
	}
	public Integer  getCorpPapersType() {
		return corpPapersType;
	}
	public void setCorpPapersType(Integer _corpPapersType) {
		corpPapersType = _corpPapersType;
	}
	public String  getCorpPapersNumber() {
		return corpPapersNumber;
	}
	public void setCorpPapersNumber(String _corpPapersNumber) {
		corpPapersNumber = _corpPapersNumber;
	}
	public String  getCorpPapersPerson() {
		return corpPapersPerson;
	}
	public void setCorpPapersPerson(String _corpPapersPerson) {
		corpPapersPerson = _corpPapersPerson;
	}
	public String  getCorpPapersPicFace() {
		return corpPapersPicFace;
	}
	public void setCorpPapersPicFace(String _corpPapersPicFace) {
		corpPapersPicFace = _corpPapersPicFace;
	}
	public String  getCorpPapersPicBack() {
		return corpPapersPicBack;
	}
	public void setCorpPapersPicBack(String _corpPapersPicBack) {
		corpPapersPicBack = _corpPapersPicBack;
	}
	public String  getCorpPapersAddress() {
		return corpPapersAddress;
	}
	public void setCorpPapersAddress(String _corpPapersAddress) {
		corpPapersAddress = _corpPapersAddress;
	}
	public String  getCorpPapersRegisterNumber() {
		return corpPapersRegisterNumber;
	}
	public void setCorpPapersRegisterNumber(String _corpPapersRegisterNumber) {
		corpPapersRegisterNumber = _corpPapersRegisterNumber;
	}
	public String  getCorpPapersFile() {
		return corpPapersFile;
	}
	public void setCorpPapersFile(String _corpPapersFile) {
		corpPapersFile = _corpPapersFile;
	}
	public Date  getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date _createDate) {
		createDate = _createDate;
	}
	public Date  getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(Date _updateDate) {
		updateDate = _updateDate;
	}



	public static enum Field
	{
		Id_ASC("`id` ASC"),Id_DESC("`id` DESC")
			,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC")
			,MerchantId_ASC("`merchantId` ASC"),MerchantId_DESC("`merchantId` DESC")
			,CorpPapersType_ASC("`corpPapersType` ASC"),CorpPapersType_DESC("`corpPapersType` DESC")
			,CorpPapersNumber_ASC("`corpPapersNumber` ASC"),CorpPapersNumber_DESC("`corpPapersNumber` DESC")
			,CorpPapersPerson_ASC("`corpPapersPerson` ASC"),CorpPapersPerson_DESC("`corpPapersPerson` DESC")
			,CorpPapersPicFace_ASC("`corpPapersPicFace` ASC"),CorpPapersPicFace_DESC("`corpPapersPicFace` DESC")
			,CorpPapersPicBack_ASC("`corpPapersPicBack` ASC"),CorpPapersPicBack_DESC("`corpPapersPicBack` DESC")
			,CorpPapersAddress_ASC("`corpPapersAddress` ASC"),CorpPapersAddress_DESC("`corpPapersAddress` DESC")
			,CorpPapersRegisterNumber_ASC("`corpPapersRegisterNumber` ASC"),CorpPapersRegisterNumber_DESC("`corpPapersRegisterNumber` DESC")
			,CorpPapersFile_ASC("`corpPapersFile` ASC"),CorpPapersFile_DESC("`corpPapersFile` DESC")
			,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC")
			,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC")
	;
		private String value;
		Field(String value){
			this.value = value;
		}
		public String getValue() {
			return value;
		}
		public void setCol(String value) {
			this.value = value;
		}
		@Override
		public String toString() {
			return this.getValue();
		}
	}
	
	public void setSortColumns(Field... fields)
	{
		if (fields == null || fields.length == 0) {
			return;
		}
		for (int k = 0; k < fields.length; k++) {
			if (fields[k] == null) {
				return;
			}
		}
		StringBuilder sb = new StringBuilder(fields[0].toString());
		for (int k = 1; k < fields.length; k++) {
			sb.append(",");
			sb.append(fields[k].toString());
		}
		 
	}
	
	public void setSortColumns(String sortColumns)
	{
		if (sortColumns == null || "".equals(sortColumns.trim())) {
			return;
		}
		if (sortColumns.contains(",")) {
			String[] cols = sortColumns.split(",");
			List<Field> fList = new ArrayList();
			for (int k = 0; k < cols.length; k++) {
				fList.add(Field.valueOf(cols[k]));
			}
			this.setSortColumns(fList.toArray(new Field[fList.size()]));
		} else {
			this.setSortColumns(Field.valueOf(sortColumns));
		}
	}
}
