82 lines
1.5 KiB
Plaintext
82 lines
1.5 KiB
Plaintext
|
@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
|