-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProduct.java
More file actions
31 lines (27 loc) · 728 Bytes
/
Product.java
File metadata and controls
31 lines (27 loc) · 728 Bytes
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
package com.ecommerece.productservice.entities;
import lombok.*;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
public class Product {
@Id
private String id;
private String productName;
private String description;
private int availableQuantity;
private BigDecimal price;
private String userId;
@OneToMany(cascade = CascadeType.ALL)
private List<ImageModel> images;
// Display pictures URL from cloudinary will also stored here as a property
}