package co.yixiang.yshop.module.order.dal.dataobject.storeordercartinfo;

import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.math.BigDecimal;

/**
 * 订单购物详情 DO
 *
 * @author yshop
 */
@TableName("yshop_store_order_cart_info")
@KeySequence("yshop_store_order_cart_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class StoreOrderCartInfoDO {

    /**
     * id
     */
    @TableId
    private Long id;
    /**
     * 订单id
     */
    private Long oid;
    /**
     * 订单号
     */
    private String orderId;
    /**
     * 购物车id
     */
    private Long cartId;
    /**
     * 商品ID
     */
    private Long productId;
    /**
     * 购买东西的详细信息
     */
    private String cartInfo;
    /**
     * 唯一id
     */
    @TableField(value = "`unique`")
    private String unique;
    /**
     * 是否能售后0不能1能
     */
    private Integer isAfterSales;

    /**
     * 优惠金额
     */
    private BigDecimal couponPrice;

    /**
     * 邮费金额
     */
    private BigDecimal postagePrice;

    @Schema(description = "积分抵扣金额")
    private BigDecimal integralDeductionAmount;

    @Schema(description = "使用积分")
    private BigDecimal useIntegral;

    @Schema(description = "实际支付金额")
    private BigDecimal payPrice;
}
