import { ApiProperty } from '@nestjs/swagger';
import { CatalogItemLongDto } from '../catalog/dto/catalog-item.dto';

export class ReservationItemDto {
  @ApiProperty({ example: 1, description: 'ID яхты' })
  yachtId: number;

  @ApiProperty({ example: 1, description: 'ID резерватора' })
  reservatorId: number;

  @ApiProperty({ example: 1733097600, description: 'Начало резервации (Unix timestamp в UTC)' })
  startUtc: number;

  @ApiProperty({ example: 1733133600, description: 'Конец резервации (Unix timestamp в UTC)' })
  endUtc: number;
}

export class ReservationWithYachtDto extends ReservationItemDto {
  @ApiProperty({ example: 1, description: 'ID резервации' })
  id: number;

  @ApiProperty({
    type: CatalogItemLongDto,
    required: false,
    description: 'Данные о яхте',
  })
  yacht?: CatalogItemLongDto;
}
