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.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.iamberry.wechat.core.entity.PageBean;
import com.iamberry.wechat.core.entity.product.Product;

/**
 * 
 * @description ：代理订货记录（属于通过分销途径批量下单，不是客户直接下单的）
 * @author 欧阳明
 * @date：2016-4-18
 */
public class PlaceOrder implements java.io.Serializable{
  
	/**
	 * 
	 */
	private static final long serialVersionUID = 8672743234164270166L;
	private String  id ; // 主键
	private int placeInfoId; //分销商id
	@Min(value=1,message="产品id不能为空") 
	private int  productId ; // 产品id
	private String productName;//产品名字
	@Min(value=1,message="订单个数必须大于等于1")
	private int  productNumber; //订单个数
	private String  openid ; // 微信id
	@Min(value=1,message="订单金额不能为0")
	private int  yetAmount ; // 已付金额
	private int  amount ; // 订单总金额
	
	private String postNum ;  //快递单号
	private String postFirm ; // 快递公司
	private int status ;   // 状态 1:等待付款 ；2：已付款 ；3：发货;4:退单
	
	private String postCode;//邮政编码
	@NotBlank(message="联系方式不能为空")
	@Pattern(regexp="^[1][0-9]{10}$",message="手机号码不正确")
	private String tel ; //电话号码
	@NotBlank(message="详细地址不能为空")
	private String address ;//收件详细地址
	@NotBlank(message="收件人不能为空")
	private String contactName ; //收件联系人
	private String remark ;//备注
	
	private Date sendDate; // 发货日期
	private Date createDate ; // 订单创建日期
	private Date updateDate ; // 订单更新日期
	
	private Product product;   //商品
	
	private PageBean page;  //用于分页的考虑
	
	private String beginDate ;//订单查询开始时间
	private String endDate ;//订单查询开始时间
	
	private String drpName; //分销商名称
	
	public String getId() {
		return this.id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public int getProductId() {
		return productId;
	}
	public void setProductId(int productId) {
		this.productId = productId;
	}
	
	public String getOpenid() {
		return openid;
	}
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	public int getYetAmount() {
		return yetAmount;
	}
	public void setYetAmount(int yetAmount) {
		this.yetAmount = yetAmount;
	}
	public int getAmount() {
		return amount;
	}
	public void setAmount(int amount) {
		this.amount = amount;
	}
	public String getPostNum() {
		return postNum;
	}
	public void setPostNum(String postNum) {
		this.postNum = postNum;
	}
	public String getPostFirm() {
		return postFirm;
	}
	public void setPostFirm(String postFirm) {
		this.postFirm = postFirm;
	}
	
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public String getPostCode() {
		return postCode;
	}
	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	
	public String getContactName() {
		return this.contactName;
	}
	public void setContactName(String contactName) {
		this.contactName = contactName;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public Date getSendDate() {
		return sendDate;
	}
	public void setSendDate(Date sendDate) {
		this.sendDate = sendDate;
	}
//	@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 int getProductNumber() {
		return productNumber;
	}
	public void setProductNumber(int productNumber) {
		this.productNumber = productNumber;
	}
	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	public PageBean getPage() {
		return page;
	}
	public void setPage(PageBean page) {
		this.page = page;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	public String getBeginDate() {
		return beginDate;
	}
	public void setBeginDate(String beginDate) {
		this.beginDate = beginDate;
	}
	public String getEndDate() {
		return endDate;
	}
	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}
	public String getDrpName() {
		return drpName;
	}
	public void setDrpName(String drpName) {
		this.drpName = drpName;
	}
	public int getPlaceInfoId() {
		return placeInfoId;
	}
	public void setPlaceInfoId(int placeInfoId) {
		this.placeInfoId = placeInfoId;
	}
	
	
	
}
