1 parent
cb29c7d2c4
commit
7aecc6f96e
32 files changed
+532
-25
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { IsISO8601, Matches } from 'class-validator';
|
||||
import { StringDecorator } from '../../../../common/decorators/validators.js';
|
||||
import { IssueStatusListDecorator } from './issue-status-list.decorator.js';
|
||||
|
||||
/** Без смещения дата трактовалась бы в часовом поясе сервера */
|
||||
const WITH_OFFSET = /(Z|[+-]\d{2}:\d{2})$/;
|
||||
const MOMENT_MESSAGE = '$property: ожидается ISO 8601 со смещением, например 2026-10-01T00:00:00+03:00';
|
||||
|
||||
export class CalendarIssuesQueryDto {
|
||||
/** Начало видимой сетки календаря, включительно */
|
||||
@IsISO8601({ strict: true }, { message: MOMENT_MESSAGE })
|
||||
@Matches(WITH_OFFSET, { message: MOMENT_MESSAGE })
|
||||
from: string;
|
||||
|
||||
/** Конец видимой сетки календаря, не включительно */
|
||||
@IsISO8601({ strict: true }, { message: MOMENT_MESSAGE })
|
||||
@Matches(WITH_OFFSET, { message: MOMENT_MESSAGE })
|
||||
to: string;
|
||||
|
||||
@StringDecorator({ isOptional: true })
|
||||
projectId?: string;
|
||||
|
||||
@StringDecorator({ isOptional: true })
|
||||
assigneeId?: string;
|
||||
|
||||
@IssueStatusListDecorator()
|
||||
status?: string[];
|
||||
}
|
||||
Reference in new issue
Block a user