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