28 lines
971 B
TypeScript
28 lines
971 B
TypeScript
/**
|
|
* User domain models mapped to the `users` and `roles` tables.
|
|
* Represents authenticated account rows used by repositories and auth services.
|
|
*/
|
|
/** Role name values from the `roles.name` column. */
|
|
export type RoleName = 'user' | 'moderator' | 'admin';
|
|
/** Row shape for the `users` table (excludes PII columns stored only in DTO queries). */
|
|
export interface User {
|
|
id: string;
|
|
email_hash: string;
|
|
password_hash: string;
|
|
role_id: number;
|
|
email_verified: boolean;
|
|
phone_verified: boolean;
|
|
totp_secret_encrypted: string | null;
|
|
totp_enabled: boolean;
|
|
is_enabled: boolean;
|
|
is_account_non_expired: boolean;
|
|
is_account_non_locked: boolean;
|
|
is_credentials_non_expired: boolean;
|
|
withdrawals_suspended: boolean;
|
|
under_surveillance: boolean;
|
|
security_suspended_at: Date | null;
|
|
security_reason_encrypted: string | null;
|
|
created_at: Date;
|
|
updated_at: Date;
|
|
}
|
|
//# sourceMappingURL=user.model.d.ts.map
|