package com.tzy.common.utils.http.forest.param;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class BaseOrderDTO implements Serializable {

	protected Integer id;
	protected Integer userId;
	protected String orderNo;
	/**
	 * 应付款
	 */
	protected BigDecimal accountsPayable;

	/**
	 * 实付款
	 */
	protected BigDecimal actualPayment;

	protected Integer point;
	/**积分类型*/
	protected String pointType;
	/**
	 * 订单子类型,支付类型
	 */
	protected String orderSubType;

	/**
	 * 过期时间
	 */
	protected long expireTimestamp;

	protected Date expireTime;

	protected Integer status;

	public long getExpireTimestamp() {
		if (expireTimestamp == 0 && expireTime != null) {
			return expireTime.getTime();
		}
		return expireTimestamp;
	}
}