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

Last change on this file since 4d7e387 was 4d7e387, checked in by makyjovanovsky <mjovanovski04@…>, 18 months ago

commit 1

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