-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample.yml
58 lines (52 loc) · 1.12 KB
/
example.yml
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
definitions:
Identity:
type: integer
format: int64
minimum: 1
Common:
properties:
id:
$ref: '#/definitions/Identity'
created_at:
type: dateTime
User:
allOf:
- $ref: '#/definitions/Common'
properties:
name:
type: nvarchar
maxLength: 255
Role:
allOf:
- $ref: '#/definitions/Common'
properties:
name:
type: nvarchar
maxLength: 255
UserRole:
allOf:
- $ref: '#/definitions/Common'
properties:
user_id:
$ref: '#/definitions/Identity'
role_id:
$ref: '#/definitions/Identity'
tables:
User:
name: users
description: Table to stores user information.
columns:
$ref: '#/definitions/User'
Role:
name: roles
description: Table to stores roles information.
columns:
$ref: '#/definitions/Role'
UserRole:
name: users_roles
description: Table to stores roles of user.
columns:
$ref: '#/definitions/UserRole'
relationships:
- User ||--0< UserRole
- UserRole >|--|| Role