-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBooks.java
More file actions
67 lines (54 loc) · 1.2 KB
/
Books.java
File metadata and controls
67 lines (54 loc) · 1.2 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package com.getdata.restcall_test1.Entity;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
@Entity
@Table(name = "books")
public class Books {
public Books(String bookName, String genre) {
this.bookName = bookName;
this.genre = genre;
}
public Books() {}
@Getter
@Setter
@Column(name = "BookName")
private String bookName;
@Getter
@Setter
@Column(name = "BookDesc")
private String bookDesc;
@Getter
@Setter
@Column(name = "Price")
private double price;
@Getter
@Setter
@Column(name = "Genre")
private String genre;
@Getter
@Setter
@Column(name = "Publisher")
private String publisher;
@Getter
@Setter
@Column(name = "CopiesSold")
private int copiesSold;
@Getter
@Setter
@Column(name = "YearPublished")
private int yearPublished;
@Getter
@Setter
@Id
@Column(name = "ISBN")
private String ISBN;
@Getter
@Setter
@JsonBackReference
@ManyToOne
@JoinColumn(name = "AuthorID")
private Author author;
}