package com.gxwebsoft.shop.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * 订单商品记录表
 *
 * @author 科技小王子
 * @since 2022-12-09 17:15:31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "OrderGoods对象", description = "订单商品记录表")
@TableName("shop_order_goods")
public class OrderGoods implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单商品ID")
    @TableId(value = "order_goods_id", type = IdType.AUTO)
    private Integer orderGoodsId;

    @ApiModelProperty(value = "商品ID")
    private Integer goodsId;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "商品分类ID")
    private Integer categoryId;

    @ApiModelProperty(value = "分类名称")
    @TableField(exist = false)
    private String categoryName;

    @ApiModelProperty(value = "商品封面图")
    private String imageUrl;

    @ApiModelProperty(value = "商品封面图ID")
    private Integer imageId;

    @ApiModelProperty(value = "库存计算方式(10下单减库存 20付款减库存)")
    private Integer deductStockType;

    @ApiModelProperty(value = "规格类型(10单规格 20多规格)")
    private Integer specType;

    @ApiModelProperty(value = "商品sku唯一标识")
    private String goodsSkuId;

    @ApiModelProperty(value = "SKU的规格属性(json格式)")
    private String goodsProps;

    @ApiModelProperty(value = "商品详情")
    private String content;

    @ApiModelProperty(value = "商品编码")
    private String goodsNo;

    @ApiModelProperty(value = "商品价格(单价)")
    private BigDecimal goodsPrice;

    @ApiModelProperty(value = "商品划线价")
    private BigDecimal linePrice;

    @ApiModelProperty(value = "商品重量(Kg)")
    private Double goodsWeight;

    @ApiModelProperty(value = "是否存在会员等级折扣")
    private Integer isUserGrade;

    @ApiModelProperty(value = "会员折扣比例(0-10)")
    private Integer gradeRatio;

    @ApiModelProperty(value = "会员折扣的商品单价")
    private BigDecimal gradeGoodsPrice;

    @ApiModelProperty(value = "会员折扣的总额差")
    private BigDecimal gradeTotalMoney;

    @ApiModelProperty(value = "优惠券折扣金额")
    private BigDecimal couponMoney;

    @ApiModelProperty(value = "积分金额")
    private BigDecimal pointsMoney;

    @ApiModelProperty(value = "积分抵扣数量")
    private Integer pointsNum;

    @ApiModelProperty(value = "赠送的积分数量")
    private Integer pointsBonus;

    @ApiModelProperty(value = "付款状态(10未付款 20已付款)")
    @TableField(exist = false)
    private Integer payStatus;

    @ApiModelProperty(value = "购买数量")
    private Integer totalNum;

    @ApiModelProperty(value = "商品总价(数量×单价)")
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "实际付款价(折扣和优惠后)")
    private BigDecimal totalPayPrice;

    @ApiModelProperty(value = "发货状态(10未发货 20已发货 30部分发货)")
    private Integer deliveryStatus;

    @ApiModelProperty(value = "发货时间")
    @TableField(exist = false)
    private Date deliveryTime;

    @ApiModelProperty(value = "0星期日 1星期一 2星期二 3星期三 4星期四 5星期五 6星期六")
    @TableField(exist = false)
    private Integer week;

    @ApiModelProperty(value = "已发货数量")
    private Integer deliveryNum;

    @ApiModelProperty(value = "所属档口")
    private Integer gear;

    @ApiModelProperty(value = "是否临时报餐")
    private Integer temporary;

    @ApiModelProperty(value = "是否开启单独分销(0关闭 1开启)")
    private Integer isIndDealer;

    @ApiModelProperty(value = "分销佣金类型(10百分比 20固定金额)")
    private Integer dealerMoneyType;

    @ApiModelProperty(value = "分销佣金(一级)")
    private BigDecimal firstMoney;

    @ApiModelProperty(value = "分销佣金(二级)")
    private BigDecimal secondMoney;

    @ApiModelProperty(value = "分销佣金(三级)")
    private BigDecimal thirdMoney;

    @ApiModelProperty(value = "是否已评价(0否 1是)")
    private Integer isComment;

    @ApiModelProperty(value = "订单ID")
    private Integer orderId;

    @ApiModelProperty(value = "用户ID")
    private Integer userId;

    @ApiModelProperty(value = "来源记录ID")
    private Integer goodsSourceId;

    @ApiModelProperty(value = "排序(数字越小越靠前)")
    private Integer sortNumber;

    @ApiModelProperty(value = "备注")
    private String comments;

    @ApiModelProperty(value = "状态, 0正常, 1冻结")
    private Integer status;

    @ApiModelProperty(value = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "商户编码")
    private String merchantCode;

    @ApiModelProperty(value = "租户id")
    private Integer tenantId;

    @ApiModelProperty(value = "注册时间")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @ApiModelProperty(value = "用户昵称")
    @TableField(exist = false)
    private String nickname;

    @ApiModelProperty(value = "订单状态")
    @TableField(exist = false)
    private Integer orderStatus;

    @ApiModelProperty("是否允许取消")
    @TableField(exist = false)
    private Boolean isCancel;

    @ApiModelProperty("导出数据")
    @TableField(exist = false)
    private Object exportData;
}
