Skip to main content

Definition

Diagram

Application

AttributeNameAttributeTypeColumnNameDataTypeNotNullComment
IDuint64idbigint(20) unsignedtrue
ApplicationKeystringapplication_keyvarchar(127)true
ApplicationNamestringapplication_namevarchar(127)true
ApplicationDescription*stringapplication_descriptionvarchar(255)false
ClientIDstringclient_idvarchar(64)true
ClientSecretstringclient_secretvarchar(127)true
RedirectUristringredirect_urivarchar(255)true
Statusintstatusint(10)truelt 0 deleted, 0 pendding, 1 valid
CreatedAt*time.Timecreated_attimestampfalse
UpdatedAt*time.Timeupdated_attimestampfalse

Role

AttributeNameAttributeTypeColumnNameDataTypeNotNullComment
IDuint64idbigint(20) unsignedtrue
RoleNamestringrole_namevarchar(127)true
RoleDescription*stringrole_descriptionvarchar(255)false
Statusintstatusint(10)true-1 deleted 0 pendding 1 valid
CreatedAt*time.Timecreated_attimestampfalse
UpdatedAt*time.Timeupdated_attimestampfalse

User

AttributeNameAttributeTypeColumnNameDataTypeNotNullComment
IDuint64idbigint(20) unsignedtrue
Refuint64refbigint(20) unsignedtrueref to userID who invited this user
OutKey*stringout_keyvarchar(255)falseouter system's key
FirstNamestringfirst_namevarchar(127)true
LastNamestringlast_namevarchar(127)true
AvatarUrl*stringavatar_urlvarchar(255)false
PhotoUrl*stringphoto_urlvarchar(255)false
Passwordstringpasswordvarchar(255)true
RememberToken*stringremember_tokenvarchar(255)false
Statusintstatusint(10)true-1 deleted 0 pendding 1 valid
CreatedAt*time.Timecreated_attimestampfalse
UpdatedAt*time.Timeupdated_attimestampfalse

ApplicationRole

AttributeNameAttributeTypeColumnNameDataTypeNotNullComment
ApplicationIDuint64application_idbigint(20) unsignedtrue
RoleIDuint64role_idbigint(20) unsignedtrue
Rightint64rightbigint(20)true
CreatedAt*time.Timecreated_attimestampfalse
UpdatedAt*time.Timeupdated_attimestampfalse

ApplicationUser

AttributeNameAttributeTypeColumnNameDataTypeNotNullComment
ApplicationIDuint64application_idbigint(20) unsignedtrue
UserIDuint64user_idbigint(20) unsignedtrue
Rightint64rightbigint(20)true
CreatedAt*time.Timecreated_attimestampfalse
UpdatedAt*time.Timeupdated_attimestampfalse

Email

AttributeNameAttributeTypeColumnNameDataTypeNotNullComment
IDuint64idbigint(20) unsignedtrue
UserIDuint64user_idbigint(20) unsignedtrue
EmailAddressstringemail_addressvarchar(127)true
EmailVerifiedAt*time.Timeemail_verified_attimestampfalse
Statusintstatusint(10)true-1 deleted 0 pendding 1 valid
CreatedAt*time.Timecreated_attimestampfalse
UpdatedAt*time.Timeupdated_attimestampfalse

Phone

AttributeNameAttributeTypeColumnNameDataTypeNotNullComment
IDuint64idbigint(20) unsignedtrue
UserIDuint64user_idbigint(20) unsignedtrue
PhoneNumberstringphone_numbervarchar(16)true
PhoneVerifiedAt*time.Timephone_verified_attimestampfalse
Statusintstatusint(10)truelt 0 deleted, 0 pendding, 1 valid
CreatedAt*time.Timecreated_attimestampfalse
UpdatedAt*time.Timeupdated_attimestampfalse

RoleUser

AttributeNameAttributeTypeColumnNameDataTypeNotNullComment
RoleIDuint64role_idbigint(20) unsignedtrue
UserIDuint64user_idbigint(20) unsignedtrue

Token

AttributeNameAttributeTypeColumnNameDataTypeNotNullComment
IDuint64idbigint(20) unsignedtrue
UserIDuint64user_idbigint(20) unsignedtrue
AccessTokenstringaccess_tokenvarchar(255)true
RefreshTokenstringrefresh_tokenvarchar(255)true
Scopestringscopevarchar(255)true
Codestringcodevarchar(32)trueuse in oauth2 code
CodeChallenge*stringcode_challengevarchar(64)falseoauth2 PKCE
TokenTypestringtoken_typevarchar(255)trueBearer
ExpireAt*time.Timeexpire_attimestampfalse
Clientstringclientvarchar(255)true
Versionstringversionvarchar(255)true
CreatedAt*time.Timecreated_attimestampfalse
UpdatedAt*time.Timeupdated_attimestampfalse