ota 拓展功能-黑名单&灰色定向上线
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
const { z } = require('zod');
|
||||
|
||||
const BlackListCreateSchema = z.object({
|
||||
ota_id: z.number().int({ message: 'ota_id 须为整数' }),
|
||||
mac: z.string().min(1, 'MAC 地址不能为空').max(100, 'MAC 地址最多100字符'),
|
||||
});
|
||||
|
||||
const BlackListUpdateSchema = z.object({
|
||||
ota_id: z.number().int({ message: 'ota_id 须为整数' }).optional().nullable(),
|
||||
mac: z.string().min(1).max(100).optional().nullable(),
|
||||
});
|
||||
|
||||
module.exports = { BlackListCreateSchema, BlackListUpdateSchema };
|
||||
@@ -0,0 +1,13 @@
|
||||
const { z } = require('zod');
|
||||
|
||||
const OtaTargetDeviceCreateSchema = z.object({
|
||||
ota_id: z.number().int({ message: 'ota_id 须为整数' }),
|
||||
mac_addr: z.string().min(1, 'MAC 地址不能为空').max(17, 'MAC 地址最多17字符'),
|
||||
});
|
||||
|
||||
const OtaTargetDeviceUpdateSchema = z.object({
|
||||
ota_id: z.number().int({ message: 'ota_id 须为整数' }).optional().nullable(),
|
||||
mac_addr: z.string().min(1).max(17).optional().nullable(),
|
||||
});
|
||||
|
||||
module.exports = { OtaTargetDeviceCreateSchema, OtaTargetDeviceUpdateSchema };
|
||||
Reference in New Issue
Block a user