rakenne/doc/erd-dsl.md

57 lines
1 KiB
Markdown
Raw Normal View History

2020-05-17 19:10:41 +00:00
# Entity-Relationship Diagrams - Domain Specific Language
## Goals
2020-05-17 19:25:51 +00:00
* Describe all possible cases according to MERISE
* Be simple to read and write by a human user
* Be simple to parse by a machine
2020-05-17 19:10:41 +00:00
## Example
```
2020-05-17 19:18:29 +00:00
entities:
user:
2020-05-17 19:34:14 +00:00
- name: id
type: uuid
key: true
- name: password_hash
type: varchar
limit: 250
- name: role
type: varchar
limit: 10
- name: created_at
type: datetime
- name: updated_at
type: datetime
2020-05-17 19:18:29 +00:00
url:
2020-05-17 19:34:14 +00:00
- name: id
type: varchar
limit: 250
key: true
- name: custom_id
type: varchar
limit: 250
- name: source_url
type: text
- name: short_url
type: varchar
limit: 250
- name: created_at
type: datetime
- name: updated_at
type: datetime
- name: expires_at
type: datetime
2020-05-17 19:10:41 +00:00
2020-05-17 19:18:29 +00:00
relationships:
manages_urls:
links:
2020-05-17 19:34:14 +00:00
- name: user:
equals: 1
- name: url:
min: 0
max: n
properties: []
2020-05-17 19:10:41 +00:00
```