update: add new fields
This commit is contained in:
@@ -12,7 +12,13 @@ const insertTagsSchema = Joi.object({
|
|||||||
data_type: Joi.string().max(50).required(),
|
data_type: Joi.string().max(50).required(),
|
||||||
unit: Joi.string().max(50).required(),
|
unit: Joi.string().max(50).required(),
|
||||||
sub_section_id: Joi.number().optional(),
|
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({
|
const updateTagsSchema = Joi.object({
|
||||||
@@ -24,6 +30,12 @@ const updateTagsSchema = Joi.object({
|
|||||||
unit: Joi.string().max(50),
|
unit: Joi.string().max(50),
|
||||||
is_alarm: Joi.boolean().optional(),
|
is_alarm: Joi.boolean().optional(),
|
||||||
sub_section_id: Joi.number().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);
|
}).min(1);
|
||||||
|
|
||||||
// ✅ Export dengan CommonJS
|
// ✅ Export dengan CommonJS
|
||||||
|
|||||||
Reference in New Issue
Block a user