From f46f08de6c1d1ee0417a049efbf49e560d44c092 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Sun, 17 May 2020 21:34:14 +0200 Subject: [PATCH] Update erd-dsl.md --- doc/erd-dsl.md | 55 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/doc/erd-dsl.md b/doc/erd-dsl.md index 99a0c8e..398604d 100644 --- a/doc/erd-dsl.md +++ b/doc/erd-dsl.md @@ -11,27 +11,46 @@ ``` entities: user: - id: UUID - password_hash: VARCHAR(250) - role: VARCHAR(10) - created_at: DATETIME - updated_at: DATETIME + - 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 url: - id: VARCHAR(250) - custom_id: VARCHAR(250) - source_url: TEXT - short_url: VARCHAR(250) - created_at: DATETIME - updated_at: DATETIME - expires_at: DATETIME + - 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 relationships: manages_urls: links: - - user: - eq: 1 - - url: - gte: 0 - lte: n - properties: {} + - name: user: + equals: 1 + - name: url: + min: 0 + max: n + properties: [] ```