admin area

This commit is contained in:
2026-01-01 12:10:35 +01:00
parent 02c0cc44e1
commit f001df3744
68 changed files with 10324 additions and 32 deletions

View File

@@ -0,0 +1,50 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class UserResponseDto {
@ApiProperty({ description: 'User ID' })
id: string = '';
@ApiProperty({ description: 'User email' })
email: string = '';
@ApiProperty({ description: 'Display name' })
displayName: string = '';
@ApiProperty({ description: 'User roles', type: [String] })
roles: string[] = [];
@ApiProperty({ description: 'User status' })
status: string = '';
@ApiProperty({ description: 'Whether user is system admin' })
isSystemAdmin: boolean = false;
@ApiProperty({ description: 'Account creation date' })
createdAt: Date = new Date();
@ApiProperty({ description: 'Last update date' })
updatedAt: Date = new Date();
@ApiPropertyOptional({ description: 'Last login date' })
lastLoginAt?: Date;
@ApiPropertyOptional({ description: 'Primary driver ID' })
primaryDriverId?: string;
}
export class UserListResponseDto {
@ApiProperty({ description: 'List of users', type: [UserResponseDto] })
users: UserResponseDto[] = [];
@ApiProperty({ description: 'Total number of users' })
total: number = 0;
@ApiProperty({ description: 'Current page number' })
page: number = 1;
@ApiProperty({ description: 'Items per page' })
limit: number = 10;
@ApiProperty({ description: 'Total number of pages' })
totalPages: number = 0;
}