Line | |
---|
1 | package com.example.salonbella.entity;
|
---|
2 |
|
---|
3 | import javax.persistence.Entity;
|
---|
4 | import javax.persistence.GeneratedValue;
|
---|
5 | import javax.persistence.GenerationType;
|
---|
6 | import javax.persistence.Id;
|
---|
7 |
|
---|
8 | @Entity
|
---|
9 | public 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.