File size: 943 Bytes
22df730
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
export enum Genre {
  Fiction = 'Fiction',
  NonFiction = 'Non-Fiction',
  Mystery = 'Mystery',
  SciFi = 'Sci-Fi',
  Fantasy = 'Fantasy',
  Biography = 'Biography',
  History = 'History',
  Romance = 'Romance',
  Thriller = 'Thriller',
  Horror = 'Horror',
  Poetry = 'Poetry',
  Drama = 'Drama',
  Comics = 'Comics',
  Other = 'Other',
}

export enum BookStatus {
  AVAILABLE = 'Available',
  BORROWED = 'Borrowed',
}

export interface Book {
  id: string;
  title: string;
  author: string;
  pages: number;
  year: number;
  genre: Genre;
  status: BookStatus;
}

export interface CreateBookRequest {
  title: string;
  author: string;
  pages: number;
  year: number;
  genre: Genre;
}

export interface BorrowBookRequest {
  bookIds: string[];
  visitorId: string;
  employeeId: string;
  borrowDate: string;
}

export interface ReturnBookRequest {
  bookIds: string[];
  visitorId: string;
  employeeId: string;
  returnDate: string;
}