forked from RatJuggler/jhipster-jdl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjhipster-pet-clinic.jdl
60 lines (48 loc) · 1.28 KB
/
jhipster-pet-clinic.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
DEFAULT_MIN_LENGTH = 1
DEFAULT_MAX_LENGTH = 32
DEFAULT_MIN_BYTES = 20
DEFAULT_MAX_BYTES = 40
DEFAULT_MIN = 0
DEFAULT_MAX = 999
entity Vets {
firstname String required maxlength(DEFAULT_MAX_LENGTH)
lastname String required maxlength(DEFAULT_MAX_LENGTH)
}
entity Specialties {
name String required maxlength(DEFAULT_MAX_LENGTH)
}
entity Types {
name String required maxlength(80)
}
entity Owners {
firstname String required maxlength(DEFAULT_MAX_LENGTH)
lastname String required maxlength(DEFAULT_MAX_LENGTH)
address String required maxlength(255)
city String maxlength(DEFAULT_MAX_LENGTH)
telephone String required maxlength(20)
}
entity Pets {
name String required maxlength(DEFAULT_MAX_LENGTH)
birthdate Date required
}
entity Visits {
visitdate Instant required
description String required maxlength(255)
}
relationship ManyToMany {
Specialties{vet} to Vets{specialty}
}
relationship OneToMany {
Owners to Pets{owner},
Pets to Visits{pet}
}
relationship ManyToOne {
Pets{type} to Types
}
// Set pagination options.
paginate Owners, Pets with infinite-scroll
paginate Vets, Types, Visits with pagination
// Use a service layer with an interface for all entities.
service all with serviceImpl
// Use DTO's with the service layer with MapStruct.
dto * with mapstruct