device.status.dto.ts
1.05 KB
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
48
import { IsString, IsNumber, IsNotEmpty, MaxLength, IsMobilePhone, IsOptional } from 'class-validator'
import { ApiProperty } from '@nestjs/swagger'
export class DeviceStatusDto {
@ApiProperty({
type: Number,
description: '设备ID',
required: true,
})
@IsNumber({}, { message: '设备ID必须是数字' })
@IsNotEmpty({ message: '设备ID不能为空' })
device_id: number
@ApiProperty({
type: Number,
description: '设备状态',
required: false,
})
status?: number
@ApiProperty({
type: String,
description: '最后一次上传日志的时间',
required: false,
})
last_log_upload_time?: string
@ApiProperty({
type: String,
description: '最后一次移除日志的时间',
required: false,
})
last_log_remove_time?: string
@ApiProperty({
type: String,
description: '最后一次登录时间',
required: false,
})
last_login_time?: string
@ApiProperty({
type: String,
description: '最后一次离线时间',
required: false,
})
last_offline_time?: string
}