Entity user

pii: direct

Properties

PropertyValue
ownerplatform

Subject areas: Auth

Attributes

#NameTypeNullDefaultKeyTermsDescription
1idbigintnoPK
2tenant_iddomain tenant_ref (bigint)yesUQ, FK
3emailpii: directtext(320)noUQ
4display_nametext(200)yes
5password_hashbinary(60)yes
6last_login_attimestamptzyes

Keys

KindNameAttributes
primarypk_userid
uniqueuq_user_tenant_emailtenant_id, email

Relationships

NameRoleOther entityCardinalityAttributesIdentifyingOn deleteOn update
api_key_created_byparentapi_keyzero_or_one to manyapi_key.created_by -> user.idnoset_nullno_action
membership_userparentmembershipone to manymembership.user_id -> user.idyescascadeno_action
user_tenantchildtenantone to manyuser.tenant_id -> tenant.idnocascadeno_action

Physical

lite (sqlite): main.user

#NameTypeNullDefaultIdentityCollationAttributeComment
1idintegernoby_defaultid
2tenant_idintegernotenant_id
3emailtextnoemail
4display_nametextyesdisplay_name
5password_hashblobyespassword_hash
6last_login_attextyeslast_login_at

pg (postgresql): app.user

#NameTypeNullDefaultIdentityCollationAttributeComment
1idbigintnoalwaysid
2tenant_idbigintnotenant_id
3emailvarchar(320)noemail
4display_namevarchar(200)yesdisplay_name
5password_hashbyteayespassword_hash
6last_login_attimestamp with time zoneyeslast_login_at