forked from aniqa-byte/Group-X
-
Notifications
You must be signed in to change notification settings - Fork 0
/
library.js
122 lines (106 loc) · 2.53 KB
/
library.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
"use strict";
// Class constructor denoting user details
exports.User = class {
// User ID
id;
// User email
email;
constructor(id, email) {
this.id = id;
this.email = email;
}
}
// Class constructor denoting access type
exports.User_access = class {
// access level - default non-admin
access = 0;
// password
password;
constructor(access, password) {
this.access = access;
this.password = password;
}
}
// Class constructor denoting user credentials
exports.Credential = class {
// user id
id;
// password
password;
constructor(id, password) {
this.id = id;
this.password = password;
}
}
// Class constructor denoting login requirements
exports.Login = class {
// user email
email;
// password
password;
constructor(email, password) {
this.email = email;
this.password = password;
}
}
// Class constructor denoting primary book features
exports.Book = class {
// Item title
title;
// Item author
author;
// Item category
genre;
constructor(title, author, genre) {
this.title = title;
this.author = author;
this.genre = genre;
}
}
// Class contructor denoting secondary book features
exports.Book_details = class {
// Item URL link
item_link;
// Item description
item_description;
// Book item title
title;
constructor(item_link, item_description, title) {
this.item_link = item_link;
this.item_description = item_description;
this.title = title;
}
}
// Class constructor denoting genre type and descriptor
exports.Book_genre = class {
// Genre category
genre;
// Genre category description
genre_description;
constructor(genre, genre_description) {
this.genre = genre;
this.genre_description = genre_description;
}
}
// Class constructor denoting complete book detailing
exports.Book_complete = class {
// Book title
title;
// Book author
author;
// Book genre
genre;
// Book link
item_link;
// Book description
item_description;
constructor(title, author, genre, item_link, item_description) {
this.title = title;
this.author = author;
// parameter input or standard replacement
this.genre = genre || "Empty Genre";
this.item_link = item_link;
// parameter input or standard replacement
this.item_description = item_description || "Empty Description";
}
}