package com.red.circle.order.infra.database.rds.entity.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.red.circle.framework.mybatis.entity.TimestampBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * Telegram购买单据.
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("order_telegram_purchase")
public class OrderTelegramPurchase extends TimestampBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键标识.
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 来源系统.
     */
    @TableField("sys_origin")
    private String sysOrigin;

    /**
     * 用户id.
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 商品购买时间的时间戳.
     */
    @TableField("purchase_time")
    private Long purchaseTime;

    /**
     * 商品ID
     */
    @TableField("product_id")
    private Long productId;

    /**
     * 商品标题
     */
    @TableField("title")
    private String title;

    /**
     * 商品描述.
     */
    @TableField("product_desc")
    private String productDesc;

    /**
     * 订单交易状态.
     */
    @TableField("purchase_state")
    private Integer purchaseState;

    /**
     * 币种
     */
    @TableField("currency")
    private String currency;

    /**
     * 预下单ID
     */
    @TableField("pre_check_id")
    private String preCheckId;

    /**
     * telegram用户信息
     */
    @TableField("`from`")
    private String from;

    /**
     * telegram支付订单id
     */
    @TableField("telegram_payment_charge_id")
    private String telegramPaymentChargeId;

    /**
     * 支付提供商订单id
     */
    @TableField("provider_payment_charge_id")
    private String providerPaymentChargeId;

}
