update: tag required
This commit is contained in:
@@ -5,16 +5,16 @@ const Joi = require("joi");
|
||||
|
||||
// ========================
|
||||
const insertTagsSchema = Joi.object({
|
||||
device_id: Joi.number().optional(),
|
||||
device_id: Joi.number().required(),
|
||||
tag_name: Joi.string().max(200).required(),
|
||||
tag_number: Joi.number().required(),
|
||||
is_active: Joi.boolean().required(),
|
||||
data_type: Joi.string().max(50).required(),
|
||||
unit: Joi.string().max(50).required(),
|
||||
is_active: Joi.boolean().optional(),
|
||||
data_type: Joi.string().max(50).optional(),
|
||||
unit: Joi.string().max(50).optional(),
|
||||
sub_section_id: Joi.number().optional(),
|
||||
is_alarm: Joi.boolean().required(),
|
||||
is_report: Joi.boolean().required(),
|
||||
is_history: Joi.boolean().required(),
|
||||
is_alarm: Joi.boolean().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(),
|
||||
@@ -22,7 +22,7 @@ const insertTagsSchema = Joi.object({
|
||||
});
|
||||
|
||||
const updateTagsSchema = Joi.object({
|
||||
device_id: Joi.number(),
|
||||
device_id: Joi.number().required(),
|
||||
tag_name: Joi.string().max(200),
|
||||
tag_number: Joi.number(),
|
||||
is_active: Joi.boolean(),
|
||||
|
||||
Reference in New Issue
Block a user