xin
2025-05-30 347909bae241fff128b628ea6d12992d7e5b4b10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
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 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;
 
/**
* @description /
* @author lzp
* @date 2025-04-30
**/
@Data
@TableName("pc_product")
public class Product implements Serializable {
 
    @TableId(value = "product_id")
    @ApiModelProperty(value = "ID")
    private Long productId;
 
    @NotBlank
    @ApiModelProperty(value = "店铺ID")
    private Long storeId;
 
    @NotBlank
    @ApiModelProperty(value = "条形码")
    private String barcode;
 
    @NotBlank
    @ApiModelProperty(value = "商品名称")
    private String name;
 
    @NotBlank
    @ApiModelProperty(value = "商品标题")
    private String title;
 
    @NotNull
    @ApiModelProperty(value = "一级分类ID")
    private Long categoryId;
 
    @NotNull
    @ApiModelProperty(value = "二级分类ID")
    private Long secondCategoryId;
 
    @NotNull
    @ApiModelProperty(value = "状态:1000-草稿 1001上架 1002下架")
    private Integer status;
 
    @NotBlank
    @ApiModelProperty(value = "主图片")
    private String mainImage;
 
    @ApiModelProperty(value = "详情图片")
    private String detailImage;
 
    @ApiModelProperty(value = "商品描述")
    private String description;
 
    @NotNull
    @ApiModelProperty(value = "销售价格")
    private BigDecimal price;
 
    @NotNull
    @ApiModelProperty(value = "库存数量")
    private Integer stockQuantity;
 
    @NotNull
    @ApiModelProperty(value = "起售数量")
    private Integer minPurchaseQuantity;
 
    @ApiModelProperty(value = "预警库存")
    private Integer warnStock;
 
    @ApiModelProperty(value = "重量(单位:g)")
    private Integer weight;
 
    @ApiModelProperty(value = "宽度(单位:厘米)")
    private Integer width;
 
    @ApiModelProperty(value = "长度(单位:厘米)")
    private Integer length;
 
    @ApiModelProperty(value = "高度(单位:厘米)")
    private Integer height;
 
    @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;
 
    public void copy(Product source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}