File

src/trigger-time-slot/request/dto/add-time-slot.dto.ts

Index

Properties

Properties

Optional active
Type : boolean
Decorators :
@ApiProperty({type: Boolean, required: false})
days
Type : string[]
Decorators :
@ApiProperty({type: 'enum', required: false, isArray: true, enum: undefined, example: undefined})
Optional from
Type : Date
Decorators :
@ApiProperty({type: Date, required: false})
timezone
Type : string
Decorators :
@ApiProperty({type: String, required: true})
to
Type : Date
Decorators :
@ApiProperty({type: Date, required: true})
import { ApiProperty } from '@nestjs/swagger';
import { DAYS_OF_WEEKS } from '../../enum/days-of-week.enum';
import { getEnumKeys } from '../../../common/helper/get-enum-keys';

export class AddTimeSlotDTO {
  @ApiProperty({ type: Boolean, required: false })
  active?: boolean;

  @ApiProperty({ type: Date, required: false })
  from?: Date;

  @ApiProperty({ type: Date, required: true })
  to: Date;

  @ApiProperty({ type: String, required: true })
  timezone: string;

  @ApiProperty({
    type: 'enum',
    required: false,
    isArray: true,
    enum: getEnumKeys(DAYS_OF_WEEKS, true),
    example: [getEnumKeys(DAYS_OF_WEEKS, true)[0]],
  })
  days: string[];
}

results matching ""

    No results matching ""