User
An account in your own product: who can use what you sell, under what username and email, in what state and with what roles. The users table of a SaaS product, ready to use and to extend.
| Pack | Core |
| Version | v1 (latest) |
| URN | urn:postware:core:user |
| Identity | identifiers or username or email |
| Status categories | invited, active, suspended, deactivated |
Fields
| Field | Type | Req | Notes |
|---|---|---|---|
username | string | no | the handle they sign in or are shown as; unique, lower case |
email | string | no | the address they sign in with; unique, lower case |
email_verified | bool | no | true once they have proved the address is theirs |
phone | string | no | E.164 when known |
name | Name | no | their name; full is what the product shows |
picture | string | no | the URL of their profile picture |
status | Status(invited| | yes | default map[category:active] |
roles | string[] | no | what they may do in the product, in the product's own words: admin, editor, viewer |
signed_up_at | datetime | no | when the account was made in the product, which is not when this record was written |
last_sign_in_at | datetime | no | when they last signed in |
last_seen_at | datetime | no | when they last did anything in the product |
locale | string | no | BCP 47; the OIDC locale claim |
timezone | string | no | IANA zone; the OIDC zoneinfo claim |
customer | Ref<Customer> | no | who pays for this user: their own Customer, or the Customer of the account they belong to |
organization | Ref<Organization> | no | the company they use the product for |
person | Ref<Person> | no | the same human as a contact, when they are known as one |
Events
user.activated when status.category becomes active; user.suspended when status.category becomes suspended; user.deactivated when status.category becomes deactivated.