package cn.van.business.model.jd;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;

/**
 * 实体类，用于存储商品订单信息。
 */
@Entity
@Table(name = "product_order")
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class ProductOrder {

    /**
     * 主键，自增ID。
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 商品名称。
     */
    @Column(name = "sku_name")
    private String skuName;

    /**
     * 商品类型。
     */
    @Column(name = "sku_type")
    private Integer skuType;

    /**
     * 订单号。
     */
    @Column(name = "order_id")
    private String orderId;

    /**
     * 下单时间。
     */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "order_time")
    private Date orderTime;

    /**
     * 下单账号。
     */
    @Column(name = "order_account")
    private String orderAccount;

    /**
     * 是否晒图登记。
     */
    @Column(name = "is_reviewed")
    private Boolean isReviewed;

    /**
     * 晒图时间。
     */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "review_time")
    private Date reviewTime;

    /**
     * 是否返现到账。
     */
    @Column(name = "is_cashback_received")
    private Boolean isCashbackReceived;

    /**
     * 到账时间。
     */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "cashback_time")
    private Date cashbackTime;
    //收货信息
    @Column(name = "recipient_name")
    private String recipientName;
    @Column(name = "recipient_phone")
    private String recipientPhone;
    @Column(name = "recipient_address")
    private String recipientAddress;
    // 谁的单
    @Column(name = "who_order")
    private String whoOrder;
    @Column(name = "from_wxid")
    private String fromWxid;

}
