package com.gxwebsoft.shop.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 购物车
 *
 * @author 科技小王子
 * @since 2024-07-29 21:02:39
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Cart对象", description = "购物车")
@TableName("shop_cart")
public class Cart implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "购物车表ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "类型 0商城 1预定 ")
    private Integer type;

    @ApiModelProperty(value = "唯一标识")
    private String code;

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

    @ApiModelProperty(value = "商品规格")
    private String spec;

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

    @ApiModelProperty(value = "商品数量")
    private Integer cartNum;

    @ApiModelProperty(value = "单品合计")
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "0 = 未购买 1 = 已购买")
    private Boolean isPay;

    @ApiModelProperty(value = "是否为立即购买")
    private Boolean isNew;

    @ApiModelProperty(value = "是否选中")
    private Boolean selected;

    @ApiModelProperty(value = "拼团id")
    private Integer combinationId;

    @ApiModelProperty(value = "秒杀产品ID")
    private Integer seckillId;

    @ApiModelProperty(value = "砍价id")
    private Integer bargainId;

    @ApiModelProperty(value = "商户ID")
    private Integer merchantId;

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

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

    @ApiModelProperty(value = "添加时间")
    private Date createTime;

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

    @ApiModelProperty(value = "店铺名称")
    @TableField(exist = false)
    private String merchantName;

    @ApiModelProperty(value = "店铺地址")
    @TableField(exist = false)
    private String address;

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

    @ApiModelProperty(value = "商品图片")
    @TableField(exist = false)
    private String image;

    @ApiModelProperty(value = "是否全选")
    @TableField(exist = false)
    private Boolean selectAll;

    @ApiModelProperty("子菜单")
    @TableField(exist = false)
    private List<Cart> children;

}
