-
Notifications
You must be signed in to change notification settings - Fork 0
/
randomvideo.jdl
36 lines (28 loc) · 968 Bytes
/
randomvideo.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
entity Video {
url String required minlength(11) maxlength(300) pattern(/^(https?:\/\/)?(www\.)?(youtube\.com\/watch\?v=|youtu\.be\/)[^\s]+$/),
name String required minlength(1) maxlength(50)
}
entity VideoList {
name String required minlength(1) maxlength(50)
slug String required minlength(1) maxlength(50) unique pattern(/^(?!(api|internal-use)$)[a-zA-Z0-9-]+$/)
}
/*
* Any additional data/fields/relationships aren't supposed to go into the
* User entity that JHipster creates by default and uses internally, so we put them here.
* We call this entity XUser for External User, because this entity is external
* to the one JHipster creates uses internally.
*/
entity XUser {
}
relationship OneToMany {
XUser{videoList} to VideoList{xUser}
}
relationship OneToMany {
XUser{video} to Video{xUser}
}
relationship ManyToMany {
VideoList{video} to Video{videoList}
}
relationship OneToOne {
XUser{internalUser} to User with builtInEntity
}