source: src/main/java/com/example/salonbella/entity/CartDetailEntity.java

Last change on this file was e9b70f6, checked in by makyjovanovsky <mjovanovski04@…>, 17 months ago

order

  • Property mode set to 100644
File size: 1.0 KB
Line 
1package com.example.salonbella.entity;
2
3import javax.persistence.Entity;
4import javax.persistence.GeneratedValue;
5import javax.persistence.GenerationType;
6import javax.persistence.Id;
7
8@Entity
9public class CartDetailEntity {
10
11 @Id
12 @GeneratedValue(strategy = GenerationType.IDENTITY)
13 private Long id;
14
15 private long product_id;
16 private int quantity;
17
18 public CartDetailEntity(long product_id, int quantity) {
19 this.product_id = product_id;
20 this.quantity = quantity;
21 }
22
23 public CartDetailEntity() {
24
25 }
26
27 public long getId() {
28 return product_id;
29 }
30
31 public void setId(long product_id) {
32 this.product_id = product_id;
33 }
34
35 public int getQuantity() {
36 return quantity;
37 }
38
39 public void setQuantity(int quantity) {
40 this.quantity = quantity;
41 }
42
43 @Override
44 public String toString() {
45 return "CartDetail{" +
46 "product_id=" + product_id +
47 ", quantity=" + quantity +
48 '}';
49 }
50}
51
Note: See TracBrowser for help on using the repository browser.