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.DiscountType;
import lombok.Data;

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

/**
 * 订单优惠记录表实体V2
 */
@Data
@TableName("order_discount_v2")
public class OrderDiscountV2 {
    
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 订单ID
     */
    @TableField("order_id")
    private Long orderId;
    
    /**
     * 优惠类型
     */
    @TableField("discount_type")
    private DiscountType discountType;
    
    /**
     * 优惠名称
     */
    @TableField("discount_name")
    private String discountName;
    
    /**
     * 优惠金额
     */
    @TableField("discount_amount")
    private BigDecimal discountAmount;
    
    /**
     * 优惠比例
     */
    @TableField("discount_rate")
    private BigDecimal discountRate;
    
    /**
     * 显示顺序
     */
    @TableField("sort_order")
    private Integer sortOrder;
    
    /**
     * 优惠券ID
     */
    @TableField("coupon_id")
    private Long couponId;
    
    /**
     * 优惠券码
     */
    @TableField("coupon_code")
    private String couponCode;
    
    /**
     * 券码
     */
    @TableField("voucher_code")
    private String voucherCode;
    
    /**
     * 券码批次ID
     */
    @TableField("voucher_batch_id")
    private Long voucherBatchId;
    
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
}