package com.red.circle.order.domain.order;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 购买记录.
 * </p>
 *
 * @author pengliang
 * @since 2020-03-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class PurchaseHistory implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 主键标识.
   */
  private Long id;

  /**
   * 来源系统.
   */
  private String sysOrigin;

  /**
   * 环境.
   */
  private String evn;

  /**
   * 用户id.
   */
  private Long userId;

  /**
   * 原始订单.
   */
  private String originalOrderId;

  /**
   * 订单id.
   */
  private String orderId;

  /**
   * 产品id.
   */
  private String productId;

  /**
   * 购买产品id.
   */
  private String purchaseProductId;

  /**
   * 产品描述.
   */
  private String productDescription;

  /**
   * 产品类型.
   */
  private String productType;

  /**
   * 来源平台.
   */
  private String platform;

  /**
   * 支付平台
   */
  private String payPlatform;

  /**
   * USD.美元.
   */
  private String unit;

  /**
   * 单价.
   */
  private BigDecimal unitPrice;

  /**
   * 购买时间.
   */
  private Timestamp purchaseDateMs;

  /**
   * 过期时间.
   */
  private Timestamp expiresDateMs;

  /**
   * 订阅是否处于免费试用期的指标.
   */
  private Boolean trialPeriod;

  /**
   * 订单状态.
   */
  private String status;

  /**
   * 扩展类型.
   */
  private String expandType;

  /**
   * 创建时间.
   */
  private Timestamp createTime;

  /**
   * 修改时间.
   */
  private Timestamp updateTime;

}
