28 lines
625 B
TypeScript
28 lines
625 B
TypeScript
|
|
export const mockUser = {
|
||
|
|
id: 'user-1',
|
||
|
|
email: 'test@example.com',
|
||
|
|
name: 'Test User',
|
||
|
|
passwordHash: '$2a$12$hashedpassword',
|
||
|
|
role: 'CUSTOMER' as const,
|
||
|
|
mustChangePassword: false,
|
||
|
|
createdAt: new Date('2024-01-01'),
|
||
|
|
updatedAt: new Date('2024-01-01'),
|
||
|
|
}
|
||
|
|
|
||
|
|
export const mockAdmin = {
|
||
|
|
...mockUser,
|
||
|
|
id: 'admin-1',
|
||
|
|
email: 'admin@example.com',
|
||
|
|
name: 'Admin User',
|
||
|
|
role: 'ADMIN' as const,
|
||
|
|
}
|
||
|
|
|
||
|
|
export const mockSession = {
|
||
|
|
id: 'session-1',
|
||
|
|
userId: mockUser.id,
|
||
|
|
tokenHash: 'abc123hash',
|
||
|
|
expiresAt: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000),
|
||
|
|
createdAt: new Date('2024-01-01'),
|
||
|
|
user: mockUser,
|
||
|
|
}
|