forked from jhipster/jdl-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
21-points.jh
64 lines (56 loc) · 1.38 KB
/
21-points.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
/*
* This is the application and entity model for the 21-Points (https://github.com/mraible/21-points) application from Matt Raible
*/
application {
config {
applicationType monolith,
baseName HealthPoints
packageName com.okta.developer,
authenticationType oauth2,
prodDatabaseType postgresql,
buildTool gradle,
searchEngine elasticsearch,
testFrameworks [protractor],
clientFramework react,
useSass true,
enableTranslation true,
nativeLanguage en,
languages [en, es]
}
entities Points, BloodPressure, Weight, Preferences
}
// JDL definition for application 'TwentyOnePoints' generated with command 'jhipster export-jdl'
entity BloodPressure {
timestamp ZonedDateTime required
systolic Integer required
diastolic Integer required
}
entity Weight {
timestamp ZonedDateTime required
weight Double required
}
entity Points {
date LocalDate required
exercise Integer
meals Integer
alcohol Integer
notes String maxlength(140)
}
entity Preferences {
weeklyGoal Integer required min(10) max(21)
weightUnits Units required
}
enum Units {
KG,
LB
}
relationship OneToOne {
Preferences{user(login)} to User
}
relationship ManyToOne {
BloodPressure{user(login)} to User
Weight{user(login)} to User
Points{user(login)} to User
}
paginate BloodPressure, Weight with infinite-scroll
paginate Points with pagination