package com.ycwl.basic.order.entity;

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.ycwl.basic.order.enums.OrderStatus;
import com.ycwl.basic.order.enums.PaymentStatus;
import com.ycwl.basic.order.enums.RefundStatus;
import lombok.Data;

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

/**
 * 订单主表实体V2
 */
@Data
@TableName("order_v2")
public class OrderV2 {
    
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 订单号
     */
    @TableField("order_no")
    private String orderNo;
    
    /**
     * 会员ID
     */
    @TableField("member_id")
    private Long memberId;
    
    /**
     * 小程序openId
     */
    @TableField("open_id")
    private String openId;
    
    /**
     * 人脸ID
     */
    @TableField("face_id")
    private Long faceId;
    
    /**
     * 景区ID
     */
    @TableField("scenic_id")
    private Long scenicId;
    
    /**
     * 原始金额
     */
    @TableField("original_amount")
    private BigDecimal originalAmount;
    
    /**
     * 优惠金额
     */
    @TableField("discount_amount")
    private BigDecimal discountAmount;
    
    /**
     * 最终金额
     */
    @TableField("final_amount")
    private BigDecimal finalAmount;
    
    /**
     * 订单状态
     */
    @TableField("order_status")
    private OrderStatus orderStatus;
    
    /**
     * 支付状态
     */
    @TableField("payment_status")
    private PaymentStatus paymentStatus;
    
    /**
     * 退款状态
     */
    @TableField("refund_status")
    private RefundStatus refundStatus;
    
    /**
     * 总退款金额
     */
    @TableField("total_refund_amount")
    private BigDecimal totalRefundAmount;
    
    /**
     * 订单备注
     */
    @TableField("remarks")
    private String remarks;
    
    /**
     * 支付时间
     */
    @TableField("pay_time")
    private Date payTime;
    
    /**
     * 完成时间
     */
    @TableField("complete_time")
    private Date completeTime;
    
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;
    
    /**
     * 创建人
     */
    @TableField("create_by")
    private Long createBy;
    
    /**
     * 更新人
     */
    @TableField("update_by")
    private Long updateBy;
    
    /**
     * 是否删除
     */
    @TableField("deleted")
    private Integer deleted;
    
    /**
     * 删除时间
     */
    @TableField("deleted_at")
    private Date deletedAt;
}