Index: kreiranje.sql
===================================================================
--- DB/kreiranje.sql	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ 	(revision )
@@ -1,196 +1,0 @@
---drop schema if exists project cascade;
-create schema project;
-
---drop table if exists PERSON;
---drop table if exists LIBRARY_DB;
---drop table if exists EMPLOYEE;
---drop table if exists SCHOOL_TYPE;
---drop table if exists MEMBERSHIP_TYPE;
---drop table if exists MEMBER_LIBRARY;
---drop table if exists PRICE;
---drop table if exists ROOM;
---drop table if exists BOOK;
---drop table if exists GENRE;
---drop table if exists REVIEW;
---drop table if exists WRITER;
---drop table if exists ONLINE_DOWNLOAD;
---drop table if exists RESERVATION_BOOK;
---drop table if exists RESERVATION_PLACE;
---drop table if exists MEMBERSHIP_OF_SCHOOLTYPE;
---drop table if exists WRITER_OF_BOOK;
-
-
-create table PERSON (
- id_person serial primary key,
- namee varchar(9) not null,
- surname varchar (12) not null,
- address varchar (25) not null,
- town varchar(10) not null, 
- phone_num varchar(15) not null,
- birth date,
- email varchar(45) not null,
- pass varchar (16) not null
-);
-
-create table LIBRARY_DB(
- id_library serial  primary key,
- names varchar (30) not null,
- city varchar(13) not null 
-);
-
-create table EMPLOYEE(
- id_person integer primary key,
- id_library integer not null,
- constraint fk_idperson_employee foreign key(id_person) references PERSON  (id_person),
- constraint fk_library_employee foreign key(id_library) references LIBRARY_DB (id_library),
- positionn varchar(14) not null
-);
-
-  
-create table SCHOOL_TYPE(
- id_school serial  primary key,
- school_type_name varchar (40) not null 
-);
-
-create table MEMBERSHIP_TYPE (
- id_membership serial  primary key,
- mem_type_name varchar (35) not null
-);
-
-
-create table MEMBER_LIBRARY(
- id_person integer primary key,
- id_school integer not null,
- id_membership integer not null,
- id_library integer not null,
- isPayedMemebership boolean not null,
- isPayedBook boolean not null,
- constraint fk_person_member foreign key (id_person) references PERSON (id_person),
- constraint fk_school_member foreign key (id_school) references SCHOOL_TYPE (id_school),
- constraint fk_membership_member foreign key (id_membership) references MEMBERSHIP_TYPE (id_membership),
- constraint fk_libraryy_member foreign key (id_library) references LIBRARY_DB (id_library)
-);
-
-
-create table PRICELIST (
- id_price integer  primary key,
- id_membership  integer not null,
- price integer not null,
- constraint fk_membership_price foreign key (id_membership) references MEMBERSHIP_TYPE (id_membership)
-);
-
-
-create table ROOM (
- id_room integer primary  key,
- places integer not null,
- free_places integer not null,
- id_library integer not null,
- constraint fk_library_room foreign key (id_library) references LIBRARY_DB (id_library)
-);
-
-
-create table GENRE(
- id_genre serial primary key,
- namee varchar(60) not null
-);
-
-
-create table BOOK(
- id_book serial  primary key,
- id_library  integer not  null,
- id_genre integer  not null,
- namee varchar(120) not null, 
- book_num integer not null, 
- if_free boolean not null,
- book_price integer  not null,
- book_price_late integer not null, 
- constraint fk_library_book foreign key (id_library) references  LIBRARY_DB (id_library),
- constraint fk_genre_book foreign key (id_genre) references  GENRE (id_genre)
-);
-
-create table REVIEW (
- id_review integer primary key,
- rent_num integer not null,
- rate integer not null,
- id_book integer not null,
- constraint fk_book_review foreign key (id_book) references BOOK (id_book)
-);
-
-
-create table WRITER (
- id_writer serial primary key, 
- namee varchar(70) not null,
- book_num integer not null
-);
-
-
-create table ONLINE_DOWNLOAD (
- id_onlineDown integer primary  key,
- id_book integer not null,
- id_member integer not null,
- downloaded integer not null,
- constraint fk_book_download foreign key (id_book) references  BOOK (id_book),
- constraint fk_personmember_down foreign key (id_member) references  MEMBER_LIBRARY (id_person)
-);
-
-
-create table RESERVATION_BOOK(
- id_resBook serial  primary key,
- id_book integer  not null,
- id_member integer not null,
- take_date date not null,
- return_date date not null,
- isReservedBook boolean not null,
- constraint fk_book_reservation foreign key (id_book) references BOOK (id_book),
- constraint fk_person_member_reservation  foreign  key (id_member) references MEMBER_LIBRARY (id_person)
-);
-
-  
-create table RESERVATION_PLACE(
- id_resRoom serial primary key,
- id_member integer not null,
- id_room integer not null,
- coming_date date not null,
- comingTime time not null,
- leavingTime time not null,
- constraint fk_person_member_place foreign key (id_member) references MEMBER_LIBRARY (id_person),
- constraint fk_room_place foreign key (id_room) references  ROOM (id_room)
-);
-
-
-create table MEMBERSHIP_OF_SCHOOLTYPE(
- id_membership integer  primary key,
- id_school  integer not null,
- constraint fk_membership_of foreign key (id_membership) references MEMBERSHIP_TYPE  (id_membership),
- constraint fk_school_of foreign key (id_school) references SCHOOL_TYPE  (id_school)
-);
-
-  
-create table WRITER_OF_BOOK(
- id_book integer primary key,
- id_writer integer not null,
- constraint fk_book_who_write foreign key (id_book) references BOOK (id_book),
- constraint fk_write_who foreign key (id_writer) references WRITER (id_writer)
-);
-
-
---DEL ZA BRISHENJE NA TABELI--
-
---delete from PERSON;
---delete from LIBRARY_DB;
---delete from EMPLOYEE;
---delete from SCHOOL_TYPE;
---delete from MEMBERSHIP_TYPE;
---delete from MEMBER_LIBRARY;
---delete from PRICE;
---delete from ROOM;
---delete from BOOK;
---delete from GENRE;
---delete from REVIEW;
---delete from WRITER;
---delete from ONLINE_DOWNLOAD;
---delete from RESERVATION_BOOK;
---delete from RESERVATION_PLACE;
---delete from MEMBERSHIP_OF_SCHOOLTYPE;
---delete from WRITER_OF_BOOK;
-
Index: polnenje.sql
===================================================================
--- DB/polnenje.sql	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ 	(revision )
@@ -1,55 +1,0 @@
-insert into PERSON(id_person, namee, surname, address, town, phone_num, birth, email, pass)
-  values (1,'Marija','Markovska','ul.Partizanski Odredi','Skopje','070555666', '2001-10-27', 'marija@gmail.com', 'marija5932'),
-         (2, 'Aleks','Aleksikj','ul.Oktomvriska Revolucija','Kumanovo','075855744', '2001-12-31', 'aleksa@hotmail.com', 'aleks8908');
-
-insert into LIBRARY_DB(id_library, names, city) 
-  values (201,'Sv.Braka Miladinovci', 'Skopje'),
-       (202, 'Tane Georgievski','Kumanovo');
-
-insert into EMPLOYEE(id_person,id_library,positionn)
-   values (1,201,'bibliotekar');
-
-insert into SCHOOL_TYPE (id_school, school_type_name)
-   values (21,'Osnovno uciliste');
-
-insert into MEMBERSHIP_TYPE (id_membership, mem_type_name)
-   values(010, 'ucenik-clenstvo');
-
-insert into MEMBER_LIBRARY (id_person, id_school, id_membership, id_library, isPayedMemebership, isPayedBook)
-   values (1, 21, 010, 202, True, True);
-
-insert into PRICELIST  (id_price , id_membership, price)
-   values (41,010,200);
-
-insert into ROOM (id_room, places, free_places, id_library)
-   values (2,60,10,202);
-
-insert into GENRE (id_genre, namee)
-   values (17,'novel');
-
-insert into BOOK (id_book, id_library, namee, book_num, if_free, book_price, book_price_late, id_genre)
-   values (1,201,'Game of Thrones',4,True, 30, 45,17);
-
-
-insert into REVIEW (id_review, rent_num, rate, id_book)
-   values (7,15,8,1);
-
-insert into WRITER (id_writer, namee, book_num)
-   values (5,'George R. R. Martin',60);
-
-insert into ONLINE_DOWNLOAD (id_onlineDown, id_book, id_member, downloaded)
-   values(21,1,1,1);
-
-insert into RESERVATION_BOOK (id_resBook, id_book, id_member, take_date, return_date, isReservedBook)
-   values (07, 1, 1, '2022-02-5', '2021-02-18', True);
-
-
-insert into RESERVATION_PLACE (id_resRoom, id_member, id_room, coming_date, comingTime, leavingTime)
-   values(205, 1, 2, '2022-02-15', '13:00', '10:00');
-
-insert into MEMBERSHIP_OF_SCHOOLTYPE (id_membership, id_school)
-   values (010,21);
-
-
-insert into WRITER_OF_BOOK (id_book,id_writer)
-   values(1,5);
Index: src/main/java/mk/ukim/finki/db/library/config/DataInitializer.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/config/DataInitializer.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/config/DataInitializer.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -1,93 +1,42 @@
-package mk.ukim.finki.db.library.config;
-
-import mk.ukim.finki.db.library.model.*;
-import mk.ukim.finki.db.library.service.*;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import java.util.Collections;
-import java.util.List;
-
-@Component
-public class DataInitializer {
-
-    private final UserService userService;
-    private final BookService bookService;
-    private final WriterService writerService;
-    private final GenreService genreService;
-    private final LibraryService libraryService;
-    private final SchoolTypeService schoolTypeService;
-    private final MembershipTypeService membershipTypeService;
-    private final RoomService roomService;
-    private final PriceListService priceListService;
-
-    public DataInitializer(UserService userService, BookService bookService, WriterService writerService, LibraryService libraryService, GenreService genreService, LibraryService libraryService1, SchoolTypeService schoolTypeService, MembershipTypeService membershipTypeService, RoomService roomService, PriceListService priceListService) {
-        this.userService = userService;
-        this.bookService = bookService;
-        this.writerService = writerService;
-        this.genreService = genreService;
-        this.libraryService = libraryService1;
-        this.schoolTypeService = schoolTypeService;
-        this.membershipTypeService = membershipTypeService;
-        this.roomService = roomService;
-        this.priceListService = priceListService;
-    }
-
-    @PostConstruct
-    public void initData(){
-        Person member = this.userService.register("MemberName", "MemberSurname",
-                "MemberAddress", "MemberTown", "071/111/222", "memberemail@hotmail.com", "baza123!");
-
-        //LIBRARIES
-        Library library = this.libraryService.create(1L,"Grigor Prlicev", "Ohrid");
-//        this.libraryService.create(2L, "Braka Miladinovci", "Struga");
-//        this.libraryService.create(3L, "Braka Miladinovci", "Skopje");
-
-        //GENRES
-        Genre genre = this.genreService.create(11L, "thriller");
-        this.genreService.create(12L, "comedy");
-        this.genreService.create(13L, "action");
-        this.genreService.create(14L, "romance");
-        this.genreService.create(15L, "history");
-        this.genreService.create(16L, "teenage");
-
-        //WRITERS
-        Writer writer = this.writerService.create(111L, "Dan Brown");
-        this.writerService.create(112L, "Linwood Barclay");
-        this.writerService.create(113L, "Sebastian Fizek");
-        this.writerService.create(114L, "Julie James");
-
-       //BOOKS
-        //this.bookService.createB(1112L,"Seat 7A", 5, true, 30, 50, List.of(1L), List.of(3L), 1L);
-        this.bookService.create(1111L, "Inferno",3, true, 30, 50);
-        this.bookService.create(1112L, "Seat 7A",2, true, 30, 50);
-        this.bookService.create(1113L, "No time for goodbye",0, false, 30, 50);
-
-//        this.bookService.createB(1114L,"Seat 7A", 5, true, 30, 50, Collections.singletonList(((Long) bookService.findById(2L).getGenre().getId())),
-//                List.of(3L), 1L);
-
-        //SCHOOLTYPES
-        this.schoolTypeService.create(1L,"PRIMARY SCHOOL");
-        this.schoolTypeService.create(2L,"HIGH SCHOOL");
-        this.schoolTypeService.create(3L,"OTHER");
-
-        //MEMBERSHIPTYPES
-        this.membershipTypeService.create(1L, "WEEKLY");
-        this.membershipTypeService.create(2L, "MONTHLY");
-        this.membershipTypeService.create(3L, "YEARLY");
-
-        //PRICELIST
-        this.priceListService.create(1L, 70); //weekly - other
-        this.priceListService.create(2L, 100); //monthy - other
-        this.priceListService.create(3L, 300); //yearly - other
-        this.priceListService.create(5L, 150); //yearly - primary school
-        this.priceListService.create(6L, 300); //yearly - high school
-
-        //ROOMS
-        this.roomService.create(1L, "Room 1", 30, 8);
-        this.roomService.create(2L, "Room 2", 20, 5);
-        this.roomService.create(3L, "Room 3", 60, 60);
-
-    }
-
-}
+//package mk.ukim.finki.db.library.config;
+//
+//import mk.ukim.finki.db.library.model.Book;
+//import mk.ukim.finki.db.library.model.Person;
+//import mk.ukim.finki.db.library.model.Writer;
+//import mk.ukim.finki.db.library.service.BookService;
+//import mk.ukim.finki.db.library.service.LibraryService;
+//import mk.ukim.finki.db.library.service.UserService;
+//import mk.ukim.finki.db.library.service.WriterService;
+//import org.springframework.stereotype.Component;
+//
+//import javax.annotation.PostConstruct;
+//import java.util.Calendar;
+//import java.util.Date;
+//
+//@Component
+//public class DataInitializer {
+//
+//    private final UserService userService;
+//    private final BookService bookService;
+//    private final WriterService writerService;
+//    private final LibraryService libraryService;
+//
+//    public DataInitializer(UserService userService, BookService bookService, WriterService writerService, LibraryService libraryService) {
+//        this.userService = userService;
+//        this.bookService = bookService;
+//        this.writerService = writerService;
+//        this.libraryService = libraryService;
+//    }
+//
+//    @PostConstruct
+//    public void initData(){
+//        Person member = this.userService.register("MemberName", "MemberSurname",  new Date(2010, Calendar.JANUARY,1),
+//                "MemberAddres","MemeberTowen", "071/654 521", "memberemail@hotmail.com", "baza123!");
+//
+//        Writer writer = this.writerService.create("Dan Brown");
+//
+//        Book book = this.bookService.create("Inferno", 10, true, 30, 50);
+//
+//
+//    }
+//}
Index: src/main/java/mk/ukim/finki/db/library/model/Book.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/Book.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/model/Book.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -3,5 +3,4 @@
 import javax.persistence.*;
 import java.util.List;
-import java.util.Optional;
 
 @Entity
@@ -10,7 +9,38 @@
     public Book(){}
 
-    public Book(String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, List<Long> genreIds, List<Long> writerIds, Long libraryId){}
+//    public Book(String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate) {
+//        this.bookName = bookName;
+//        this.bookNumber = bookNumber;
+//        this.isFree = isFree;
+//        this.bookPrice = bookPrice;
+//        this.bookPriceLate = bookPriceLate;
+//    }
 
-    public Book(Long id, String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate) {
+//    public Book(String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, List<Genre> genres, List<Writer> writers
+//    , BookGenre bookGenre, LibrariesEnum librariesEnum) {
+//        this.bookName = bookName;
+//        this.bookNumber = bookNumber;
+//        this.isFree = isFree;
+//        this.bookPrice = bookPrice;
+//        this.bookPriceLate = bookPriceLate;
+//        this.genre = (Genre) genres;
+//        this.writers = writers;
+//        this.bookGenre = bookGenre;
+//        this.librariesEnum = librariesEnum;
+//    }
+//
+//    public Book(String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, List<Writer> writers
+//            , BookGenre bookGenre, LibrariesEnum librariesEnum) {
+//        this.bookName = bookName;
+//        this.bookNumber = bookNumber;
+//        this.isFree = isFree;
+//        this.bookPrice = bookPrice;
+//        this.bookPriceLate = bookPriceLate;
+//        this.writers = writers;
+//        this.bookGenre = bookGenre;
+//        this.librariesEnum = librariesEnum;
+//    }
+
+    public Book(String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, BookGenre bookGenre, LibrariesEnum librariesEnum) {
         this.bookName = bookName;
         this.bookNumber = bookNumber;
@@ -18,35 +48,6 @@
         this.bookPrice = bookPrice;
         this.bookPriceLate = bookPriceLate;
-    }
-
-    public Book(String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, List<Genre> genres, List<Writer> writers) {
-        this.bookName = bookName;
-        this.bookNumber = bookNumber;
-        this.isFree = isFree;
-        this.bookPrice = bookPrice;
-        this.bookPriceLate = bookPriceLate;
-        this.genre = (Genre) genres;
-        this.writers = writers;
-    }
-
-    public Book(Long id,String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, List<Genre> genres, List<Writer> writers, Library library) {
-        this.id = id;
-        this.bookName = bookName;
-        this.bookNumber = bookNumber;
-        this.isFree = isFree;
-        this.bookPrice = bookPrice;
-        this.bookPriceLate = bookPriceLate;
-        this.genre = (Genre) genres;
-        this.writers = writers;
-        this.library = library;
-    }
-
-    public Book(String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, Library library) {
-        this.bookName = bookName;
-        this.bookNumber = bookNumber;
-        this.isFree = isFree;
-        this.bookPrice = bookPrice;
-        this.bookPriceLate = bookPriceLate;
-        this.library = library;
+        this.bookGenre = bookGenre;
+        this.librariesEnum = librariesEnum;
     }
 
@@ -65,4 +66,10 @@
     private int bookPriceLate;
 
+    @Enumerated
+    private BookGenre bookGenre;
+
+    @Enumerated
+    private LibrariesEnum librariesEnum;
+
     @ManyToOne
     private Library library;
@@ -74,14 +81,6 @@
     private List<Writer> writers;
 
-    public Long getId() {
-        return id;
-    }
-
     public Library getLibrary() {
         return library;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
     }
 
@@ -118,4 +117,8 @@
     }
 
+    public String getGenreOfBook(){return bookGenre.toString();}
+
+    public String getLibraryOfBook(){return librariesEnum.toString();}
+
     public void setBookNumber(int bookNumber) {
         bookNumber = bookNumber;
Index: src/main/java/mk/ukim/finki/db/library/model/Genre.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/Genre.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/model/Genre.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -3,5 +3,4 @@
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
 import javax.persistence.Id;
 
@@ -11,18 +10,13 @@
     public Genre(){}
 
-    public Genre(Long id, String genreName) {
-        this.id = id;
+    public Genre(String genreName) {
         this.genreName = genreName;
     }
 
     @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @GeneratedValue
     private Long id;
 
     private String genreName;
-
-    public Long getId() {
-        return id;
-    }
 
     public String getGenreName() {
Index: src/main/java/mk/ukim/finki/db/library/model/LibrariesEnum.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/LibrariesEnum.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
+++ src/main/java/mk/ukim/finki/db/library/model/LibrariesEnum.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -0,0 +1,5 @@
+package mk.ukim.finki.db.library.model;
+
+public enum LibrariesEnum {
+    KUMANOVO, SKOPJE, BITOLA
+}
Index: src/main/java/mk/ukim/finki/db/library/model/Library.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/Library.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/model/Library.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -15,6 +15,5 @@
     }
 
-    public Library(Long id, String libraryName, String libraryCity) {
-        this.id = id;
+    public Library(String libraryName, String libraryCity) {
         this.libraryName = libraryName;
         this.libraryCity = libraryCity;
@@ -33,8 +32,4 @@
     private List<Book> books;
 
-    public String getLibraryName() {
-        return libraryName;
-    }
-
     public void addBook(Book book) {
         this.books.add(book);
Index: src/main/java/mk/ukim/finki/db/library/model/Member.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/Member.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/model/Member.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -33,6 +33,6 @@
     private Library library;
 
-    public Member(String name, String surname,  String address, String town, String phoneNumber, String email, String encryptedPasswords) {
-        super(name, surname,address, town, phoneNumber, email, encryptedPasswords);
+    public Member(String name, String surname, Date birth, String address, String town, String phoneNumber, String email, String encryptedPasswords) {
+        super(name, surname, birth, address, town, phoneNumber, email, encryptedPasswords);
     }
 
Index: src/main/java/mk/ukim/finki/db/library/model/MembershipType.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/MembershipType.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/model/MembershipType.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -8,10 +8,10 @@
     public MembershipType(){}
 
-    public MembershipType(Long id, String membershipTypeName) {
+    public MembershipType(String membershipTypeName) {
         this.membershipTypeName = membershipTypeName;
     }
 
     @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @GeneratedValue
     private Long id;
 
Index: src/main/java/mk/ukim/finki/db/library/model/Person.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/Person.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/model/Person.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -25,7 +25,8 @@
     public Person(){ }
 
-    public Person(String name, String surname, String address, String town, String phoneNumber, String email, String password) {
+    public Person(String name, String surname, Date birthDate, String address, String town, String phoneNumber, String email, String password) {
         this.name = name;
         this.surname = surname;
+        this.birthDate = birthDate;
         this.address = address;
         this.town = town;
Index: src/main/java/mk/ukim/finki/db/library/model/PriceList.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/PriceList.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/model/PriceList.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -3,5 +3,4 @@
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
 import javax.persistence.Id;
 
@@ -11,10 +10,10 @@
     public PriceList(){}
 
-    public PriceList(Long id, int price) {
+    public PriceList(int price) {
         this.price = price;
     }
 
     @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @GeneratedValue
     private Long id;
 
Index: src/main/java/mk/ukim/finki/db/library/model/ReservationBook.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/ReservationBook.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/model/ReservationBook.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -18,8 +18,10 @@
     }
 
-    public ReservationBook( Date takeDate, Date returnDate) { //Long id,
-        //(Long) this.book.getId() = id;
+    public ReservationBook(Member member, Book book, Date takeDate, Date returnDate, boolean isReservedBook) {
+        this.member = member;
+        this.book = book;
         this.takeDate = takeDate;
         this.returnDate = returnDate;
+        this.isReservedBook = isReservedBook;
     }
 
Index: src/main/java/mk/ukim/finki/db/library/model/Room.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/Room.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/model/Room.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -1,5 +1,8 @@
 package mk.ukim.finki.db.library.model;
 
-import javax.persistence.*;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
 
 @Entity
@@ -8,7 +11,5 @@
     public Room(){}
 
-    public Room(Long id, String name, int places, int freePlaces) {
-        this.id = id;
-        this.name = name;
+    public Room(int places, int freePlaces) {
         this.places = places;
         this.freePlaces = freePlaces;
@@ -20,8 +21,6 @@
 
     @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @GeneratedValue
     private Long id;
-
-    private String name;
 
     private int places;
@@ -55,7 +54,3 @@
         this.freePlaces = freePlaces;
     }
-
-    public String getName() {
-        return name;
-    }
 }
Index: src/main/java/mk/ukim/finki/db/library/model/SchoolType.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/SchoolType.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/model/SchoolType.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -3,5 +3,4 @@
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
 import javax.persistence.Id;
 
@@ -11,10 +10,10 @@
     public SchoolType(){}
 
-    public SchoolType(Long id, String schoolTypeName) {
+    public SchoolType(String schoolTypeName) {
         this.schoolTypeName = schoolTypeName;
     }
 
     @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @GeneratedValue
     private Long id;
 
Index: src/main/java/mk/ukim/finki/db/library/model/Writer.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/Writer.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/model/Writer.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -3,5 +3,4 @@
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
 import javax.persistence.Id;
 
@@ -11,18 +10,13 @@
     public Writer(){}
 
-    public Writer(Long id, String writerName) {
-        this.id = id;
+    public Writer(String writerName) {
         this.writerName = writerName;
     }
 
     @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @GeneratedValue
     private Long id;
 
     private String writerName;
-
-    public Long getId() {
-        return id;
-    }
 
     public String getWriterName() {
Index: c/main/java/mk/ukim/finki/db/library/model/exception/LibraryNotFoundException.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/exception/LibraryNotFoundException.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ 	(revision )
@@ -1,9 +1,0 @@
-package mk.ukim.finki.db.library.model.exception;
-
-public class LibraryNotFoundException extends RuntimeException{
-
-    public LibraryNotFoundException(Long id) {
-        super(String.format("Library with id: %d is not found", id));
-    }
-
-}
Index: c/main/java/mk/ukim/finki/db/library/model/exception/MemberNotFoundException.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/model/exception/MemberNotFoundException.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ 	(revision )
@@ -1,8 +1,0 @@
-package mk.ukim.finki.db.library.model.exception;
-
-public class MemberNotFoundException extends RuntimeException{
-
-    public MemberNotFoundException(String id) {
-        super(String.format("Member with id: %d is not found", id));
-    }
-}
Index: src/main/java/mk/ukim/finki/db/library/repository/BookRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/repository/BookRepository.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/repository/BookRepository.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -5,12 +5,8 @@
 import org.springframework.stereotype.Repository;
 
-import java.util.List;
-
 @Repository
 public interface BookRepository extends JpaRepository<Book, Long> {
 
-    //TODO: listBooksByNameAndGenre, listBooksByNameAndGenreAndWriter, listBooksByNameAndWriter
+    //TODO: listBooksByName, listBooksByNameAndGenre, listBooksByNameAndGenreAndWriter, listBooksByNameAndWriter
     //TODO: listBooksByGenre, listBooksByWriter
-
-    List<Book> findByBookName(String bookName);
 }
Index: src/main/java/mk/ukim/finki/db/library/repository/MemberRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/repository/MemberRepository.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/repository/MemberRepository.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -1,9 +1,5 @@
 package mk.ukim.finki.db.library.repository;
 
-import mk.ukim.finki.db.library.model.Book;
-import mk.ukim.finki.db.library.model.Member;
 import org.springframework.stereotype.Repository;
-
-import java.util.List;
 
 @Repository
Index: src/main/java/mk/ukim/finki/db/library/repository/RoomRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/repository/RoomRepository.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/repository/RoomRepository.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -1,14 +1,9 @@
 package mk.ukim.finki.db.library.repository;
 
-import mk.ukim.finki.db.library.model.Book;
 import mk.ukim.finki.db.library.model.Room;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Repository;
 
-import java.util.List;
-
 @Repository
 public interface RoomRepository extends JpaRepository<Room, Long> {
-
-    List<Room> findByName(String name);
 }
Index: src/main/java/mk/ukim/finki/db/library/repository/UserRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/repository/UserRepository.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/repository/UserRepository.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -6,5 +6,4 @@
 import org.springframework.stereotype.Repository;
 
-import java.util.List;
 import java.util.Optional;
 
@@ -14,5 +13,3 @@
 
     Optional<Person> findByEmailAndPassword(String email, String password);
-
-    List<Person> findByEmail(String email);
 }
Index: src/main/java/mk/ukim/finki/db/library/service/BookService.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/BookService.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/BookService.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -3,4 +3,5 @@
 import mk.ukim.finki.db.library.model.Book;
 import mk.ukim.finki.db.library.model.BookGenre;
+import mk.ukim.finki.db.library.model.LibrariesEnum;
 
 import java.util.List;
@@ -12,12 +13,9 @@
     Book findById(Long id);
 
-    Book create(Long id, String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate); //, List<Long> genreIds, List<Long> writerIds
+    Book create(String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, BookGenre bookGenre, LibrariesEnum librariesEnum); //, List<Long> genreIds, List<Long> writerIds
 
-    Book update(Long id, String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, List<Long> genreIds, List<Long> writerIds, Long libraryId);
+    Book update(Long id, String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, List<Long> genreIds, List<Long> writerIds);
 
     Book delete(Long id);
 
-    Book createB(Long id, String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, List<Long> genreIds, List<Long> writerIds, Long libraryId); //, List<Long> genreIds, List<Long> writerIds
-
-    List<Book> findByBookName(String bookName);
 }
Index: src/main/java/mk/ukim/finki/db/library/service/GenreService.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/GenreService.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/GenreService.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -11,4 +11,4 @@
     List<Genre> listAll();
 
-    Genre create(Long id, String name);
+    Genre create(String name);
 }
Index: src/main/java/mk/ukim/finki/db/library/service/LibraryService.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/LibraryService.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/LibraryService.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -11,5 +11,5 @@
     List<Library> listAll();
 
-    Library create(Long id, String libraryName, String libraryCity);
+    Library create(String libraryName, String libraryCity);
 
     Library update(Long id, String libraryName, String libraryCity);
Index: src/main/java/mk/ukim/finki/db/library/service/MembershipTypeService.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/MembershipTypeService.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/MembershipTypeService.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -11,4 +11,4 @@
     List<MembershipType> listAll();
 
-    MembershipType create(Long id, String name);
+    MembershipType create(String name);
 }
Index: src/main/java/mk/ukim/finki/db/library/service/PriceListService.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/PriceListService.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/PriceListService.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -11,4 +11,4 @@
     List<PriceList> listAll();
 
-    PriceList create(Long id, int price);
+    PriceList create(int price);
 }
Index: src/main/java/mk/ukim/finki/db/library/service/ReservationBookService.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/ReservationBookService.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/ReservationBookService.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -10,8 +10,8 @@
 public interface ReservationBookService {
 
-    //ReservationBook getActiveResBookUser(String username);
+    ReservationBook findById(Long id);
 
     List<ReservationBook> listAll();
 
-    ReservationBook reserveBook(Long bookId, Date takeDate, Date returnDate);
+    ReservationBook reserveBook(Long memberId, Long bookId, Date takeDate, Date returnDate, boolean isReservedBook);
 }
Index: src/main/java/mk/ukim/finki/db/library/service/RoomService.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/RoomService.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/RoomService.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -11,6 +11,4 @@
     List<Room> listAll();
 
-    Room create(Long id, String name, int places, int freePlaces);
-
-    List<Room> findByName(String name);
+    Room create(int name);
 }
Index: src/main/java/mk/ukim/finki/db/library/service/SchoolTypeService.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/SchoolTypeService.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/SchoolTypeService.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -11,4 +11,4 @@
     List<SchoolType> listAll();
 
-    SchoolType create(Long id, String name);
+    SchoolType create(String name);
 }
Index: src/main/java/mk/ukim/finki/db/library/service/UserService.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/UserService.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/UserService.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -3,14 +3,12 @@
 import mk.ukim.finki.db.library.model.Person;
 
-import java.util.List;
+import java.util.Date;
 
 public interface UserService {
 
-    Person register(String name, String surname, String address, String town, String phoneNumber,
-                    String email, String password);
+    Person register(String name, String surname, Date birthDate, String address, String town, String phoneNumber,
+                     String email, String password);
 
     Person login(String username, String password);
 
-    List<Person> findByEmail(String email);
-
 }
Index: src/main/java/mk/ukim/finki/db/library/service/WriterService.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/WriterService.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/WriterService.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -11,4 +11,4 @@
     List<Writer> listAll();
 
-    Writer create(Long id, String name);
+    Writer create(String name);
 }
Index: src/main/java/mk/ukim/finki/db/library/service/impl/BookServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/impl/BookServiceImpl.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/impl/BookServiceImpl.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -2,16 +2,14 @@
 
 import mk.ukim.finki.db.library.model.*;
-import mk.ukim.finki.db.library.model.exception.InvalidArgumentsException;
 import mk.ukim.finki.db.library.model.exception.InvalidBookIdException;
-import mk.ukim.finki.db.library.model.exception.LibraryNotFoundException;
 import mk.ukim.finki.db.library.repository.BookRepository;
 import mk.ukim.finki.db.library.repository.GenreRepository;
-import mk.ukim.finki.db.library.repository.LibraryRepository;
 import mk.ukim.finki.db.library.repository.WriterRepository;
 import mk.ukim.finki.db.library.service.BookService;
+import mk.ukim.finki.db.library.service.LibraryService;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
-import java.util.Optional;
+import java.util.stream.Collectors;
 
 @Service
@@ -21,11 +19,9 @@
     private final WriterRepository writerRepository;
     private final GenreRepository genreRepository;
-    private final LibraryRepository libraryRepository;
 
-    public BookServiceImpl(BookRepository bookRepository, WriterRepository writerRepository, GenreRepository genreRepository, LibraryRepository libraryRepository) {
+    public BookServiceImpl(BookRepository bookRepository, WriterRepository writerRepository, GenreRepository genreRepository, LibraryService libraryService) {
         this.bookRepository = bookRepository;
         this.writerRepository = writerRepository;
         this.genreRepository = genreRepository;
-        this.libraryRepository = libraryRepository;
     }
 
@@ -41,13 +37,14 @@
 
     @Override
-    public Book create(Long id, String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate) { //, List<Long> genreIds, List<Long> writerIds
+    public Book create(String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate,
+                       BookGenre bookGenre, LibrariesEnum librariesEnum) { //, List<Long> genreIds, List<Long> writerIds
         //List<Genre> genres = this.genreRepository.findAllById(genreIds);
         //List<Writer> writers = this.writerRepository.findAllById(writerIds);
-        Book book = new Book(id, bookName, bookNumber, isFree, bookPrice, bookPriceLate); //, genres, writers
+        Book book = new Book(bookName, bookNumber, isFree, bookPrice, bookPriceLate, bookGenre, librariesEnum); //, genres, writers
         return this.bookRepository.save(book);
     }
 
     @Override
-    public Book update(Long id, String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, List<Long> genreIds, List<Long> writerIds, Long libraryId) {
+    public Book update(Long id, String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, List<Long> genreIds, List<Long> writerIds) {
         Book book =  this.findById(id);
         book.setBookName(bookName);
@@ -63,7 +60,4 @@
         book.setWriters(writers);
 
-        Library library = this.libraryRepository.findById(libraryId).orElseThrow(() -> new LibraryNotFoundException(libraryId));
-        book.setLibrary(library);
-
         return this.bookRepository.save(book);
     }
@@ -76,34 +70,7 @@
     }
 
-    @Override
-    public Book createB(Long id, String bookName, int bookNumber, boolean isFree, int bookPrice, int bookPriceLate, List<Long> genreIds, List<Long> writerIds, Long libraryId) {
-        List<Genre> genres = this.genreRepository.findAllById(genreIds);
-        List<Writer> writers = this.writerRepository.findAllById(genreIds);
-
-        Book book = new Book();
-        book.setId(id);
-        book.setBookName(bookName);
-        book.setBookNumber(bookNumber);
-        book.setFree(isFree);
-        book.setBookPrice(bookPrice);
-        book.setBookPriceLate(bookPriceLate);
-        book.setGenre((Genre) genres);
-        book.setWriters(writers);
-
-        //book = new Book(bookName, bookNumber, isFree, bookPrice, bookPriceLate, genreIds, writerIds, libraryId);
-        return null;
-    }
-
-    @Override
-    public List<Book> findByBookName(String bookName) {
-        if(bookName == null || bookName.isEmpty()){
-            throw new InvalidArgumentsException();
-        }
-
-        return this.bookRepository.findByBookName(bookName);
-    }
 
     //in bookRepository
-    //TODO: listBooksByNameAndGenre, listBooksByNameAndGenreAndWriter, listBooksByNameAndWriter
+    //TODO: listBooksByName, listBooksByNameAndGenre, listBooksByNameAndGenreAndWriter, listBooksByNameAndWriter
     //TODO: listBooksByGenre, listBooksByWriter
 }
Index: src/main/java/mk/ukim/finki/db/library/service/impl/GenreServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/impl/GenreServiceImpl.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/impl/GenreServiceImpl.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -29,6 +29,6 @@
 
     @Override
-    public Genre create(Long id, String name) {
-        Genre genre = new Genre(id, name);
+    public Genre create(String name) {
+        Genre genre = new Genre(name);
         return this.genreRepository.save(genre);
     }
Index: src/main/java/mk/ukim/finki/db/library/service/impl/LibraryServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/impl/LibraryServiceImpl.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/impl/LibraryServiceImpl.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -25,6 +25,6 @@
 
     @Override
-    public Library create(Long id, String libraryName, String libraryCity) {
-        Library library = new Library(id, libraryName, libraryCity);
+    public Library create(String libraryName, String libraryCity) {
+        Library library = new Library(libraryName, libraryCity);
         return this.libraryRepository.save(library);
     }
Index: src/main/java/mk/ukim/finki/db/library/service/impl/MembershipTypeServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/impl/MembershipTypeServiceImpl.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/impl/MembershipTypeServiceImpl.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -30,6 +30,6 @@
 
     @Override
-    public MembershipType create(Long id, String name) {
-        MembershipType membershipType = new MembershipType(id, name);
+    public MembershipType create(String name) {
+        MembershipType membershipType = new MembershipType(name);
         return this.membershipTypeRepository.save(membershipType);
     }
Index: src/main/java/mk/ukim/finki/db/library/service/impl/PriceListServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/impl/PriceListServiceImpl.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/impl/PriceListServiceImpl.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -29,6 +29,6 @@
 
     @Override
-    public PriceList create(Long id, int price) {
-        PriceList priceList = new PriceList(id, price);
+    public PriceList create(int price) {
+        PriceList priceList = new PriceList(price);
         return this.priceListRepository.save(priceList);
     }
Index: src/main/java/mk/ukim/finki/db/library/service/impl/ReservationBookServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/impl/ReservationBookServiceImpl.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/impl/ReservationBookServiceImpl.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -2,9 +2,8 @@
 
 import mk.ukim.finki.db.library.model.*;
-import mk.ukim.finki.db.library.model.exception.MemberNotFoundException;
+import mk.ukim.finki.db.library.model.exception.InvalidReservationBookIdException;
 import mk.ukim.finki.db.library.repository.BookRepository;
 import mk.ukim.finki.db.library.repository.MemberRepository;
 import mk.ukim.finki.db.library.repository.ReservationBookRepository;
-import mk.ukim.finki.db.library.repository.UserRepository;
 import mk.ukim.finki.db.library.service.ReservationBookService;
 import org.springframework.stereotype.Service;
@@ -17,11 +16,17 @@
 
     private final ReservationBookRepository reservationBookRepository;
-    private final UserRepository userRepository;
+    private final MemberRepository memberRepository;
     private final BookRepository bookRepository;
 
     public ReservationBookServiceImpl(ReservationBookRepository reservationBookRepository, MemberRepository memberRepository, BookRepository bookRepository) {
         this.reservationBookRepository = reservationBookRepository;
-        this.userRepository = memberRepository;
+        this.memberRepository = memberRepository;
         this.bookRepository = bookRepository;
+    }
+
+
+    @Override
+    public ReservationBook findById(Long id) {
+        return this.reservationBookRepository.findById(id).orElseThrow(InvalidReservationBookIdException::new);
     }
 
@@ -32,24 +37,12 @@
 
     @Override
-    public ReservationBook reserveBook(Long bookId, Date takeDate, Date returnDate) {
+    public ReservationBook reserveBook(Long memberId, Long bookId, Date takeDate, Date returnDate, boolean isReservedBook) {
+        Person member = memberId!=null ? this.memberRepository.findById(memberId).orElse((Member) null) : null;
+        Book book = bookId!=null ? this.bookRepository.findById(bookId).orElse((Book) null) : null;
 
-
-        ReservationBook reservationBook = new ReservationBook(takeDate, returnDate); //bookId,
+        ReservationBook reservationBook = new ReservationBook((Member) member, book, takeDate, returnDate, isReservedBook);
+        //TODO: treba da se zemat site izdanija od knigata, da se proveri dali ima slobodna i ako ima, od vkupnoto da se namali za edno
 
         return this.reservationBookRepository.save(reservationBook);
     }
-
-
-
-//    @Override
-//    public ReservationBook reserveBook(Long memberId, Long bookId, Date takeDate, Date returnDate, boolean isReservedBook) {
-//        Person member = memberId!=null ? this.userRepository.findById(memberId).orElse((Member) null) : null;
-//        Book book = bookId!=null ? this.bookRepository.findById(bookId).orElse((Book) null) : null;
-//
-//        ReservationBook reservationBook = new ReservationBook((Member) member, book, takeDate, returnDate, isReservedBook);
-//        //TODO: treba da se zemat site izdanija od knigata, da se proveri dali ima slobodna i ako ima, od vkupnoto da se namali za edno
-//
-//        return this.reservationBookRepository.save(reservationBook);
-//    }
-
 }
Index: src/main/java/mk/ukim/finki/db/library/service/impl/RoomServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/impl/RoomServiceImpl.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/impl/RoomServiceImpl.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -1,7 +1,5 @@
 package mk.ukim.finki.db.library.service.impl;
 
-import mk.ukim.finki.db.library.model.Book;
 import mk.ukim.finki.db.library.model.Room;
-import mk.ukim.finki.db.library.model.exception.InvalidArgumentsException;
 import mk.ukim.finki.db.library.model.exception.InvalidRoomIdException;
 import mk.ukim.finki.db.library.repository.RoomRepository;
@@ -31,16 +29,7 @@
 
     @Override
-    public Room create(Long id, String name, int places, int freePlaces) {
-        Room room = new Room(id, name, places, freePlaces);
-        return this.roomRepository.save(room);
-    }
-
-    @Override
-    public List<Room> findByName(String name) {
-        if(name == null || name.isEmpty()){
-            throw new InvalidArgumentsException();
-        }
-
-        return this.roomRepository.findByName(name);
+    public Room create(int room) {
+        Room roomNum = new Room(room);
+        return this.roomRepository.save(roomNum);
     }
 }
Index: src/main/java/mk/ukim/finki/db/library/service/impl/SchoolTypeServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/impl/SchoolTypeServiceImpl.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/impl/SchoolTypeServiceImpl.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -29,6 +29,6 @@
 
     @Override
-    public SchoolType create(Long id, String name) {
-        SchoolType schoolType = new SchoolType(id, name);
+    public SchoolType create(String name) {
+        SchoolType schoolType = new SchoolType(name);
         return this.schoolTypeRepository.save(schoolType);
     }
Index: src/main/java/mk/ukim/finki/db/library/service/impl/UserServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/impl/UserServiceImpl.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/impl/UserServiceImpl.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -2,4 +2,5 @@
 
 import mk.ukim.finki.db.library.model.Person;
+import mk.ukim.finki.db.library.model.exception.InvalidArgumentsException;
 import mk.ukim.finki.db.library.model.exception.InvalidUserCredentialsException;
 import mk.ukim.finki.db.library.model.exception.InvalidUsernameOrPasswordException;
@@ -9,6 +10,5 @@
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-
+import java.util.Date;
 
 @Service
@@ -17,13 +17,13 @@
     private final UserRepository userRepository;
 
-    public UserServiceImpl(MemberRepository userRepository) {
+    public UserServiceImpl(UserRepository userRepository) {
         this.userRepository = userRepository;
     }
 
     @Override
-    public Person register(String name, String surname, String address, String town, String phoneNumber,
-                           String email, String password) { //SchoolType schoolType, MembershipType membershipType,
+    public Person register(String name, String surname, Date birthDate, String address, String town, String phoneNumber,
+                            String email, String password) { //SchoolType schoolType, MembershipType membershipType,
 
-        Person member = new Person(name, surname, address, town, phoneNumber, email, password);
+        Person member = new Person(name, surname, birthDate, address, town, phoneNumber, email, password);
 
         return this.userRepository.save(member);
@@ -37,8 +37,3 @@
         return userRepository.findByEmailAndPassword(email, password).orElseThrow(InvalidUserCredentialsException::new);
     }
-
-    @Override
-    public List<Person> findByEmail(String email) {
-        return this.userRepository.findByEmail(email);
-    }
 }
Index: src/main/java/mk/ukim/finki/db/library/service/impl/WriterServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/service/impl/WriterServiceImpl.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/service/impl/WriterServiceImpl.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -30,6 +30,6 @@
 
     @Override
-    public Writer create(Long id, String name) {
-        Writer writer = new Writer(id, name);
+    public Writer create(String name) {
+        Writer writer = new Writer(name);
         return this.writerRepository.save(writer);
     }
Index: src/main/java/mk/ukim/finki/db/library/web/BookController.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/web/BookController.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/web/BookController.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -1,68 +1,17 @@
 package mk.ukim.finki.db.library.web;
 
-import mk.ukim.finki.db.library.model.Book;
-import mk.ukim.finki.db.library.model.Genre;
-import mk.ukim.finki.db.library.model.Library;
-import mk.ukim.finki.db.library.model.Writer;
 import mk.ukim.finki.db.library.service.BookService;
-import mk.ukim.finki.db.library.service.GenreService;
-import mk.ukim.finki.db.library.service.LibraryService;
-import mk.ukim.finki.db.library.service.WriterService;
 import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.util.List;
 
 @Controller
-@RequestMapping("/book")
+@RequestMapping("/books")
 public class BookController {
 
     private final BookService bookService;
-    private final WriterService writerService;
-    private final GenreService genreService;
-    private final LibraryService libraryService;
 
-    public BookController(BookService bookService, WriterService writerService, GenreService genreService, LibraryService libraryService) {
+    public BookController(BookService bookService) {
         this.bookService = bookService;
-        this.writerService = writerService;
-        this.genreService = genreService;
-        this.libraryService = libraryService;
     }
 
-    //List<Long> genreIds, List<Long> writerIds, Long libraryId
-    //will show all books that are available in a library
-    @GetMapping
-    public String showBooks(@RequestParam(required = false) String bookName,
-                            Model model){
-
-        List<Book> books;
-//        List<Writer> writers;
-        //List<Genre> genres;
-        //List<Library> libraries;
-
-        if(bookName == null){
-            books = this.bookService.listAllBooks();
-//            writers = this.writerService.listAll();
-           // genres = this.genreService.listAll();
-
-        } else {
-            books = this.bookService.findByBookName(bookName);
-//            writers = this.writerService.listAll();
-//            genres = this.genreService.listAll();
-        }
-
-        model.addAttribute("books", books);
-//        model.addAttribute("writers", writers);
-//        model.addAttribute("genres", genres);
-        //model.addAttribute("libraries", libraries);
-
-        return "book.html";
-    }
-
-
-
-
 }
Index: src/main/java/mk/ukim/finki/db/library/web/LoginController.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/web/LoginController.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/web/LoginController.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -35,5 +35,5 @@
                     request.getParameter("password"));
             request.getSession().setAttribute("username", member);
-            return "redirect:/book";
+            return "redirect:/home";
         }
         catch (InvalidUserCredentialsException exception) {
Index: src/main/java/mk/ukim/finki/db/library/web/RegisterController.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/web/RegisterController.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/web/RegisterController.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -35,4 +35,5 @@
     public String register(@RequestParam String name,
                            @RequestParam String surname,
+                           @RequestParam Date birthDate,
                            @RequestParam String town,
                            @RequestParam String address,
@@ -40,7 +41,7 @@
                            @RequestParam String email,
                            @RequestParam String password
-    ) {
+                           ) {
         try{
-            this.userService.register(name, surname, town, address, phoneNumber, email, password);
+            this.userService.register(name, surname, birthDate, town, address, phoneNumber, email, password);
             return "redirect:/login";
         } catch (InvalidArgumentsException | PasswordsDoNotMatchException exception) {
Index: src/main/java/mk/ukim/finki/db/library/web/ReservationBookController.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/web/ReservationBookController.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/java/mk/ukim/finki/db/library/web/ReservationBookController.java	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -1,51 +1,9 @@
 package mk.ukim.finki.db.library.web;
 
-import mk.ukim.finki.db.library.model.exception.InvalidArgumentsException;
-import mk.ukim.finki.db.library.model.exception.PasswordsDoNotMatchException;
-import mk.ukim.finki.db.library.service.ReservationBookService;
 import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Date;
+import org.springframework.web.bind.annotation.RequestMapping;
 
 @Controller
-@RequestMapping("/resBook")
+@RequestMapping("/reservationBook")
 public class ReservationBookController {
-
-    private final ReservationBookService reservationBookService;
-
-    public ReservationBookController(ReservationBookService reservationBookService) {
-        this.reservationBookService = reservationBookService;
-    }
-
-    @GetMapping("/resBook")
-    public String showRes(){
-        return "resBook";
-    }
-
-    @GetMapping
-    public String getReservationBook(@RequestParam(required = false) String error, Model model) {
-        if(error != null && !error.isEmpty()) {
-            model.addAttribute("hasError", true);
-            model.addAttribute("error", error);
-        }
-        //ReservationBook reservationBook = this.reservationBookService.getCurrentUserId(id);
-        model.addAttribute("books", this.reservationBookService.listAll());
-        return "resBook";
-    }
-
-    @PostMapping("/reserve/{id}")
-    public String reserve(@PathVariable Long id,
-                            @RequestParam Date takeDate,
-                           @RequestParam Date returnDate
-    ) {
-        try{
-            this.reservationBookService.reserveBook(id, takeDate, returnDate);
-            return "redirect:/book";
-        } catch (InvalidArgumentsException | PasswordsDoNotMatchException exception) {
-            return "redirect:/resBook?error=" + exception.getMessage();
-        }
-    }
-
 }
Index: c/main/java/mk/ukim/finki/db/library/web/RoomController.java
===================================================================
--- src/main/java/mk/ukim/finki/db/library/web/RoomController.java	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ 	(revision )
@@ -1,45 +1,0 @@
-package mk.ukim.finki.db.library.web;
-
-import mk.ukim.finki.db.library.model.Book;
-import mk.ukim.finki.db.library.model.Room;
-import mk.ukim.finki.db.library.service.LibraryService;
-import mk.ukim.finki.db.library.service.RoomService;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.util.List;
-
-@Controller
-@RequestMapping("/room")
-public class RoomController {
-
-    private final RoomService roomService;
-    private final LibraryService libraryService;
-
-    public RoomController(RoomService roomService, LibraryService libraryService) {
-        this.roomService = roomService;
-        this.libraryService = libraryService;
-    }
-
-    //will show all rooms with info for them
-    @GetMapping
-    public String showBooks(@RequestParam(required = false) String name,
-                            Model model){
-
-        List<Room> rooms;
-
-        if(name == null){
-            rooms = this.roomService.listAll();
-        } else {
-            rooms = this.roomService.findByName(name);
-        }
-
-        model.addAttribute("rooms", rooms);
-        //model.addAttribute("libraries", libraries);
-
-        return "room.html";
-    }
-}
Index: src/main/resources/application-prod.properties
===================================================================
--- src/main/resources/application-prod.properties	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
+++ src/main/resources/application-prod.properties	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -0,0 +1,17 @@
+spring.datasource.url=jdbc:postgresql://localhost:5432/demoDB
+spring.datasource.username=postgres
+spring.datasource.password=jovana123
+
+
+## default connection pool
+spring.datasource.hikari.connectionTimeout=20000
+spring.datasource.hikari.maximumPoolSize=5
+
+spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQL95Dialect
+spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
+
+spring.jpa.hibernate.ddl-auto=update
+## so sekoe aktiviranje na serverot ke se nadograduva bazata, inkrementalno kreiranje
+spring.jpa.show-sql=true
+## sekoe sql prasanje deka ke se pisuva vo konzola
+spring.mvc.format.date-time=yyyy-MM-dd HH:mm:ss
Index: src/main/resources/application.properties
===================================================================
--- src/main/resources/application.properties	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/resources/application.properties	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -1,21 +1,22 @@
-server.port=9090
+server.port=8081
+
+spring.profiles.active=prod
+
+#spring.datasource.hikari.connection-timeout=20000
+#spring.datasource.hikari.maximum-pool-size=5
+
+#spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQL95Dialect
+#spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
+#
+#spring.jpa.hibernate.ddl-auto=update
+#spring.jpa.show-sql=true
+#
+#spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl
+#
+#
+#spring.jpa.open-in-view=false
 
 # Datasource configuration
-spring.datasource.url=jdbc:postgresql://localhost:9999/db_202122z_va_prj_vintagelibrary
-spring.datasource.username=db_202122z_va_prj_vintagelibrary_owner
-spring.datasource.password=45dc6bb3181a
-
-# Default connection pool
-spring.datasource.hikari.connection-timeout=20000
-spring.datasource.hikari.maximum-pool-size=5
-
-spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQL95Dialect
-spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
-
-spring.jpa.hibernate.ddl-auto=update
-spring.jpa.show-sql=true
-
-spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
-spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
-
-spring.jpa.open-in-view=false
+#spring.datasource.url=jdbc:postgresql://localhost:5432/libraryDB
+#spring.datasource.username=vintageLibrary
+#spring.datasource.password=baza123
Index: c/main/resources/templates/book.html
===================================================================
--- src/main/resources/templates/book.html	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ 	(revision )
@@ -1,108 +1,0 @@
-<!DOCTYPE html>
-<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
-<head>
-  <meta charset="UTF-8"/>
-  <title>Books</title>
-  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
-  <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
-  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
-</head>
-<body>
-<!--Header-->
-<nav class="navbar navbar-expand-md navbar-dark bg-dark">
-  <div class="container">
-    <a class="navbar-brand" href="/home">ONLINE  LIBRARY</a>
-    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
-            aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
-      <span class="navbar-toggler-icon"></span>
-    </button>
-
-    <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
-      <ul class="navbar-nav m-auto">
-        <li class="nav-item m-auto">
-          <a class="nav-link active" href="/home">ПОЧЕТНА</a>
-        </li>
-        <li class="nav-item m-auto">
-          <a class="nav-link active" href="/book">КНИГИ</a>
-        </li>
-        <li class="nav-item m-auto">
-          <a class="nav-link active" href="/room">ПРОСТОРИИ</a>
-        </li>
-      </ul>
-
-      <form class="form-inline my-2 my-lg-0">
-        <a class="btn btn-primary btn-sm ml-3" href="/logout">
-          <i class="fa fa-shopping-cart"></i> ОДЈАВИ СЕ
-        </a>
-      </form>
-    </div>
-  </div>
-</nav>
-
-<!--Main-->
-<div class="container">
-  <section class="jumbotron text-center">
-    <h2 class="jumbotron-heading"><b>Достапни книги</b></h2>
-  </section>
-
-  <div th:if="${hasError}">
-    <h5 class="text-center text-danger" th:text="${error}"></h5>
-  </div>
-
-  <div class="container mb-4">
-    <div class="row">
-      <div class="col-12" >
-        <div class="table-responsive">
-          <table class="table table-striped">
-            <thead>
-            <th scope="col">Име на книга</th>
-            <th scope="col">Број на книга</th>
-            <th scope="col">Цена</th>
-            <th scope="col">Цена со задоцнување</th>
-            <!-- <th scope="col">Автор</th>  -->
-           <!-- <th scope="col">Жанр</th> -->
-            <th scope="col"></th>
-            <th scope="col"></th>
-            </thead>
-            <tbody>
-            <tr th:each="book : ${books}" class="book">
-              <td th:text="${book.getBookName()}"></td>
-              <td th:text="${book.getBookNumber()}"></td>
-              <td th:text="${book.getBookPrice()}"></td>
-              <td th:text="${book.getBookPriceLate()}"></td>
-              <!-- <td th:each="writer : ${writers}" th:if="${book.getWriters().contains(writer)}" th:text="${writer.getWriterName()}"></td>  -->
-              <!-- <td th:each="genre : ${genres}" th:if="${book.getGenre().contains(genre)}" th:text="${genre.getGenreName()}"></td> -->
-              <td><a class="btn btn-primary btn-sm ml-3" href="/resBook">Резервација</a>
-                <a class="btn btn-primary btn-sm ml-3" href="/online">Симнување</a></td>
-            </tr>
-            </tbody>
-
-          </table>
-        </div>
-      </div>
-    </div>
-  </div>
-
-</div>
-
-
-
-<!-- Footer -->
-<footer class="text-black-50 mt-xl-5">
-  <div class="container">
-    <div class="row">
-      <div class="col-md-3 col-lg-1 col-xl-5">
-        <h5>Contact</h5>
-        <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
-        <ul class="list-unstyled">
-          <li><i class="fa fa-envelope mr-2"></i>onlinelibrary@library.com</li>
-          <li><i class="fa fa-phone mr-2"></i> + 33 12 14 15 16</li>
-          <li><i class="fa fa-print mr-2"></i> + 33 12 14 15 16</li>
-        </ul>
-      </div>
-    </div>
-  </div>
-</footer>
-</body>
-</html>
Index: src/main/resources/templates/guide.html
===================================================================
--- src/main/resources/templates/guide.html	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/resources/templates/guide.html	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -30,5 +30,5 @@
                 </li>
                 <li class="nav-item m-auto">
-                    <a class="nav-link active" href="/book">ЛИСТА НА КНИГИ</a>
+                    <a class="nav-link active" href="/listBooks">ЛИСТА НА КНИГИ</a>
                 </li>
             </ul>
Index: src/main/resources/templates/home.html
===================================================================
--- src/main/resources/templates/home.html	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/resources/templates/home.html	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -28,4 +28,7 @@
                 <li class="nav-item m-auto">
                     <a class="nav-link active" href="/guide">УПАТСТВО</a>
+                </li>
+                <li class="nav-item m-auto">
+                    <a class="nav-link active" href="/listBooks">ЛИСТА НА КНИГИ</a>
                 </li>
             </ul>
Index: src/main/resources/templates/info.html
===================================================================
--- src/main/resources/templates/info.html	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/resources/templates/info.html	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -28,4 +28,7 @@
         <li class="nav-item m-auto">
           <a class="nav-link active" href="/guide">УПАТСТВО</a>
+        </li>
+        <li class="nav-item m-auto">
+          <a class="nav-link active" href="/listBooks">ЛИСТА НА КНИГИ</a>
         </li>
       </ul>
Index: src/main/resources/templates/library.html
===================================================================
--- src/main/resources/templates/library.html	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/resources/templates/library.html	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -24,8 +24,11 @@
         </li>
         <li class="nav-item m-auto">
-          <a class="nav-link active" href="/info">ИНФОРМАЦИИ</a>
+          <a class="nav-link active" href="info.html">ИНФОРМАЦИИ</a>
         </li>
         <li class="nav-item m-auto">
-          <a class="nav-link active" href="/guide">УПАТСТВО</a>
+          <a class="nav-link active" href="guide.html">УПАТСТВО</a>
+        </li>
+        <li class="nav-item m-auto">
+          <a class="nav-link active" href="/listBooks">ЛИСТА НА КНИГИ</a>
         </li>
       </ul>
Index: src/main/resources/templates/listBooks.html
===================================================================
--- src/main/resources/templates/listBooks.html	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
+++ src/main/resources/templates/listBooks.html	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="UTF-8">
+    <title>Books in Library</title>
+</head>
+<body>
+<nav class="navbar navbar-expand-md navbar-dark bg-dark">
+    <div class="container">
+        <a class="navbar-brand" href="/home">ONLINE  LIBRARY</a>
+        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
+                aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
+            <span class="navbar-toggler-icon"></span>
+        </button>
+
+        <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
+            <ul class="navbar-nav m-auto">
+                <li class="nav-item m-auto">
+                    <a class="nav-link active" href="/home">ПОЧЕТНА</a>
+                </li>
+                <li class="nav-item m-auto">
+                    <a class="nav-link active" href="/info">ИНФОРМАЦИИ</a>
+                </li>
+                <li class="nav-item m-auto">
+                    <a class="nav-link active" href="/guide">УПАТСТВО</a>
+                </li>
+                <li class="nav-item m-auto">
+                    <a class="nav-link active" href="/listBooks">ЛИСТА НА КНИГИ</a>
+                </li>
+            </ul>
+        </div>
+    </div>
+</nav>
+<div class="container">
+<form class="form-signin mt-xl-5" method="post" action="/listBooks">
+    <h2 class="form-signin-heading">Листа на книги</h2>
+    <p>
+        <label for="name" class="sr-only">Име на книга:</label>
+        <input type="text" id="name" name="bookName" class="form-control" placeholder="BookName" required="" autofocus="">
+    </p>
+    <p>
+        <label for="price" class="sr-only">Цена на книгата:</label>
+        <input type="number" id="price" name="bookPrice" class="form-control" placeholder="bookPrice" required="" autofocus="">
+    </p>
+    <p>
+        <label for="bookGenre" class="sr-only">Жанр на книга:</label>
+        <input type="text" id="bookGenre" name="bookGenre" class="form-control" placeholder="BookGenre" required="" autofocus="">
+    </p>
+    <p>
+        <label for="bookLibrary" class="sr-only">Библиотека во која се наоѓа книгата:</label>
+        <input type="text" id="bookLibrary" name="bookLibrary" class="form-control" placeholder="bookLibrary" required="" autofocus="">
+    </p>
+
+    <div th:if="${hasError}">
+        <div th:text="${error}" class="text-danger"></div>
+    </div>
+
+<div>
+    <table>
+        <tr>
+            <th>Book Name</th>
+            <th>Price</th>
+            <th>Price Late</th>
+            <th>Genre</th>
+            <th>Library</th>
+
+        </tr>
+        <!-- For each news you should have one <tr> like below -->
+        <tr class="item" th:each="book:${bookList}">
+            <td th:text="${book.bookName}">[book.bookName]</td>
+            <td th:text="${book.bookPrice}">[book.bookPrice]</td>
+            <td th:text="${book.bookPriceLate}">[book.bookPriceLate]</td>
+            <td th:text="${book.getGenreOfBook()}">[book.genreOfBook]</td>
+            <td th:text="${book.getLibraryOfBook()}">[book.libraryOfBook]</td>\
+
+        </tr>
+
+        <button class="btn btn-lg btn-primary btn-block" type="submit">Листа на книги</button>
+    </table>
+
+</div>
+
+</form>
+<footer class="text-black-50 mt-xl-5">
+    <div class="container">
+        <div class="row">
+            <div class="col-md-3 col-lg-1 col-xl-5">
+                <h5>Contact</h5>
+                <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
+                <ul class="list-unstyled">
+                    <li><i class="fa fa-envelope mr-2"></i>onlinelibrary@library.com</li>
+                    <li><i class="fa fa-phone mr-2"></i> + 33 12 14 15 16</li>
+                    <li><i class="fa fa-print mr-2"></i> + 33 12 14 15 16</li>
+                </ul>
+            </div>
+        </div>
+    </div>
+</footer>
+
+</body>
+</html>
Index: src/main/resources/templates/login.html
===================================================================
--- src/main/resources/templates/login.html	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/resources/templates/login.html	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -30,4 +30,7 @@
                 <li class="nav-item m-auto">
                     <a class="nav-link active" href="/guide">УПАТСТВО</a>
+                <li class="nav-item m-auto">
+                    <a class="nav-link active" href="/listBooks">ЛИСТА НА КНИГИ</a>
+                </li>
                 </li>
             </ul>
@@ -36,8 +39,7 @@
 </nav>
 
-<section class="jumbotron text-center">
 <div class="container">
     <form class="form-signin mt-xl-5" method="post" action="/login">
-        <h2 class="form-signin-heading"><b>Најава</b></h2>
+        <h2 class="form-signin-heading">Најава</h2>
         <p>
             <label for="username" class="sr-only">Корисничко име:</label>
@@ -54,8 +56,6 @@
         <button class="btn btn-lg btn-primary btn-block" type="submit">Најави се</button>
     </form>
-    <br>
     <a href="/register" class="btn btn-block btn-light">Регистрирај се тука</a>
 </div>
-</section>
 
 <!-- Footer -->
Index: src/main/resources/templates/onlinePayment.html
===================================================================
--- src/main/resources/templates/onlinePayment.html	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
+++ src/main/resources/templates/onlinePayment.html	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>Online Payment</title>
+</head>
+<body>
+<!--Header!!-->
+<nav class="navbar navbar-expand-md navbar-dark bg-dark">
+  <div class="container">
+    <a class="navbar-brand" href="/home">ONLINE  LIBRARY</a>
+    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
+            aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
+      <span class="navbar-toggler-icon"></span>
+    </button>
+
+    <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
+      <ul class="navbar-nav m-auto">
+        <li class="nav-item m-auto">
+          <a class="nav-link active" href="/home">ПОЧЕТНА</a>
+        </li>
+        <li class="nav-item m-auto">
+          <a class="nav-link active" href="info.html">ИНФОРМАЦИИ</a>
+        </li>
+        <li class="nav-item m-auto">
+          <a class="nav-link active" href="guide.html">УПАТСТВО</a>
+        </li>
+        <li class="nav-item m-auto">
+          <a class="nav-link active" href="listBooks.html">ЛИСТА НА КНИГИ</a>
+        </li>
+      </ul>
+    </div>
+  </div>
+</nav>
+
+<section class="jumbotron text-center">
+  <div class="container">
+    <form class="form-signin mt-xl-2 col-md-6" method="post" action="/paymentOnline">
+      <h2 class="form-signin-heading">Онлајн плаќање</h2>
+      <br>
+      <p>
+        <label for="name" class="sr-only">Име и презиме:</label>
+        <input type="text" id="name" name="name" class="form-control" placeholder="Name" required="" autofocus="">
+      </p>
+      <p>
+        <label for="surname" class="sr-only">Број на картичка:</label>
+        <input type="text" id="surname" name="surname" class="form-control" placeholder="Surname" required="" autofocus="">
+      </p>
+      <p>
+        <label for="birth" class="sr-only">Рок на важност:</label>
+        <input type="date" id="birth" name="birth" class="form-control" placeholder="Birth" required="" autofocus="">
+      </p>
+      <p>
+        <label for="cvc" class="sr-only">CVV2/CVC2:</label>
+        <input type="text" id="cvc" name="cvc" class="form-control" placeholder="Cvc" required="" autofocus="">
+      </p>
+      <p>
+        <label for="address" class="sr-only">Износ:</label>
+        <input type="text" id="address" name="address" class="form-control" placeholder="Address" required="" autofocus="">
+      </p>
+
+      <button class="btn btn-lg btn-primary btn-block" type="submit">Потврди</button>
+      <button class="btn btn-lg btn-primary btn-block" type="submit">Откажи</button>
+      <br>
+    </form>
+  </div>
+</section>
+
+<!-- Footer -->
+<footer class="text-black-50 mt-xl-5">
+  <div class="container">
+    <div class="row">
+      <div class="col-md-3 col-lg-1 col-xl-5">
+        <h5>Contact</h5>
+        <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
+        <ul class="list-unstyled">
+          <li><i class="fa fa-envelope mr-2"></i>onlinelibrary@library.com</li>
+          <li><i class="fa fa-phone mr-2"></i> + 33 12 14 15 16</li>
+          <li><i class="fa fa-print mr-2"></i> + 33 12 14 15 16</li>
+        </ul>
+      </div>
+    </div>
+  </div>
+</footer>
+
+</body>
+</html>
Index: src/main/resources/templates/register.html
===================================================================
--- src/main/resources/templates/register.html	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ src/main/resources/templates/register.html	(revision e3bb1d4fa77ce5f90ff0044877a3a21e268c1216)
@@ -13,5 +13,5 @@
 <nav class="navbar navbar-expand-md navbar-dark bg-dark">
     <div class="container">
-        <a class="navbar-brand" href="/home">VINTAGE LIBRARY</a>
+        <a class="navbar-brand" href="/home">ONLINE  LIBRARY</a>
         <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
                 aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
@@ -30,4 +30,7 @@
                     <a class="nav-link active" href="/guide">УПАТСТВО</a>
                 </li>
+                <li class="nav-item m-auto">
+                    <a class="nav-link active" href="/listBooks">ЛИСТА НА КНИГИ</a>
+                </li>
             </ul>
         </div>
@@ -41,58 +44,61 @@
     </div>
 
-    <div class="container">
+<div class="container">
 
-        <form class="form-signin mt-xl-5" method="post" action="/register">
-            <h2 class="form-signin-heading"><b>Регистрација</b></h2>
-            <br>
-            <p>
-                <label for="name" class="sr-only">Име</label>
-                <input type="text" id="name" name="name" class="form-control" placeholder="Name" required="" autofocus="">
-            </p>
-            <p>
-                <label for="surname" class="sr-only">Презиме</label>
-                <input type="text" id="surname" name="surname" class="form-control" placeholder="Surname" required="" autofocus="">
-            </p>
-            <!-- <p>
-                <label for="birthDate" class="sr-only">Датум на раѓање</label>
-                <input type="date" id="birthDate" name="birthDate" class="form-control" placeholder="Birth" required="" autofocus="">
-            </p> -->
-            <p>
-                <label for="town" class="sr-only">Град</label>
-                <input type="text" id="town" name="town" class="form-control" placeholder="Town" required="" autofocus="">
-            </p>
-            <p>
-                <label for="address" class="sr-only">Адреса</label>
-                <input type="text" id="address" name="address" class="form-control" placeholder="Address" required="" autofocus="">
-            </p>
-            <p>
-                <label for="phoneNumber" class="sr-only">Телефонски број</label>
-                <input type="text" id="phoneNumber" name="phoneNumber" class="form-control" placeholder="Phonenumber" required="" autofocus="">
-            </p>
-            <!-- <p>
-                 <label for="schoolType" class="sr-only">Тип на школо</label>
-                 <input type="text" id="schoolType" name="schoolType" class="form-control" placeholder="SchoolType" required="" autofocus="">
-             </p>
-             <p>
-                 <label for="membershipType" class="sr-only">Тип на чланарина</label>
-                 <input type="text" id="membershipType" name="membershipType" class="form-control" placeholder="MembershipType" required="" autofocus="">
-             </p> -->
-            <p>
-                <label for="email" class="sr-only">Корисничко име</label>
-                <input type="text" id="email" name="email" class="form-control" placeholder="Username" required="" autofocus="">
-            </p>
-            <p>
-                <label for="password" class="sr-only">Лозинка</label>
-                <input type="password" id="password" name="password" class="form-control" placeholder="Password" required="">
-            </p>
+    <form class="form-signin mt-xl-2 col-md-8" method="post" action="/register">
+        <h2 class="form-signin-heading">Регистрација</h2>
+        <br>
+        <p>
+            <label for="name" class="sr-only">Име</label>
+            <input type="text" id="name" name="name" class="form-control" placeholder="Name" required="" autofocus="">
+        </p>
+        <p>
+            <label for="surname" class="sr-only">Презиме</label>
+            <input type="text" id="surname" name="surname" class="form-control" placeholder="Surname" required="" autofocus="">
+        </p>
+        <p>
+            <label for="birth" class="sr-only">Датум на раѓање</label>
+            <input type="date" id="birth" name="birth" class="form-control" placeholder="Birth" required="" autofocus="">
+        </p>
+        <p>
+            <label for="town" class="sr-only">Град</label>
+            <input type="text" id="town" name="town" class="form-control" placeholder="Town" required="" autofocus="">
+        </p>
+        <p>
+            <label for="address" class="sr-only">Адреса</label>
+            <input type="text" id="address" name="address" class="form-control" placeholder="Address" required="" autofocus="">
+        </p>
+        <p>
+            <label for="phonenumber" class="sr-only">Телефонски број</label>
+            <input type="text" id="phonenumber" name="phonenumber" class="form-control" placeholder="Phonenumber" required="" autofocus="">
+        </p>
+        <p>
+            <label for="schoolType" class="sr-only">Тип на школо</label>
+            <input type="text" id="schoolType" name="schoolType" class="form-control" placeholder="SchoolType" required="" autofocus="">
+        </p>
+        <p>
+            <label for="membershipType" class="sr-only">Тип на чланарина</label>
+            <input type="text" id="membershipType" name="membershipType" class="form-control" placeholder="MembershipType" required="" autofocus="">
+        </p>
+        <p>
+            <label for="email" class="sr-only">Корисничко име</label>
+            <input type="text" id="email" name="email" class="form-control" placeholder="Username" required="" autofocus="">
+        </p>
+        <p>
+            <label for="password" class="sr-only">Лозинка</label>
+            <input type="password" id="password" name="password" class="form-control" placeholder="Password" required="">
+        </p>
+        <p>
+            <label for="paymentMethod" class="sr-only">Изберете начин на плаќање</label>
+            <input type="radio" id="paymentMethod" name="paymentMethod" class="form-control" placeholder="IsPayedBook" required="">
+        </p>
 
+        <button class="btn btn-lg btn-primary btn-block" type="submit">Регистрирај се</button>
+        <br>
+        <a href="/login" class="btn btn-block btn-light">Веќе имате профил? Најавете се тука!!</a>
+    </form>
 
-            <button class="btn btn-lg btn-primary btn-block" type="submit">Регистрирај се</button>
-            <br>
-            <a href="/login" class="btn btn-block btn-light">Веќе имате профил? Најавете се тука!!</a>
-        </form>
-
-    </div>
-
+</div>
+</section>
 
 <!-- Footer -->
@@ -104,5 +110,5 @@
                 <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
                 <ul class="list-unstyled">
-                    <li><i class="fa fa-envelope mr-2"></i>vintagelibrary@library.com</li>
+                    <li><i class="fa fa-envelope mr-2"></i>onlinelibrary@library.com</li>
                     <li><i class="fa fa-phone mr-2"></i> + 33 12 14 15 16</li>
                     <li><i class="fa fa-print mr-2"></i> + 33 12 14 15 16</li>
Index: c/main/resources/templates/resBook.html
===================================================================
--- src/main/resources/templates/resBook.html	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ 	(revision )
@@ -1,103 +1,0 @@
-<!DOCTYPE html>
-<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
-<head>
-  <meta charset="UTF-8"/>
-  <title>Reservation</title>
-  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
-  <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
-  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
-</head>
-<body>
-<!--Header-->
-<nav class="navbar navbar-expand-md navbar-dark bg-dark">
-  <div class="container">
-    <a class="navbar-brand" href="/home">ONLINE  LIBRARY</a>
-    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
-            aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
-      <span class="navbar-toggler-icon"></span>
-    </button>
-
-    <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
-      <ul class="navbar-nav m-auto">
-        <li class="nav-item m-auto">
-          <a class="nav-link active" href="/home">ПОЧЕТНА</a>
-        </li>
-        <li class="nav-item m-auto">
-          <a class="nav-link active" href="/book">КНИГИ</a>
-        </li>
-        <li class="nav-item m-auto">
-          <a class="nav-link active" href="/room">ПРОСТОРИИ</a>
-        </li>
-      </ul>
-
-      <form class="form-inline my-2 my-lg-0">
-        <a class="btn btn-primary btn-sm ml-3" href="/logout">
-          <i class="fa fa-shopping-cart"></i> ОДЈАВИ СЕ
-        </a>
-      </form>
-    </div>
-  </div>
-</nav>
-
-<!--Main-->
-<section class="jumbotron text-center">
-
-
-  <div th:if="${hasError}">
-    <h5 class="text-center text-danger" th:text="${error}"></h5>
-  </div>
-
-  <div class="container">
-    <form class="form-signin mt-xl-5" method="post" action="/resBook">
-
-      <h2 class="jumbotron-heading"><b>Резервација на книга</b></h2>
-
-      <div class="container mb-4">
-        <div class="row">
-          <p>
-            <label for="bookName" class="sr-only" th:text="${book.getId()}"></label>
-            <input type="text" id="bookName" name="bookName" class="form-control" th:placeholder="${book.getBookName()}" required="" disabled >
-          </p>
-        </div>
-      </div>
-
-      <div class="container mb-4">
-        <div class="row">
-          <p>Датум земање книга
-            <label for="takeDate" class="sr-only">Датум земање книга</label>
-            <input type="date" id="takeDate" name="takeDate" class="form-control" placeholder="Take Date" required="" autofocus="">
-          </p>
-          <br>
-          <p>Датум враќање книга
-            <label for="returnDate" class="sr-only">Датум враќање книга</label>
-            <input type="date" id="returnDate" name="returnDate" class="form-control" placeholder="Return Date" required="" autofocus="">
-          </p>
-        </div>
-      </div>
-    </form>
-    <button class="btn btn-lg btn-primary btn-block" type="submit">ПОТВРДИ РЕЗЕРВАЦИЈА</button>
-    <br>
-    <a href="/book" class="btn btn-block btn-light">ОТКАЖИ РЕЗЕРВАЦИЈА</a>
-  </div>
-
-</section>
-
-<!-- Footer -->
-<footer class="text-black-50 mt-xl-5">
-  <div class="container">
-    <div class="row">
-      <div class="col-md-3 col-lg-1 col-xl-5">
-        <h5>Contact</h5>
-        <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
-        <ul class="list-unstyled">
-          <li><i class="fa fa-envelope mr-2"></i>onlinelibrary@library.com</li>
-          <li><i class="fa fa-phone mr-2"></i> + 33 12 14 15 16</li>
-          <li><i class="fa fa-print mr-2"></i> + 33 12 14 15 16</li>
-        </ul>
-      </div>
-    </div>
-  </div>
-</footer>
-</body>
-</html>
Index: c/main/resources/templates/room.html
===================================================================
--- src/main/resources/templates/room.html	(revision 6791e8943b1679187be4017d2a0a7a9356c9b6a4)
+++ 	(revision )
@@ -1,99 +1,0 @@
-<!DOCTYPE html>
-<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
-<head>
-  <meta charset="UTF-8"/>
-  <title>Room</title>
-  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
-  <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
-  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
-  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
-</head>
-<body>
-<!--Header-->
-<nav class="navbar navbar-expand-md navbar-dark bg-dark">
-  <div class="container">
-    <a class="navbar-brand" href="/home">ONLINE  LIBRARY</a>
-    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
-            aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
-      <span class="navbar-toggler-icon"></span>
-    </button>
-
-    <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
-      <ul class="navbar-nav m-auto">
-        <li class="nav-item m-auto">
-          <a class="nav-link active" href="/home">ПОЧЕТНА</a>
-        </li>
-        <li class="nav-item m-auto">
-          <a class="nav-link active" href="/book">КНИГИ</a>
-        </li>
-        <li class="nav-item m-auto">
-          <a class="nav-link active" href="/room">ПРОСТОРИИ</a>
-        </li>
-      </ul>
-
-      <form class="form-inline my-2 my-lg-0">
-        <a class="btn btn-primary btn-sm ml-3" href="/logout">
-          <i class="fa fa-shopping-cart"></i> ОДЈАВИ СЕ
-        </a>
-      </form>
-    </div>
-  </div>
-</nav>
-
-<!--Main-->
-<div class="container">
-  <section class="jumbotron text-center">
-    <h2 class="jumbotron-heading"><b>Простории за учење</b></h2>
-  </section>
-
-  <div th:if="${hasError}">
-    <h5 class="text-center text-danger" th:text="${error}"></h5>
-  </div>
-
-  <div class="container mb-4">
-    <div class="row">
-      <div class="col-12" >
-        <div class="table-responsive">
-          <table class="table table-striped">
-            <thead>
-            <th scope="col">Име на просторија</th>
-            <th scope="col">Капацитет</th>
-            <th scope="col">Слободни места</th>
-            <th scope="col"></th>
-            </thead>
-            <tbody>
-            <tr th:each="room : ${rooms}" class="room">
-              <td th:text="${room.getName()}"></td>
-              <td th:text="${room.getPlaces()}"></td>
-              <td th:text="${room.getFreePlaces()}"></td>
-              <td><a class="btn btn-primary btn-sm ml-3" href="/resPlace">Резервација</a>
-                </td>
-            </tr>
-            </tbody>
-
-          </table>
-        </div>
-      </div>
-    </div>
-  </div>
-
-</div>
-
-<!-- Footer -->
-<footer class="text-black-50 mt-xl-5">
-  <div class="container">
-    <div class="row">
-      <div class="col-md-3 col-lg-1 col-xl-5">
-        <h5>Contact</h5>
-        <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
-        <ul class="list-unstyled">
-          <li><i class="fa fa-envelope mr-2"></i>onlinelibrary@library.com</li>
-          <li><i class="fa fa-phone mr-2"></i> + 33 12 14 15 16</li>
-          <li><i class="fa fa-print mr-2"></i> + 33 12 14 15 16</li>
-        </ul>
-      </div>
-    </div>
-  </div>
-</footer>
-</body>
-</html>
