-
-
Notifications
You must be signed in to change notification settings - Fork 212
/
library.jh
64 lines (53 loc) · 1.48 KB
/
library.jh
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
application {
config {
baseName library,
applicationType monolith,
authenticationType jwt
packageName com.sgaraba.library,
prodDatabaseType postgresql,
cacheProvider hazelcast,
buildTool maven,
clientFramework angular,
testFrameworks [cypress],
nativeLanguage en,
languages [en, ro, ru]
}
entities *
}
DEFAULT_MIN_LENGTH = 4
DEFAULT_MAX_LENGTH = 50
entity Publisher {
name String required unique maxlength(100)
}
entity Author {
firstName String required maxlength(DEFAULT_MAX_LENGTH)
lastName String required maxlength(DEFAULT_MAX_LENGTH)
}
entity Client {
firstName String required maxlength(DEFAULT_MAX_LENGTH)
lastName String required maxlength(DEFAULT_MAX_LENGTH)
email String unique maxlength(DEFAULT_MAX_LENGTH)
address String maxlength(DEFAULT_MAX_LENGTH)
phone String maxlength(20)
}
entity Book{
isbn String required unique minlength(5) maxlength(13)
name String required maxlength(100)
publishYear String required minlength(DEFAULT_MIN_LENGTH) maxlength(DEFAULT_MAX_LENGTH)
copies Integer required
cover ImageBlob
}
entity BorrowedBook{
borrowDate LocalDate
}
relationship OneToOne {
Book{publisher(name)} to Publisher
BorrowedBook{book(name)} to Book
BorrowedBook{Client(email)} to Client
}
relationship ManyToMany {
Book{author(firstName)} to Author{book}
}
filter Book, Client, Author, BorrowedBook, Publisher
paginate Book, Client, Author, BorrowedBook, Publisher with pagination
service all with serviceImpl