2023-08-04 17:07:15 -04:00
|
|
|
import { ApiProperty } from '@nestjs/swagger';
|
2024-03-07 22:59:02 -05:00
|
|
|
import { IsEnum, IsNotEmpty, IsString } from 'class-validator';
|
|
|
|
|
import { ValidateBoolean, ValidateUUID } from '../../domain.util';
|
2023-10-09 10:25:03 -04:00
|
|
|
import { TimeBucketSize } from '../../repositories';
|
2023-08-04 17:07:15 -04:00
|
|
|
|
|
|
|
|
export class TimeBucketDto {
|
|
|
|
|
@IsNotEmpty()
|
|
|
|
|
@IsEnum(TimeBucketSize)
|
|
|
|
|
@ApiProperty({ enum: TimeBucketSize, enumName: 'TimeBucketSize' })
|
|
|
|
|
size!: TimeBucketSize;
|
|
|
|
|
|
|
|
|
|
@ValidateUUID({ optional: true })
|
|
|
|
|
userId?: string;
|
|
|
|
|
|
|
|
|
|
@ValidateUUID({ optional: true })
|
|
|
|
|
albumId?: string;
|
|
|
|
|
|
2023-08-05 09:58:52 -04:00
|
|
|
@ValidateUUID({ optional: true })
|
|
|
|
|
personId?: string;
|
|
|
|
|
|
2024-03-07 22:59:02 -05:00
|
|
|
@ValidateBoolean({ optional: true })
|
2023-08-04 17:07:15 -04:00
|
|
|
isArchived?: boolean;
|
|
|
|
|
|
2024-03-07 22:59:02 -05:00
|
|
|
@ValidateBoolean({ optional: true })
|
2023-08-04 17:07:15 -04:00
|
|
|
isFavorite?: boolean;
|
2023-10-06 07:01:14 +00:00
|
|
|
|
2024-03-07 22:59:02 -05:00
|
|
|
@ValidateBoolean({ optional: true })
|
2023-10-06 07:01:14 +00:00
|
|
|
isTrashed?: boolean;
|
2023-10-27 15:34:01 -05:00
|
|
|
|
2024-03-07 22:59:02 -05:00
|
|
|
@ValidateBoolean({ optional: true })
|
2023-10-27 15:34:01 -05:00
|
|
|
withStacked?: boolean;
|
2023-11-11 15:06:19 -06:00
|
|
|
|
2024-03-07 22:59:02 -05:00
|
|
|
@ValidateBoolean({ optional: true })
|
2023-11-11 15:06:19 -06:00
|
|
|
withPartners?: boolean;
|
2023-08-04 17:07:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class TimeBucketAssetDto extends TimeBucketDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
timeBucket!: string;
|
|
|
|
|
}
|