Initial commit: Mana Collection NestJS backend.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-09-07 20:49:55 +03:30
co-authored by Cursor
commit fe78a99b78
87 changed files with 10557 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import { UserRole } from '@prisma/client';
export type AuthUser = {
id: string;
cellNumber: string;
role: UserRole;
firstName: string;
lastName: string;
storeId?: string | null;
};
export function isStoreAdmin(role: UserRole): boolean {
return role === UserRole.STORE_ADMIN;
}
export function isSuperAdmin(role: UserRole): boolean {
return role === UserRole.SUPER_ADMIN;
}
export function displayName(user: {
firstName: string;
lastName: string;
}): string {
return `${user.firstName} ${user.lastName}`.trim();
}