// ========================
// Device Validation

const Joi = require("joi");

// ========================
const insertRolesSchema = Joi.object({
    role_name: Joi.string().max(100).required(),
    role_level: Joi.number().required(),
    role_description: Joi.string().max(100).required(),
    is_active: Joi.boolean().required(),
});

const updateRolesSchema = Joi.object({
    role_name: Joi.string().max(100).optional(),
    role_level: Joi.number().optional(),
    role_description: Joi.string().max(100).optional(),
    is_active: Joi.boolean().optional()
}).min(1);


// ✅ Export dengan CommonJS
module.exports = {
    insertRolesSchema, updateRolesSchema
};