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;
}