Update erd-dsl.md
This commit is contained in:
parent
478aab8f09
commit
36bafc11ab
1 changed files with 19 additions and 29 deletions
|
@ -4,37 +4,27 @@
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
### An entity User
|
|
||||||
|
|
||||||
```
|
```
|
||||||
ENTITY User {
|
entities:
|
||||||
id: UUID,
|
user:
|
||||||
password_hash: VARCHAR(250),
|
id: UUID
|
||||||
role: VARCHAR(10),
|
password_hash: VARCHAR(250)
|
||||||
created_at: DATETIME,
|
role: VARCHAR(10)
|
||||||
|
created_at: DATETIME
|
||||||
|
updated_at: DATETIME
|
||||||
|
url:
|
||||||
|
id: VARCHAR(250)
|
||||||
|
custom_id: VARCHAR(250)
|
||||||
|
source_url: TEXT
|
||||||
|
short_url: VARCHAR(250)
|
||||||
|
created_at: DATETIME
|
||||||
updated_at: DATETIME
|
updated_at: DATETIME
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### An entity Url
|
|
||||||
|
|
||||||
```
|
|
||||||
ENTITY Url {
|
|
||||||
id: VARCHAR(250),
|
|
||||||
custom_id: VARCHAR(250),
|
|
||||||
source_url: TEXT,
|
|
||||||
short_url: VARCHAR(250),
|
|
||||||
created_at: DATETIME,
|
|
||||||
updated_at: DATETIME,
|
|
||||||
expires_at: DATETIME
|
expires_at: DATETIME
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
### An relationship ManageLinks
|
|
||||||
|
|
||||||
```
|
relationships:
|
||||||
RELATIONSHIP ManagesLinks {
|
manages_urls:
|
||||||
LINK User (1, 1),
|
links:
|
||||||
LINK Url (0, N),
|
- user: [1, 1]
|
||||||
};
|
- url: [0, n]
|
||||||
|
properties: {}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue