Update erd-dsl.md
This commit is contained in:
parent
7d9e3b77b9
commit
478aab8f09
1 changed files with 20 additions and 28 deletions
|
@ -7,42 +7,34 @@
|
||||||
### An entity User
|
### An entity User
|
||||||
|
|
||||||
```
|
```
|
||||||
CREATE ENTITY User (
|
ENTITY User {
|
||||||
id UUID,
|
id: UUID,
|
||||||
password_hash VARCHAR(250),
|
password_hash: VARCHAR(250),
|
||||||
role VARCHAR(10),
|
role: VARCHAR(10),
|
||||||
created_at DATETIME,
|
created_at: DATETIME,
|
||||||
updated_at DATETIME
|
updated_at: DATETIME
|
||||||
);
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### An entity Url
|
### An entity Url
|
||||||
|
|
||||||
```
|
```
|
||||||
CREATE ENTITY Url (
|
ENTITY Url {
|
||||||
id VARCHAR(250),
|
id: VARCHAR(250),
|
||||||
custom_id VARCHAR(250),
|
custom_id: VARCHAR(250),
|
||||||
source_url TEXT,
|
source_url: TEXT,
|
||||||
short_url VARCHAR(250),
|
short_url: VARCHAR(250),
|
||||||
created_at DATETIME,
|
created_at: DATETIME,
|
||||||
updated_at DATETIME,
|
updated_at: DATETIME,
|
||||||
expires_at DATETIME
|
expires_at: DATETIME
|
||||||
);
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
### An relationship ManageLinks
|
### An relationship ManageLinks
|
||||||
|
|
||||||
```
|
```
|
||||||
CREATE RELATIONSHIP ManagesLinks (
|
RELATIONSHIP ManagesLinks {
|
||||||
LINK User (0, N),
|
LINK User (1, 1),
|
||||||
LINK Url (
|
LINK Url (0, N),
|
||||||
HAS_ONE User,
|
};
|
||||||
HAS_MANY Url,
|
|
||||||
|
|
||||||
<attr> <attr_type>,
|
|
||||||
<attr> <attr_type>,
|
|
||||||
<attr> <attr_type>,
|
|
||||||
<attr> <attr_type>,
|
|
||||||
);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue