-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfile.jdl
64 lines (63 loc) · 1.54 KB
/
file.jdl
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
//Starting define the entities
entity BabyProfile {
name String required
picture ImageBlob
birthday ZonedDateTime required
sign String
main Boolean
userId String required
}
entity Weight {
value Double required
date ZonedDateTime required
}
entity Height {
value Double required
date ZonedDateTime required
}
entity Humor {
value Integer required /** 1 to 5 ANGRY, SAD, CALM, HAPPY, EXCITED*/
description String required
emotico ImageBlob
}
entity HumorHistory {
// humor Humor - this field will be created though relationship
date ZonedDateTime
}
//enum Humor {
// ANGRY, SAD, CALM, HAPPY, EXCITED
//}
entity Nap {
start ZonedDateTime
end ZonedDateTime
// humor Humor - this field will be created though relationship
place Place
}
enum Place {
LAP, BABY_CRIB, CART, BABY_CONFORT
}
entity BreastFeed {
start ZonedDateTime
end ZonedDateTime
pain Pain
}
enum Pain {
NO_PAIN, DISCOMFORTING, DISTRESSING, INTENSE, UTTERLY_HORRIBLE, UNIMAGINABLE
}
//Define the relationships
relationship ManyToOne {
Weight{BabyProfile(name)} to BabyProfile
Height{BabyProfile(name)} to BabyProfile
HumorHistory{BabyProfile(name)} to BabyProfile
Nap{BabyProfile(name)} to BabyProfile
BreastFeed{BabyProfile(name)} to BabyProfile
HumorHistory{Humor(description)} to Humor
Nap{Humor(description)} to Humor
}
//Pagination
paginate Weight, Height, Humor, HumorHistory, Nap, BreastFeed with infinite-scroll
paginate BabyProfile with pagination
// Use Data Transfer Objects (DTO)
dto * with mapstruct
// Service layer
service all with serviceClass