immich/server/src/domain/asset/dto/map-marker.dto.ts

23 lines
492 B
TypeScript
Raw Normal View History

import { ApiProperty } from '@nestjs/swagger';
import { Transform, Type } from 'class-transformer';
import { IsBoolean, IsDate, IsOptional } from 'class-validator';
import { toBoolean } from '../../domain.util';
export class MapMarkerDto {
@ApiProperty()
@IsOptional()
@IsBoolean()
@Transform(toBoolean)
isFavorite?: boolean;
@IsOptional()
@IsDate()
@Type(() => Date)
fileCreatedAfter?: Date;
@IsOptional()
@IsDate()
@Type(() => Date)
fileCreatedBefore?: Date;
}