-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathcreate-measurement-period.dto.ts
47 lines (42 loc) · 1.43 KB
/
create-measurement-period.dto.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { ApiProperty } from "@nestjs/swagger";
import { IsDateString, IsOptional, IsString } from "class-validator";
export class CreateMeasurementPeriodDto {
@ApiProperty({
type: String,
description:
"Unique identifier (relative to the proposal) of a MeasurementPeriod",
})
@IsString()
@IsOptional()
id?: string;
@ApiProperty({
type: String,
required: true,
description:
"Instrument or beamline identifier where measurement was pursued, e.g. /PSI/SLS/TOMCAT",
})
@IsString()
readonly instrument: string;
@ApiProperty({
type: Date,
description:
"Time when measurement period started, format according to chapter 5.6 internet date/time format in RFC 3339. Local times without timezone/offset info are automatically transformed to UTC using the timezone of the API server.",
})
@IsDateString()
readonly start: Date;
@ApiProperty({
type: Date,
description:
"Time when measurement period ended, format according to chapter 5.6 internet date/time format in RFC 3339. Local times without timezone/offset info are automatically transformed to UTC using the timezone of the API server.",
})
@IsDateString()
readonly end: Date;
@ApiProperty({
type: String,
description:
"Additional information relevant for this measurement period, e.g. if different accounts were used for data taking.",
})
@IsOptional()
@IsString()
readonly comment?: string;
}