-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
318 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
package com.libraryman_api.book; | ||
|
||
public class BookDto { | ||
|
||
|
||
private int bookId; | ||
private String title; | ||
|
||
private String author; | ||
|
||
private String isbn; | ||
|
||
private String publisher; | ||
|
||
|
||
private int publishedYear; | ||
private String genre; | ||
|
||
private int copiesAvailable; | ||
|
||
public BookDto(int bookId, String title, String author, String isbn, String publisher, int publishedYear, String genre, int copiesAvailable) { | ||
this.bookId = bookId; | ||
this.title = title; | ||
this.author = author; | ||
this.isbn = isbn; | ||
this.publisher = publisher; | ||
this.publishedYear = publishedYear; | ||
this.genre = genre; | ||
this.copiesAvailable = copiesAvailable; | ||
} | ||
|
||
public BookDto() { | ||
} | ||
|
||
public int getBookId() { | ||
return bookId; | ||
} | ||
|
||
public void setBookId(int bookId) { | ||
this.bookId = bookId; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
public String getAuthor() { | ||
return author; | ||
} | ||
|
||
public void setAuthor(String author) { | ||
this.author = author; | ||
} | ||
|
||
public String getIsbn() { | ||
return isbn; | ||
} | ||
|
||
public void setIsbn(String isbn) { | ||
this.isbn = isbn; | ||
} | ||
|
||
public String getPublisher() { | ||
return publisher; | ||
} | ||
|
||
public void setPublisher(String publisher) { | ||
this.publisher = publisher; | ||
} | ||
|
||
public int getPublishedYear() { | ||
return publishedYear; | ||
} | ||
|
||
public void setPublishedYear(int publishedYear) { | ||
this.publishedYear = publishedYear; | ||
} | ||
|
||
public String getGenre() { | ||
return genre; | ||
} | ||
|
||
public void setGenre(String genre) { | ||
this.genre = genre; | ||
} | ||
|
||
public int getCopiesAvailable() { | ||
return copiesAvailable; | ||
} | ||
|
||
public void setCopiesAvailable(int copiesAvailable) { | ||
this.copiesAvailable = copiesAvailable; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "BookDto{" + | ||
"bookId=" + bookId + | ||
", title='" + title + '\'' + | ||
", author='" + author + '\'' + | ||
", isbn='" + isbn + '\'' + | ||
", publisher='" + publisher + '\'' + | ||
", publishedYear=" + publishedYear + | ||
", genre='" + genre + '\'' + | ||
", copiesAvailable=" + copiesAvailable + | ||
'}'; | ||
} | ||
} |
113 changes: 113 additions & 0 deletions
113
src/main/java/com/libraryman_api/borrowing/BorrowingsDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
package com.libraryman_api.borrowing; | ||
|
||
import com.libraryman_api.book.Book; | ||
import com.libraryman_api.book.BookDto; | ||
import com.libraryman_api.fine.Fines; | ||
import com.libraryman_api.member.Members; | ||
import com.libraryman_api.member.MembersDto; | ||
|
||
import java.util.Date; | ||
|
||
public class BorrowingsDto { | ||
|
||
private int borrowingId; | ||
|
||
|
||
private BookDto book; | ||
|
||
|
||
private Fines fine; | ||
|
||
|
||
private MembersDto member; | ||
|
||
private Date borrowDate; | ||
|
||
|
||
private Date dueDate; | ||
|
||
|
||
private Date returnDate; | ||
|
||
public BorrowingsDto(int borrowingId, BookDto book, Fines fine, MembersDto member, Date borrowDate, Date dueDate, Date returnDate) { | ||
this.borrowingId = borrowingId; | ||
this.book = book; | ||
this.fine = fine; | ||
this.member = member; | ||
this.borrowDate = borrowDate; | ||
this.dueDate = dueDate; | ||
this.returnDate = returnDate; | ||
} | ||
|
||
public BorrowingsDto() { | ||
} | ||
|
||
public int getBorrowingId() { | ||
return borrowingId; | ||
} | ||
|
||
public void setBorrowingId(int borrowingId) { | ||
this.borrowingId = borrowingId; | ||
} | ||
|
||
public BookDto getBook() { | ||
return book; | ||
} | ||
|
||
public void setBook(BookDto book) { | ||
this.book = book; | ||
} | ||
|
||
public Fines getFine() { | ||
return fine; | ||
} | ||
|
||
public void setFine(Fines fine) { | ||
this.fine = fine; | ||
} | ||
|
||
public MembersDto getMember() { | ||
return member; | ||
} | ||
|
||
public void setMember(MembersDto member) { | ||
this.member = member; | ||
} | ||
|
||
public Date getBorrowDate() { | ||
return borrowDate; | ||
} | ||
|
||
public void setBorrowDate(Date borrowDate) { | ||
this.borrowDate = borrowDate; | ||
} | ||
|
||
public Date getDueDate() { | ||
return dueDate; | ||
} | ||
|
||
public void setDueDate(Date dueDate) { | ||
this.dueDate = dueDate; | ||
} | ||
|
||
public Date getReturnDate() { | ||
return returnDate; | ||
} | ||
|
||
public void setReturnDate(Date returnDate) { | ||
this.returnDate = returnDate; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "BorrowingsDto{" + | ||
"borrowingId=" + borrowingId + | ||
", book=" + book + | ||
", fine=" + fine + | ||
", member=" + member + | ||
", borrowDate=" + borrowDate + | ||
", dueDate=" + dueDate + | ||
", returnDate=" + returnDate + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
package com.libraryman_api.member; | ||
|
||
import java.util.Date; | ||
|
||
public class MembersDto { | ||
|
||
|
||
private int memberId; | ||
|
||
private String name; | ||
|
||
private String email; | ||
|
||
private String password; | ||
|
||
|
||
private Role role; | ||
|
||
|
||
private Date membershipDate; | ||
|
||
public MembersDto(int memberId, String name, String email, String password, Role role, Date membershipDate) { | ||
this.memberId = memberId; | ||
this.name = name; | ||
this.email = email; | ||
this.password = password; | ||
this.role = role; | ||
this.membershipDate = membershipDate; | ||
} | ||
|
||
public MembersDto() { | ||
} | ||
|
||
public int getMemberId() { | ||
return memberId; | ||
} | ||
|
||
public void setMemberId(int memberId) { | ||
this.memberId = memberId; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getEmail() { | ||
return email; | ||
} | ||
|
||
public void setEmail(String email) { | ||
this.email = email; | ||
} | ||
|
||
public String getPassword() { | ||
return password; | ||
} | ||
|
||
public void setPassword(String password) { | ||
this.password = password; | ||
} | ||
|
||
public Role getRole() { | ||
return role; | ||
} | ||
|
||
public void setRole(Role role) { | ||
this.role = role; | ||
} | ||
|
||
public Date getMembershipDate() { | ||
return membershipDate; | ||
} | ||
|
||
public void setMembershipDate(Date membershipDate) { | ||
this.membershipDate = membershipDate; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "MembersDto{" + | ||
"memberId=" + memberId + | ||
", name='" + name + '\'' + | ||
", email='" + email + '\'' + | ||
", password='" + password + '\'' + | ||
", role=" + role + | ||
", membershipDate=" + membershipDate + | ||
'}'; | ||
} | ||
} |