Add ER-Diagram

This commit is contained in:
Dita Aji Pratama 2024-06-17 17:52:53 +07:00
parent f9bdff2a63
commit bb29d00146
2 changed files with 82 additions and 0 deletions

BIN
diagram/erd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

82
diagram/erd.puml Normal file
View File

@ -0,0 +1,82 @@
@startuml
hide circle
skinparam linetype ortho
package auth {
entity auth {
*token : binary(40) primary
password : binary(60)
when_create : datetime
when_udate : datetime null
--
}
entity auth_session {
*id : int(11) a_i primary
*token : binary(40) index
start : datetime
end : datetime null
when_create : datetime
when_update : datetime null
--
*token = auth.token
}
auth ||-o| auth_session
entity auth_profile{
*id : int(11) a_i primary
*token : binary(40) index
username : varchar(36) unique
email : longtext unique
phone : bigint(20) unique
when_create : datetime
when_update : datetime null
--
*token = auth.token
}
auth ||--|| auth_profile
entity auth_profile_verification{
*id : int(11) a_i primary
*auth_profile : int(11) index
type : longtext 'email'
verified : int(1) 0
when_create : datetime
when_update : datetime null
--
*auth_profile = auth_profile.id
}
auth_profile ||-|{ auth_profile_verification
entity auth_roles{
*id : int(11) a_i primary
name : varchar(36)
when_create : datetime
when_update : datetime null
--
}
entity auth_profile_roles{
*id : int(11) a_i primary
*auth_profile : int(11) index
*auth_roles : int(11) index
when_create : datetime
when_update : datetime null
--
*auth_profile = auth_profile.id
*auth_roles = auth_roles.id
}
auth_roles ||--o{ auth_profile_roles
auth_profile_roles }o-|| auth_profile
}
package profile{
entity profile_actor{}
auth_profile ||--o| profile_actor
}
@enduml