package com.iamberry.wechat.core.entity.drp;

import java.util.Date;

import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.NotBlank;

import com.iamberry.wechat.core.entity.PageBean;


/**
 * description ： 代理者实体类
 * @author 欧阳明
 * @date：2016-4-18
 */
public class PlaceInfo implements java.io.Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -7433227675461997618L;
	
	private int id;     						//主键
	@Min(value=1,message="顶级分销商不能为空")
	private int supperId;  						//顶级分销商
	private String supperName ; 				//顶级分销商名称
	private String parentName ; 				//父级名称
	@NotBlank(message="昵称至少两个汉字符")
	@Pattern(regexp="^[a-zA-Z0-9\u4E00-\u9FA5]{4,}$",message="昵称必须是汉字，英文，数字，不能有特殊符号！")
	private String name ;   					//公司名称
	
	@Pattern(regexp="^[a-zA-Z0-9\u4E00-\u9FA5]{4,}$",message="地址必须是汉字，英文，数字，不能有特殊符号！")
	private String userNickname;				//微信昵称
	private String addr;    					//地址
	private String userName;  					//联系人姓名
	//@Pattern(regexp="((\\d{3}-\\d{8}|\\d{4}-\\d{7,8})|(1[3|5|7|8][0-9]{9}))",message="地址格式不正确！")
	@Pattern(regexp="(1[0-9]{10})",message="电话号码格式不正确！")
	private String tel;      					// 电话号码
	private int amount;      					//金额
	@Min(value=1,message="状态不能为空，而且必须是数字")
	private int  status;     					// 状态 	1，使用中，2,停止使用
	
	private String openid;  					//用户全局标识-微信id
	private String initCode;    				//激活码
	private Date createDate;    				//创建时间
	private Date updateDate;    				//更新时间
	@Min(value=1,message="角色不能为空，而且必须是数字")
	private int roleId ; 						//角色
	
	@Min(value=1,message="父节点不能为空，而且必须是数字")
	private int placePid ; 						//父节点
	private Integer placeIds; 					//父节点集合
	private int templateId ; 					//模板id 
	private int  hasQrcode; 					//是否支持二维码
	private String roleName ; 					//角色名称
	
	private String templateName;				//模板名称
	private String areaName;    				//区域名
	private String remark; 						//备注
	
	private PageBean page; 						//分页信息
	private PlaceOrder order; 					//订单信息
	private String qrcodeUrl;					//二维码链接
	private String userHead;					//用户头像
	private Integer placeInfoStus;				//用户信息是否完善	1:待完善；2：已完善
	
	public String getQrcodeUrl() {
		return qrcodeUrl;
	}
	public void setQrcodeUrl(String qrcodeUrl) {
		this.qrcodeUrl = qrcodeUrl;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getSupperId() {
		return supperId;
	}
	public void setSupperId(int supperId) {
		this.supperId = supperId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAddr() {
		return addr;
	}
	public void setAddr(String addr) {
		this.addr = addr;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	public int getAmount() {
		return amount;
	}
	public void setAmount(int amount) {
		this.amount = amount;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	
	public String getOpenid() {
		return openid;
	}
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	public String getInitCode() {
		return initCode;
	}
	public void setInitCode(String initCode) {
		this.initCode = initCode;
	}
//	@JsonSerialize(using = JsonDateFormat.class)
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public Date getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	public PageBean getPage() {
		return page;
	}
	public void setPage(PageBean page) {
		this.page = page;
	}
	public String getSupperName() {
		return supperName;
	}
	public void setSupperName(String supperName) {
		this.supperName = supperName;
	}
	public int getPlacePid() {
		return placePid;
	}
	public void setPlacePid(int placePid) {
		this.placePid = placePid;
	}
	public PlaceOrder getOrder() {
		return order;
	}
	public void setOrder(PlaceOrder order) {
		this.order = order;
	}
	public String getParentName() {
		return parentName;
	}
	public void setParentName(String parentName) {
		this.parentName = parentName;
	}
	public int getRoleId() {
		return roleId;
	}
	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}
	public Integer getPlaceIds() {
		return placeIds;
	}
	public void setPlaceIds(Integer placeIds) {
		this.placeIds = placeIds;
	}
	public int getTemplateId() {
		return templateId;
	}
	public void setTemplateId(int templateId) {
		this.templateId = templateId;
	}
	public int getHasQrcode() {
		return hasQrcode;
	}
	public void setHasQrcode(int hasQrcode) {
		this.hasQrcode = hasQrcode;
	}
	public String getRoleName() {
		return roleName;
	}
	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}
	public String getTemplateName() {
		return templateName;
	}
	public void setTemplateName(String templateName) {
		this.templateName = templateName;
	}
	public String getAreaName() {
		return areaName;
	}
	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getUserHead() {
		return userHead;
	}
	public void setUserHead(String userHead) {
		this.userHead = userHead;
	}
	public Integer getPlaceInfoStus() {
		return placeInfoStus;
	}
	public void setPlaceInfoStus(Integer placeInfoStus) {
		this.placeInfoStus = placeInfoStus;
	}
	public String getUserNickname() {
		return userNickname;
	}
	public void setUserNickname(String userNickname) {
		this.userNickname = userNickname;
	}
	@Override
	public String toString() {
		return "PlaceInfo [id=" + id + ", supperId=" + supperId
				+ ", supperName=" + supperName + ", parentName=" + parentName
				+ ", name=" + name + ", userNickname=" + userNickname
				+ ", addr=" + addr + ", userName=" + userName + ", tel=" + tel
				+ ", amount=" + amount + ", status=" + status + ", openid="
				+ openid + ", initCode=" + initCode + ", createDate="
				+ createDate + ", updateDate=" + updateDate + ", roleId="
				+ roleId + ", placePid=" + placePid + ", placeIds=" + placeIds
				+ ", templateId=" + templateId + ", hasQrcode=" + hasQrcode
				+ ", roleName=" + roleName + ", templateName=" + templateName
				+ ", areaName=" + areaName + ", remark=" + remark + ", page="
				+ page + ", order=" + order + ", qrcodeUrl=" + qrcodeUrl
				+ ", userHead=" + userHead + ", placeInfoStus=" + placeInfoStus
				+ "]";
	}
}
