const stageProperties = {
  name: { type: 'string', minLength: 1 },
  color: { type: 'string', minLength: 1 },
  idleThresholdMinutes: { type: 'integer', minimum: 1 },
};

export const createStageSchema = {
  body: {
    type: 'object',
    required: ['name', 'color'],
    properties: stageProperties,
  },
};

export const updateStageSchema = {
  body: {
    type: 'object',
    properties: stageProperties,
  },
};

export const reorderStageSchema = {
  body: {
    type: 'object',
    required: ['orderedIds'],
    properties: {
      orderedIds: { type: 'array', items: { type: 'string' }, minItems: 1 },
    },
  },
};
