forked from arnaugarcia/realstatecamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jhipster-jdl.jh
102 lines (87 loc) · 1.61 KB
/
jhipster-jdl.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
//ENTITIES
entity Company{
name String required,
phone String required,
email String required,
cif String required
}
entity Property{
name String required,
price Double,
description TextBlob,
buildingType BuildingType,
serviceType ServiceType,
ref String required,
visible Boolean,
sold Boolean,
//Facilities
terrace Boolean,
m2 Integer,
numberBedroom Integer,
elevator Boolean,
furnished Boolean,
pool Boolean,
garage Boolean,
numberWC Integer,
ac Boolean
}
entity Location{
ref String,
province String required,
town String required,
cp required String,
typeOfRoad RoadType required,
nameRoad String required,
number Integer required,
apartment Integer,
building Integer,
door Integer,
stair String,
urlgmaps String,
latitude Double,
longitude Double,
}
entity Photo{
name String,
created ZonedDateTime,
image ImageBlob required,
description String,
url String
}
entity Notification{
title String,
content TextBlob,
seen Boolean,
date ZonedDateTime
}
//ENUM
enum RoadType{
STREET,
AVENUE,
PLACE
}
enum ServiceType{
RENT,
SALE,
RENT_AND_SALE
}
enum BuildingType{
HOUSE,
FLAT,
STUDIO
}
//RELATIONSHIPS
//One to One
relationship OneToOne{
//CONCAT
Company{location(ref)} to Location{company},
Property{location(ref)} to Location{property}
}
//Many to One
relationship ManyToOne{
Property{user(loggin)} to User,
Photo{property(name)} to Property{photo},
Notification{user(loggin)} to User
}
//Pagination options
paginate all with pagination