admin area
This commit is contained in:
50
apps/api/src/domain/admin/dtos/UserResponseDto.ts
Normal file
50
apps/api/src/domain/admin/dtos/UserResponseDto.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user