/**
 * @openapi
 * /api/messages:
 *   get:
 *     tags: [Messages]
 *     summary: List messages (tenant-scoped)
 *     description: Requires READ_MESSAGES.
 *     responses:
 *       200:
 *         description: List payload.
 *         content:
 *           application/json:
 *             schema: { $ref: '#/components/schemas/ListResponse' }
 *       401: { $ref: '#/components/responses/UnauthorizedError' }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 *   post:
 *     tags: [Messages]
 *     summary: Create a messages record
 *     description: Requires CREATE_MESSAGES.
 *     responses:
 *       200: { description: Created. }
 *       400: { $ref: '#/components/responses/ValidationError' }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 * /api/messages/count:
 *   get:
 *     tags: [Messages]
 *     summary: Count messages
 *     description: Requires READ_MESSAGES.
 *     responses:
 *       200: { description: Count. }
 * /api/messages/autocomplete:
 *   get:
 *     tags: [Messages]
 *     summary: Autocomplete messages
 *     description: Requires READ_MESSAGES.
 *     responses:
 *       200: { description: Autocomplete results. }
 * /api/messages/bulk-import:
 *   post:
 *     tags: [Messages]
 *     summary: Bulk-import messages from CSV
 *     description: Requires CREATE_MESSAGES.
 *     responses:
 *       200: { description: Imported. }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 * /api/messages/deleteByIds:
 *   post:
 *     tags: [Messages]
 *     summary: Delete multiple messages records
 *     description: Requires DELETE_MESSAGES.
 *     responses:
 *       200: { description: Deleted. }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 * /api/messages/{id}:
 *   get:
 *     tags: [Messages]
 *     summary: Get a messages record by id
 *     description: Requires READ_MESSAGES.
 *     parameters:
 *       - in: path
 *         name: id
 *         required: true
 *         schema: { type: string, format: uuid }
 *     responses:
 *       200: { description: The record. }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 *       404: { description: Not found. }
 *   put:
 *     tags: [Messages]
 *     summary: Update a messages record
 *     description: Requires UPDATE_MESSAGES.
 *     parameters:
 *       - in: path
 *         name: id
 *         required: true
 *         schema: { type: string, format: uuid }
 *     responses:
 *       200: { description: Updated. }
 *       400: { $ref: '#/components/responses/ValidationError' }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 *   delete:
 *     tags: [Messages]
 *     summary: Delete a messages record
 *     description: Requires DELETE_MESSAGES.
 *     parameters:
 *       - in: path
 *         name: id
 *         required: true
 *         schema: { type: string, format: uuid }
 *     responses:
 *       200: { description: Deleted. }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 */
import controller from '@/api/controllers/messages.controller';
import { createCrudRouter } from '@/api/http/crud-router';

export default createCrudRouter(controller, { permission: 'messages' });
