-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.jdl
124 lines (103 loc) · 2.32 KB
/
schema.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
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
entity User {
login String required minlength(1) maxlength(100),
password String required minlength(60) maxlength(60),
firstName String maxlength(50),
lastName String maxlength(50),
email String minlength(5) maxlength(100),
activated Boolean required,
langKey String minlength(2) maxlength(5),
imageUrl String maxlength(256),
activationKey String maxlength(20),
resetKey String maxlength(20),
resetDate ZonedDateTime
}
entity Hero {
name String required
}
entity Crisis {
name String required
}
entity Claim {
name String required,
sortOrder Integer,
imageLabel String,
imageLink String
}
entity Contact {
name String required
}
entity Note {
id String,
text String,
colour String,
left Integer,
top Integer
}
entity Rebuttal {
longName String minlength(20) maxlength(1200),
shortName String,
date ZonedDateTime,
expires ZonedDateTime,
link String
}
entity ClaimRebuttal {
claimId Long,
rebuttalId Long,
sortOrder Integer
}
entity Message {
userLogin String,
message String required,
createdAt ZonedDateTime,
updatedAt ZonedDateTime
}
entity Tag {
name String required minlength(2)
}
entity Article {
slug String required,
title String required,
description String required,
body TextBlob required,
createdAt ZonedDateTime required,
updatedAt ZonedDateTime required
}
entity Comment {
body TextBlob required,
createdAt ZonedDateTime required,
updatedAt ZonedDateTime required
}
entity Author {
bio TextBlob
}
entity Profile {
username String,
bio TextBlob,
image String,
following Boolean
}
dto Profile with mapstruct
paginate Article, Tag, Message with infinite-scroll
paginate Comment with pager
relationship OneToMany {
Author{article} to Article{author(login)},
Article{comment} to Comment{article},
Author{comment} to Comment{author}
}
relationship ManyToMany {
Article{tag(name)} to Tag{article},
Author{follower} to Author{followee},
Author{favorite} to Article{favoriter}
}
relationship OneToOne {
Author{user(login)} to User{custom(login)}
}
paginate Message with infinite-scroll
entity Talk {
title String required,
speaker String required,
description TextBlob required,
yourRating Float max(10),
rating Float
}
paginate Talk with pager