| | |
| | | package com.oying.modules.pc.product.domain; |
| | | |
| | | import lombok.Data; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import cn.hutool.core.bean.copier.CopyOptions; |
| | | import java.sql.Timestamp; |
| | | import java.math.BigDecimal; |
| | | 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.oying.base.BaseEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description / |
| | | * @author lzp |
| | | * @date 2025-04-30 |
| | | **/ |
| | | @Data |
| | | @Getter |
| | | @Setter |
| | | @TableName("pc_product") |
| | | public class Product implements Serializable { |
| | | public class Product extends BaseEntity implements Serializable { |
| | | |
| | | @TableId(value = "product_id") |
| | | @TableId(value = "product_id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Long productId; |
| | | |
| | |
| | | private Long secondCategoryId; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "状态:1000-草稿 1001上架 1002下架") |
| | | @ApiModelProperty(value = "状态") |
| | | private Integer status; |
| | | |
| | | @NotBlank |
| | | @ApiModelProperty(value = "主图片") |
| | | private String mainImage; |
| | | private String mainImageId; |
| | | |
| | | @ApiModelProperty(value = "详情图片") |
| | | private String detailImage; |
| | | @NotBlank |
| | | @ApiModelProperty(value = "主图地址") |
| | | private String mainImageUrl; |
| | | |
| | | @ApiModelProperty(value = "商品描述") |
| | | private String description; |
| | |
| | | @ApiModelProperty(value = "高度(单位:厘米)") |
| | | private Integer height; |
| | | |
| | | @ApiModelProperty(value = "是否支持退货") |
| | | private Integer returns; |
| | | |
| | | @ApiModelProperty(value = "是否支持自提") |
| | | private Integer selfPickup; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "销量") |
| | | private Integer totalUnitsSold = 0; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "月销售量") |
| | | private Integer monthlyUnitsSold = 0; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer deletedFlag; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createBy; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Timestamp createTime; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "修改人") |
| | | private Long updateBy; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Timestamp updateTime; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "版本号") |
| | | private Long version; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "图片") |
| | | private List<ProductImage> images; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "标签") |
| | | private List<ProductLabel> labels; |
| | | |
| | | public void copy(Product source){ |
| | | BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); |
| | | } |