Compare commits
2 Commits
e8084bdeb0
...
49fc1537b7
| Author | SHA1 | Date | |
|---|---|---|---|
| 49fc1537b7 | |||
| 1c013183f0 |
@ -6,7 +6,7 @@
|
|||||||
' ========== SYSTEM ==========
|
' ========== SYSTEM ==========
|
||||||
|
|
||||||
entity "system.users" as usr {
|
entity "system.users" as usr {
|
||||||
* id : uuid <<generated>>
|
* id : smallserial <<generated>>
|
||||||
--
|
--
|
||||||
* name : varchar(32)
|
* name : varchar(32)
|
||||||
* password : text
|
* password : text
|
||||||
@ -14,8 +14,9 @@ entity "system.users" as usr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
entity "system.mime" as mime {
|
entity "system.mime" as mime {
|
||||||
* name : varchar(127)
|
* id : smallserial <<generated>>
|
||||||
--
|
--
|
||||||
|
* name : varchar(127)
|
||||||
* extension : varchar(16)
|
* extension : varchar(16)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,8 +29,8 @@ entity "data.categories" as cty {
|
|||||||
* name : varchar(256)
|
* name : varchar(256)
|
||||||
notes : text
|
notes : text
|
||||||
color : char(6)
|
color : char(6)
|
||||||
* created_at : timestamptz <<generated>>
|
' * created_at : timestamptz <<generated>>
|
||||||
* creator_id : uuid
|
* creator_id : smallint
|
||||||
' * is_private : boolean
|
' * is_private : boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,16 +40,16 @@ entity "data.files" as fle {
|
|||||||
* id : uuid <<generated>>
|
* id : uuid <<generated>>
|
||||||
--
|
--
|
||||||
name : varchar(256)
|
name : varchar(256)
|
||||||
* mime : varchar(127)
|
* mime_id : smallint
|
||||||
* datetime : timestamptz
|
* datetime : timestamptz
|
||||||
notes : text
|
notes : text
|
||||||
* metadata : jsonb
|
* metadata : jsonb
|
||||||
* created_at : timestamptz <<generated>>
|
' * created_at : timestamptz <<generated>>
|
||||||
* creator_id : uuid
|
* creator_id : smallint
|
||||||
' * is_private : boolean
|
' * is_private : boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
fle::mime }o--|| mime::name
|
fle::mime_id }o--|| mime::id
|
||||||
fle::creator_id }o--|| usr::id
|
fle::creator_id }o--|| usr::id
|
||||||
|
|
||||||
entity "data.tags" as tag {
|
entity "data.tags" as tag {
|
||||||
@ -58,8 +59,8 @@ entity "data.tags" as tag {
|
|||||||
notes : text
|
notes : text
|
||||||
color : char(6)
|
color : char(6)
|
||||||
category_id : uuid
|
category_id : uuid
|
||||||
* created_at : timestamptz <<generated>>
|
' * created_at : timestamptz <<generated>>
|
||||||
* creator_id : uuid
|
* creator_id : smallint
|
||||||
' * is_private : boolean
|
' * is_private : boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,8 +91,8 @@ entity "data.pools" as pool {
|
|||||||
* name : varchar(256)
|
* name : varchar(256)
|
||||||
notes : text
|
notes : text
|
||||||
' parent_id : uuid
|
' parent_id : uuid
|
||||||
* created_at : timestamptz
|
' * created_at : timestamptz
|
||||||
* creator_id : uuid
|
* creator_id : smallint
|
||||||
' * is_private : boolean
|
' * is_private : boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +102,7 @@ pool::creator_id }o--|| usr::id
|
|||||||
entity "data.file_pool" as fp {
|
entity "data.file_pool" as fp {
|
||||||
* file_id : uuid
|
* file_id : uuid
|
||||||
* pool_id : uuid
|
* pool_id : uuid
|
||||||
* number : integer
|
* number : smallint
|
||||||
}
|
}
|
||||||
|
|
||||||
fp::file_id }o--|| fle::id
|
fp::file_id }o--|| fle::id
|
||||||
@ -111,7 +112,7 @@ fp::pool_id }o--|| pool::id
|
|||||||
' ========== ACCESS ==========
|
' ========== ACCESS ==========
|
||||||
|
|
||||||
entity "access.files" as acl_f {
|
entity "access.files" as acl_f {
|
||||||
* user_id : uuid
|
* user_id : smallint
|
||||||
* file_id : uuid
|
* file_id : uuid
|
||||||
--
|
--
|
||||||
* read : boolean
|
* read : boolean
|
||||||
@ -122,7 +123,7 @@ acl_f::user_id }o--|| usr::id
|
|||||||
acl_f::file_id }o--|| fle::id
|
acl_f::file_id }o--|| fle::id
|
||||||
|
|
||||||
entity "access.tags" as acl_t {
|
entity "access.tags" as acl_t {
|
||||||
* user_id : uuid
|
* user_id : smallint
|
||||||
* tag_id : uuid
|
* tag_id : uuid
|
||||||
--
|
--
|
||||||
* read : boolean
|
* read : boolean
|
||||||
@ -135,7 +136,7 @@ acl_t::user_id }o--|| usr::id
|
|||||||
acl_t::tag_id }o--|| tag::id
|
acl_t::tag_id }o--|| tag::id
|
||||||
|
|
||||||
entity "access.categories" as acl_c {
|
entity "access.categories" as acl_c {
|
||||||
* user_id : uuid
|
* user_id : smallint
|
||||||
* category_id : uuid
|
* category_id : uuid
|
||||||
--
|
--
|
||||||
* read : boolean
|
* read : boolean
|
||||||
@ -148,7 +149,7 @@ acl_c::user_id }o--|| usr::id
|
|||||||
acl_c::category_id }o--|| cty::id
|
acl_c::category_id }o--|| cty::id
|
||||||
|
|
||||||
entity "access.pools" as acl_p {
|
entity "access.pools" as acl_p {
|
||||||
* user_id : uuid
|
* user_id : smallint
|
||||||
* pool_id : uuid
|
* pool_id : uuid
|
||||||
--
|
--
|
||||||
* read : boolean
|
* read : boolean
|
||||||
@ -166,7 +167,7 @@ acl_p::pool_id }o--|| pool::id
|
|||||||
entity "activity.sessions" as ssn {
|
entity "activity.sessions" as ssn {
|
||||||
* id : uuid <<generated>>
|
* id : uuid <<generated>>
|
||||||
--
|
--
|
||||||
* user_id : uuid
|
* user_id : smallint
|
||||||
* user_agent : varchar(512)
|
* user_agent : varchar(512)
|
||||||
* started_at : timestamptz
|
* started_at : timestamptz
|
||||||
expires_at : timestamptz
|
expires_at : timestamptz
|
||||||
@ -178,7 +179,7 @@ ssn::user_id }o--|| usr::id
|
|||||||
entity "activity.file_views" as fv {
|
entity "activity.file_views" as fv {
|
||||||
* file_id : uuid
|
* file_id : uuid
|
||||||
* timestamp : timestamptz
|
* timestamp : timestamptz
|
||||||
* user_id : uuid
|
* user_id : smallint
|
||||||
}
|
}
|
||||||
|
|
||||||
fv::file_id }o--|| fle::id
|
fv::file_id }o--|| fle::id
|
||||||
@ -187,7 +188,7 @@ fv::user_id }o--|| usr::id
|
|||||||
entity "activity.tag_uses" as tu {
|
entity "activity.tag_uses" as tu {
|
||||||
* tag_id : uuid
|
* tag_id : uuid
|
||||||
* timestamp : timestamptz
|
* timestamp : timestamptz
|
||||||
* user_id : uuid
|
* user_id : smallint
|
||||||
--
|
--
|
||||||
* included : boolean
|
* included : boolean
|
||||||
}
|
}
|
||||||
@ -198,7 +199,7 @@ tu::user_id }o--|| usr::id
|
|||||||
entity "activity.pool_views" as pv {
|
entity "activity.pool_views" as pv {
|
||||||
* pool_id : uuid
|
* pool_id : uuid
|
||||||
* timestamp : timestamptz
|
* timestamp : timestamptz
|
||||||
* user_id : uuid
|
* user_id : smallint
|
||||||
}
|
}
|
||||||
|
|
||||||
pv::pool_id }o--|| pool::id
|
pv::pool_id }o--|| pool::id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user