package com.ltkj.mall.domain; import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.ltkj.common.annotation.Excel; import com.ltkj.common.core.domain.BaseEntity; import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.ibatis.annotations.Delete; /** * 购物车商品对象 mall_cart * * @author ltkj_赵佳豪&李格 * @date 2023-07-12 */ @Data public class MallCart extends BaseEntity { private static final long serialVersionUID = 1L; /** * id */ @TableId(type = IdType.AUTO) @JsonSerialize(using = ToStringSerializer.class) private Long id; /** * 用户表的用户ID */ @Excel(name = "用户表的用户ID") @JsonSerialize(using = ToStringSerializer.class) private Long userId; /** * 商品表的商品ID */ @Excel(name = "商品表的商品ID") @JsonSerialize(using = ToStringSerializer.class) private Long goodsId; /** * 商品编号 */ @Excel(name = "商品编号") private String goodsSn; /** * 商品名称 */ @Excel(name = "商品名称") private String goodsName; /** * 商品货品表的货品ID */ @Excel(name = "商品货品表的货品ID") private Long productId; /** * 商品货品的价格 */ @Excel(name = "商品货品的价格") private BigDecimal price; /** * 商品货品的数量 */ @Excel(name = "商品货品的数量") private Long number; /** * 商品规格值列表,采用JSON数组格式 */ @Excel(name = "商品规格值列表,采用JSON数组格式") private String specifications; /** * 购物车中商品是否选择状态 */ @Excel(name = "购物车中商品是否选择状态") private String checked; /** * 商品图片或者商品货品图片 */ @Excel(name = "商品图片或者商品货品图片") private String picUrl; /** * deptId */ @Excel(name = "deptId", readConverterExp = "$column.readConverterExp()") private Long deptId; @TableField(exist = false) private String startTime; @TableField(exist = false) private String endTime; @TableField(exist = false) private String phone; @TableField(exist = false) private String pacProName; @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("userId", getUserId()) .append("goodsId", getGoodsId()) .append("goodsSn", getGoodsSn()) .append("goodsName", getGoodsName()) .append("productId", getProductId()) .append("price", getPrice()) .append("number", getNumber()) .append("specifications", getSpecifications()) .append("checked", getChecked()) .append("picUrl", getPicUrl()) .append("deptId", getDeptId()) .append("createTime", getCreateTime()) .append("createBy", getCreateBy()) .append("updateTime", getUpdateTime()) .append("updateBy", getUpdateBy()) .append("deleted", getDeleted()) .toString(); } }