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

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.iamberry.wechat.core.entity.PageBean;

/**
 *	试用订单
 *	2016年11月15日
 * @author Administrator
 *
 */
public class ProbationOrder implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 5561361402030611550L;
	private String probationOrderid;				//订单id
	private Integer probationProductId;				//产品id
	private Integer probationColorId;				//产品颜色id
	private String probationOpenid;					//所属用户
	private Integer probationYetAmount;				//付款金额
	private Integer probationAmount;				//订单总额
	
	private Date probationCreateTime;				//订单创建时间
	private String probationPostNum;				//快递单号
	private String probationPostFirm;				//快递公司
	private Integer probationStatus;				//订单状态
	private Date probationSendDate;					//发货时间
	
	private String probationAddressInfo;			//详细地址
	private String probationReceivePostnum;			//邮编
	private String probationReceiveTel;				//收件人电话
	private String probationReceiveName;			//收件人姓名
	private String probationAdminRemark;			//后台的备注
	
	private String probationUserRemark;				//订单备注
	private String probationTransactionId;			//微信订单号
	private Date probationTransactionTime;			//微信支付时间
	
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
	private Date probationStartTime;				//试用开始时间
	
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
	private Date probationEndTime;					//试用结束时间
	private Date probationUpdateTime;				//修改时间
	
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
	private Date probationPauseStartTime;	//暂停开始时间
	
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
	private Date probationPauseEndTime;	//暂停结束时间
	
	private Integer probationOldStatus;	//订单原始状态
	
	private Integer probationColorType;	//后台备注颜色
	
	private List<OrderOperation> operations;	//订单操作工具类
	private String orderLinkStatus;			//订单状态描述
	
	private String userNickName;				//用户昵称

	private PageBean page = new PageBean(); 								//分页信息
	
	// ---------------------------------------上级信息
	private String storesName;
	
	private String vipName;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date beginDate; // 搜索开始时间

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date endDate; // 搜索介绍时间
	
	private String productName;			//商品名称
	
	private Integer productDiscount;		//商品折扣价
	
	private Integer productPrice;			//商品原价
	
	private String productIntroduceImg;	//商品介绍图
	
	private Integer probationProductType;	//商品类型id
	
	private String probationSendName;     //派送员姓名
	
	private String probationSendTel;      //派送员电话号码
	
	private String probationProductName;      //产品名称.....
	
	private Long probationPauseTotalLength; //暂停总时长
	
	private Long probationRemainingTime;	//试用剩余时长
	
	private String productRemark;				//商品备注  存放的是SKU编码
	
	public String getProductRemark() {
		return productRemark;
	}
	public void setProductRemark(String productRemark) {
		this.productRemark = productRemark;
	}
	public Integer getProbationProductType() {
		return probationProductType;
	}
	public void setProbationProductType(Integer probationProductType) {
		this.probationProductType = probationProductType;
	}
	public String getProbationSendName() {
		return probationSendName;
	}
	public void setProbationSendName(String probationSendName) {
		this.probationSendName = probationSendName;
	}
	public String getProbationSendTel() {
		return probationSendTel;
	}
	public void setProbationSendTel(String probationSendTel) {
		this.probationSendTel = probationSendTel;
	}
	public String getProbationProductName() {
		return probationProductName;
	}
	public void setProbationProductName(String probationProductName) {
		this.probationProductName = probationProductName;
	}
	public String getProductIntroduceImg() {
		return productIntroduceImg;
	}
	public void setProductIntroduceImg(String productIntroduceImg) {
		this.productIntroduceImg = productIntroduceImg;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	public Integer getProductDiscount() {
		return productDiscount;
	}
	public void setProductDiscount(Integer productDiscount) {
		this.productDiscount = productDiscount;
	}
	public Integer getProductPrice() {
		return productPrice;
	}
	public void setProductPrice(Integer productPrice) {
		this.productPrice = productPrice;
	}
	public Date getBeginDate() {
		return beginDate;
	}
	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public String getUserNickName() {
		return userNickName;
	}
	public void setUserNickName(String userNickName) {
		this.userNickName = userNickName;
	}
	public List<OrderOperation> getOperations() {
		return operations;
	}
	public void setOperations(List<OrderOperation> operations) {
		this.operations = operations;
	}
	public String getOrderLinkStatus() {
		return orderLinkStatus;
	}
	public void setOrderLinkStatus(String orderLinkStatus) {
		this.orderLinkStatus = orderLinkStatus;
	}
	public PageBean getPage() {
		return page;
	}
	public void setPage(PageBean page) {
		this.page = page;
	}
	public Integer getProbationColorType() {
		return probationColorType;
	}
	public void setProbationColorType(Integer probationColorType) {
		this.probationColorType = probationColorType;
	}
	public Integer getProbationOldStatus() {
		return probationOldStatus;
	}
	public void setProbationOldStatus(Integer probationOldStatus) {
		this.probationOldStatus = probationOldStatus;
	}
	public String getProbationOrderid() {
		return probationOrderid;
	}
	public void setProbationOrderid(String probationOrderid) {
		this.probationOrderid = probationOrderid;
	}
	public Integer getProbationProductId() {
		return probationProductId;
	}
	public void setProbationProductId(Integer probationProductId) {
		this.probationProductId = probationProductId;
	}
	public String getProbationOpenid() {
		return probationOpenid;
	}
	public void setProbationOpenid(String probationOpenid) {
		this.probationOpenid = probationOpenid;
	}
	public Integer getProbationYetAmount() {
		return probationYetAmount;
	}
	public void setProbationYetAmount(Integer probationYetAmount) {
		this.probationYetAmount = probationYetAmount;
	}
	public Integer getProbationAmount() {
		return probationAmount;
	}
	public void setProbationAmount(Integer probationAmount) {
		this.probationAmount = probationAmount;
	}
	public Date getProbationCreateTime() {
		return probationCreateTime;
	}
	public void setProbationCreateTime(Date probationCreateTime) {
		this.probationCreateTime = probationCreateTime;
	}
	public String getProbationPostNum() {
		return probationPostNum;
	}
	public void setProbationPostNum(String probationPostNum) {
		this.probationPostNum = probationPostNum;
	}
	public String getProbationPostFirm() {
		return probationPostFirm;
	}
	public void setProbationPostFirm(String probationPostFirm) {
		this.probationPostFirm = probationPostFirm;
	}
	public Integer getProbationStatus() {
		return probationStatus;
	}
	public void setProbationStatus(Integer probationStatus) {
		this.probationStatus = probationStatus;
	}
	public Date getProbationSendDate() {
		return probationSendDate;
	}
	public void setProbationSendDate(Date probationSendDate) {
		this.probationSendDate = probationSendDate;
	}
	public String getProbationAddressInfo() {
		return probationAddressInfo;
	}
	public void setProbationAddressInfo(String probationAddressInfo) {
		this.probationAddressInfo = probationAddressInfo;
	}
	public String getProbationReceivePostnum() {
		return probationReceivePostnum;
	}
	public void setProbationReceivePostnum(String probationReceivePostnum) {
		this.probationReceivePostnum = probationReceivePostnum;
	}
	public String getProbationReceiveTel() {
		return probationReceiveTel;
	}
	public void setProbationReceiveTel(String probationReceiveTel) {
		this.probationReceiveTel = probationReceiveTel;
	}
	public String getProbationReceiveName() {
		return probationReceiveName;
	}
	public void setProbationReceiveName(String probationReceiveName) {
		this.probationReceiveName = probationReceiveName;
	}
	public String getProbationAdminRemark() {
		return probationAdminRemark;
	}
	public void setProbationAdminRemark(String probationAdminRemark) {
		this.probationAdminRemark = probationAdminRemark;
	}
	public String getProbationUserRemark() {
		return probationUserRemark;
	}
	public void setProbationUserRemark(String probationUserRemark) {
		this.probationUserRemark = probationUserRemark;
	}
	public String getProbationTransactionId() {
		return probationTransactionId;
	}
	public void setProbationTransactionId(String probationTransactionId) {
		this.probationTransactionId = probationTransactionId;
	}
	public Date getProbationTransactionTime() {
		return probationTransactionTime;
	}
	public void setProbationTransactionTime(Date probationTransactionTime) {
		this.probationTransactionTime = probationTransactionTime;
	}
	public Date getProbationStartTime() {
		return probationStartTime;
	}
	public void setProbationStartTime(Date probationStartTime) {
		this.probationStartTime = probationStartTime;
	}
	public Date getProbationEndTime() {
		return probationEndTime;
	}
	public void setProbationEndTime(Date probationEndTime) {
		this.probationEndTime = probationEndTime;
	}
	public Date getProbationUpdateTime() {
		return probationUpdateTime;
	}
	public void setProbationUpdateTime(Date probationUpdateTime) {
		this.probationUpdateTime = probationUpdateTime;
	}
	
	public Date getProbationPauseStartTime() {
		return probationPauseStartTime;
	}
	public void setProbationPauseStartTime(Date probationPauseStartTime) {
		this.probationPauseStartTime = probationPauseStartTime;
	}
	public Date getProbationPauseEndTime() {
		return probationPauseEndTime;
	}
	public void setProbationPauseEndTime(Date probationPauseEndTime) {
		this.probationPauseEndTime = probationPauseEndTime;
	}
	
	public Long getProbationPauseTotalLength() {
		return probationPauseTotalLength;
	}
	public void setProbationPauseTotalLength(Long probationPauseTotalLength) {
		this.probationPauseTotalLength = probationPauseTotalLength;
	}
	public Long getProbationRemainingTime() {
		if(getProbationEndTime() != null){
			probationRemainingTime = getProbationEndTime().getTime() - new Date().getTime();
		}else{
			probationRemainingTime = 0L;
		}
		
		return probationRemainingTime;
	}

	public String getStoresName() {
		return storesName;
	}
	public void setStoresName(String storesName) {
		this.storesName = storesName;
	}
	public String getVipName() {
		return vipName;
	}
	public void setVipName(String vipName) {
		this.vipName = vipName;
	}
	public void setProbationRemainingTime(Long probationRemainingTime) {
		this.probationRemainingTime = probationRemainingTime;
	}
	public Integer getProbationColorId() {
		return probationColorId;
	}
	public void setProbationColorId(Integer probationColorId) {
		this.probationColorId = probationColorId;
	}
	@Override
	public String toString() {
		return "ProbationOrder [probationOrderid=" + probationOrderid
				+ ", probationProductId=" + probationProductId
				+ ", probationOpenid=" + probationOpenid
				+ ", probationYetAmount=" + probationYetAmount
				+ ", probationAmount=" + probationAmount
				+ ", probationCreateTime=" + probationCreateTime
				+ ", probationPostNum=" + probationPostNum
				+ ", probationPostFirm=" + probationPostFirm
				+ ", probationStatus=" + probationStatus
				+ ", probationSendDate=" + probationSendDate
				+ ", probationAddressInfo=" + probationAddressInfo
				+ ", probationReceivePostnum=" + probationReceivePostnum
				+ ", probationReceiveTel=" + probationReceiveTel
				+ ", probationReceiveName=" + probationReceiveName
				+ ", probationAdminRemark=" + probationAdminRemark
				+ ", probationUserRemark=" + probationUserRemark
				+ ", probationTransactionId=" + probationTransactionId
				+ ", probationTransactionTime=" + probationTransactionTime
				+ ", probationStartTime=" + probationStartTime
				+ ", probationEndTime=" + probationEndTime
				+ ", probationUpdateTime=" + probationUpdateTime
				+ ", probationPauseStartTime=" + probationPauseStartTime
				+ ", probationPauseEndTime=" + probationPauseEndTime + "]";
	}
	
}
