From 0de69aa219c4be6ea1770ed336ac29363872ad2c Mon Sep 17 00:00:00 2001 From: Antony Kurniawan Date: Mon, 20 Oct 2025 16:55:35 +0700 Subject: [PATCH] update: add new fields --- validate/tags.schema.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/validate/tags.schema.js b/validate/tags.schema.js index 29563f1..7dec8f7 100644 --- a/validate/tags.schema.js +++ b/validate/tags.schema.js @@ -12,7 +12,13 @@ const insertTagsSchema = Joi.object({ data_type: Joi.string().max(50).required(), unit: Joi.string().max(50).required(), sub_section_id: Joi.number().optional(), - is_alarm: Joi.boolean().required() + is_alarm: Joi.boolean().required(), + is_report: Joi.boolean().required(), + is_history: Joi.boolean().required(), + lim_low_crash: Joi.number().optional(), + lim_low: Joi.number().optional(), + lim_high: Joi.number().optional(), + lim_high_crash: Joi.number().optional(), }); const updateTagsSchema = Joi.object({ @@ -24,6 +30,12 @@ const updateTagsSchema = Joi.object({ unit: Joi.string().max(50), is_alarm: Joi.boolean().optional(), sub_section_id: Joi.number().optional(), + is_report: Joi.boolean().optional(), + is_history: Joi.boolean().optional(), + lim_low_crash: Joi.number().optional(), + lim_low: Joi.number().optional(), + lim_high: Joi.number().optional(), + lim_high_crash: Joi.number().optional(), }).min(1); // ✅ Export dengan CommonJS