Files
mercadodevida/project/src/modules/backoffice/domain/backoffice-user.ts
2026-08-19 07:17:14 +02:00

27 lines
628 B
TypeScript

/**
* FIX-14: Backoffice user domain model.
* Backoffice users (admin/editor) are physically separated from storefront
* customers (identity_users) and authenticate through a separate mechanism.
*/
export type BackofficeRole = 'admin' | 'editor';
export interface BackofficeUser {
id: string;
email: string;
role: BackofficeRole;
mfaEnrolled: boolean;
createdAt: Date;
updatedAt: Date;
}
export interface BackofficeUserWithHash extends BackofficeUser {
passwordHash: string;
}
export interface NewBackofficeUser {
email: string;
passwordHash: string;
role?: BackofficeRole;
mfaEnrolled?: boolean;
}