Initial commit
This commit is contained in:
27
skills/erd-skill/templates/basic.dbml
Normal file
27
skills/erd-skill/templates/basic.dbml
Normal file
@@ -0,0 +1,27 @@
|
||||
Table follows {
|
||||
following_user_id integer
|
||||
followed_user_id integer
|
||||
created_at timestamp
|
||||
}
|
||||
|
||||
Table users {
|
||||
id integer [primary key]
|
||||
username varchar
|
||||
role varchar
|
||||
created_at timestamp
|
||||
}
|
||||
|
||||
Table posts {
|
||||
id integer [primary key]
|
||||
title varchar
|
||||
body text [note: 'Content of the post']
|
||||
user_id integer [not null]
|
||||
status varchar
|
||||
created_at timestamp
|
||||
}
|
||||
|
||||
Ref user_posts: posts.user_id > users.id // many-to-one
|
||||
|
||||
Ref: users.id < follows.following_user_id
|
||||
|
||||
Ref: users.id < follows.followed_user_id
|
||||
Reference in New Issue
Block a user