1 | package com.example.salonbella.entity;
|
---|
2 |
|
---|
3 | import javax.persistence.*;
|
---|
4 |
|
---|
5 | @Entity
|
---|
6 | @Table(name = "products")
|
---|
7 | public class ProductEntity {
|
---|
8 |
|
---|
9 | @Id
|
---|
10 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
11 | private Long id;
|
---|
12 |
|
---|
13 | @Column(name = "name", nullable = false, length = 50)
|
---|
14 | private String name;
|
---|
15 |
|
---|
16 | @Column(name = "description", nullable = false, length = 60)
|
---|
17 | private String description;
|
---|
18 |
|
---|
19 | @Column(name = "category", nullable = false, length = 50)
|
---|
20 | private String category;
|
---|
21 |
|
---|
22 | @Column(name = "price", nullable = false, length = 50)
|
---|
23 | private double price;
|
---|
24 |
|
---|
25 |
|
---|
26 | @Lob
|
---|
27 | private byte[] content;
|
---|
28 |
|
---|
29 | private String base64;
|
---|
30 |
|
---|
31 |
|
---|
32 | public String getBase64() {
|
---|
33 | return base64;
|
---|
34 | }
|
---|
35 |
|
---|
36 | public void setBase64(String base64) {
|
---|
37 | this.base64 = base64;
|
---|
38 | }
|
---|
39 |
|
---|
40 | public byte[] getContent() {
|
---|
41 | return content;
|
---|
42 | }
|
---|
43 |
|
---|
44 | public void setContent(byte[] content) {
|
---|
45 | this.content = content;
|
---|
46 | }
|
---|
47 |
|
---|
48 | public String getCategory() {
|
---|
49 | return category;
|
---|
50 | }
|
---|
51 |
|
---|
52 | public void setCategory(String category) {
|
---|
53 | this.category = category;
|
---|
54 | }
|
---|
55 |
|
---|
56 | public double getPrice() {
|
---|
57 | return price;
|
---|
58 | }
|
---|
59 |
|
---|
60 | public void setPrice(double price) {
|
---|
61 | this.price = price;
|
---|
62 | }
|
---|
63 |
|
---|
64 | public Long getId() {
|
---|
65 | return id;
|
---|
66 | }
|
---|
67 |
|
---|
68 | public void setId(Long id) {
|
---|
69 | this.id = id;
|
---|
70 | }
|
---|
71 |
|
---|
72 | public String getName() {
|
---|
73 | return name;
|
---|
74 | }
|
---|
75 |
|
---|
76 | public void setName(String name) {
|
---|
77 | this.name = name;
|
---|
78 | }
|
---|
79 |
|
---|
80 | public String getDescription() {
|
---|
81 | return description;
|
---|
82 | }
|
---|
83 |
|
---|
84 | public void setDescription(String description) {
|
---|
85 | this.description = description;
|
---|
86 | }
|
---|
87 | }
|
---|