-
Notifications
You must be signed in to change notification settings - Fork 1
/
jhipster.jh
127 lines (103 loc) · 2.56 KB
/
jhipster.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
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
123
124
125
126
127
application {
config {
baseName compositekey
applicationType monolith
prodDatabaseType postgresql
buildTool gradle
testFrameworks [cypress]
}
entities *
}
entity Employee{
@id username String required
fullname String required
}
relationship OneToMany{
Employee{teamMember(fullname)} to Employee{manager(fullname)}
}
entity EmployeeSkill{
// compositeId employeeSkill.name, employee.id
@id name String required
level Integer required
}
relationship OneToMany{
@id Employee{skill(name)} to EmployeeSkill{employee(fullname) required}
}
entity CertificateType{
name String required
}
entity EmployeeSkillCertificate{
// compositeId EmployeeSkill.employee.id, EmployeeSkill.name, CertficiateType.id
grade Integer required
date LocalDate required
}
relationship OneToMany{
@id CertificateType to EmployeeSkillCertificate{type(name) required}
}
relationship OneToMany{
@id EmployeeSkill to EmployeeSkillCertificate{skill(name) required}
}
entity EmployeeSkillCertificateDetails(escd) {
detail String required
}
relationship OneToOne{
EmployeeSkillCertificateDetails to @id EmployeeSkillCertificate
}
entity Task {
name String required
type TaskType required
endDate LocalDate
createdAt ZonedDateTime required
modifiedAt Instant required
done Boolean required
description TextBlob required
attachment Blob required
picture ImageBlob required
}
enum TaskType {
TYPE1, TYPE2, TYPE3
}
entity TaskComment {
// detect autoIncrement
@id id Long
value String required
}
//relationship with name and without id to make sure we do not brake those
relationship ManyToOne {
TaskComment{task(name) required} to Task
}
//ManyToMany with complex ids
relationship ManyToMany {
EmployeeSkill{task(name)} to Task{employeeSkill}
}
//double OneToMany to check double imports, variables names...
relationship OneToMany {
Employee{taughtSkill(name)} to EmployeeSkill{teacher(fullname) required}
}
relationship ManyToOne {
Task{user(login) required} to User
}
entity WithIdString {
@id id String
name String
}
entity WithIdStringDetails {
details String
}
relationship OneToOne {
WithIdStringDetails to WithIdString with jpaDerivedIdentifier
}
entity WithUUID {
@id uuid UUID
name String required
}
entity WithUUIDDetails {
details String
}
relationship OneToOne {
WithUUIDDetails to WithUUID with jpaDerivedIdentifier
}
dto * with mapstruct
service * with serviceImpl
filter *
paginate TaskComment, Employee, EmployeeSkill, EmployeeSkillCertificate, Task with pagination