76 lines
1.9 KiB
Plaintext
76 lines
1.9 KiB
Plaintext
|
// You can render this DBML file using specialized software or websites such as:
|
||
|
// https://dbdiagram.io/
|
||
|
|
||
|
Table limits {
|
||
|
id varchar [primary key]
|
||
|
current_asset_count integer [not null]
|
||
|
max_asset_count integer [not null]
|
||
|
}
|
||
|
|
||
|
Table users {
|
||
|
id varchar [primary key]
|
||
|
created_at timestamp [not null]
|
||
|
last_connected_at timestamp [not null]
|
||
|
email varchar [not null]
|
||
|
password varchar [not null]
|
||
|
name varchar [not null]
|
||
|
limits varchar [not null]
|
||
|
assets varchar [not null, note: 'Comma separated list']
|
||
|
}
|
||
|
|
||
|
Table session_keys {
|
||
|
key varchar [primary key]
|
||
|
user_id varchar [not null]
|
||
|
}
|
||
|
|
||
|
Table heirs {
|
||
|
id varchar [primary key]
|
||
|
user_id varchar [not null]
|
||
|
created_at timestamp [not null]
|
||
|
name varchar [not null]
|
||
|
email varchar
|
||
|
}
|
||
|
|
||
|
Table entries {
|
||
|
id varchar [primary key]
|
||
|
user_id varchar [not null]
|
||
|
created_at timestamp [not null]
|
||
|
feelings text [not null, note: 'Comma separated JSON-encoded list']
|
||
|
assets text [not null, note: 'Comma separated list']
|
||
|
title text
|
||
|
description text
|
||
|
|
||
|
kind varchar [not null, note: 'Kind of entry']
|
||
|
music_entry varchar
|
||
|
location_entry varchar
|
||
|
date_entry varchar
|
||
|
}
|
||
|
|
||
|
Table music_entries {
|
||
|
id varchar [primary key]
|
||
|
artist varchar [not null]
|
||
|
title varchar [not null]
|
||
|
links text [not null, note: 'Comma separated list']
|
||
|
universal_ids text [not null, note: 'Comma separated JSON-encoded list of Universal IDs']
|
||
|
}
|
||
|
|
||
|
Table location_entries {
|
||
|
id varchar [primary key]
|
||
|
location_text text
|
||
|
location_coordinates varchar [note: 'JSON encoded location']
|
||
|
}
|
||
|
|
||
|
Table date_entries {
|
||
|
id varchar [primary key]
|
||
|
referenced_date timestamp
|
||
|
}
|
||
|
|
||
|
Ref: users.limits > limits.id
|
||
|
|
||
|
Ref: heirs.user_id > users.id
|
||
|
Ref: entries.user_id > users.id
|
||
|
Ref: session_keys.user_id > users.id
|
||
|
|
||
|
Ref: entries.music_entry > music_entries.id
|
||
|
Ref: entries.location_entry > location_entries.id
|
||
|
Ref: entries.date_entry > date_entries.id
|