feat: add optional fields listen_channel_reminder and reminder_at to device schema

This commit is contained in:
2026-04-26 13:38:33 +07:00
parent cb5e864206
commit b7fa4b3d07

View File

@@ -16,7 +16,9 @@ const insertDeviceSchema = Joi.object({
.messages({ .messages({
'string.ip': 'IP address must be a valid IPv4 or IPv6 address' 'string.ip': 'IP address must be a valid IPv4 or IPv6 address'
}), }),
listen_channel: Joi.string().max(100).required() listen_channel: Joi.string().max(100).required(),
listen_channel_reminder: Joi.string().max(100).optional(),
reminder_at: Joi.date().iso().allow(null).optional()
}); });
const updateDeviceSchema = Joi.object({ const updateDeviceSchema = Joi.object({
@@ -30,7 +32,10 @@ const updateDeviceSchema = Joi.object({
.messages({ .messages({
'string.ip': 'IP address must be a valid IPv4 or IPv6 address' 'string.ip': 'IP address must be a valid IPv4 or IPv6 address'
}), }),
listen_channel: Joi.string().max(100) listen_channel: Joi.string().max(100),
listen_channel_reminder: Joi.string().max(100).optional(),
reminder_at: Joi.date().iso().allow(null).optional()
}).min(1); }).min(1);