{
    "openapi": "3.0.0",
    "info": {
        "title": "Mesal Wellness API",
        "version": "1.0"
    },
    "servers": [
        {
            "url": "/api/basics"
        },
        {
            "url": "/"
        }
    ],
    "paths": {
        "/form-builder/elements/{id}": {
            "get": {
                "tags": [
                    "BPMS - FormBuilder - Element"
                ],
                "summary": "Get a single form element by ID",
                "operationId": "5b1ae67d1eadc860059b21f625a81dde",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Element retrieved successfully"
                    }
                }
            },
            "put": {
                "tags": [
                    "BPMS - FormBuilder - Element"
                ],
                "summary": "Update a form element",
                "operationId": "6c82e4368e0274e7c4a50af4345f7314",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "form_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "type": {
                                        "type": "string",
                                        "example": "input"
                                    },
                                    "name": {
                                        "type": "string",
                                        "example": "first_name"
                                    },
                                    "label": {
                                        "type": "string",
                                        "example": "First Name"
                                    },
                                    "placeholder": {
                                        "type": "string",
                                        "example": "Enter your name"
                                    },
                                    "default_value": {
                                        "type": "string",
                                        "example": "John"
                                    },
                                    "validations": {
                                        "type": "object",
                                        "example": {
                                            "required": true,
                                            "max": 50
                                        }
                                    },
                                    "options": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "example": [
                                            "Option1",
                                            "Option2"
                                        ]
                                    },
                                    "ui_settings": {
                                        "type": "object",
                                        "example": {
                                            "class": "form-control"
                                        }
                                    },
                                    "visibility_rules": {
                                        "type": "object",
                                        "example": {
                                            "depends_on": "age",
                                            "value": 18
                                        }
                                    },
                                    "element_order": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "is_required": {
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Element updated successfully"
                    }
                }
            },
            "delete": {
                "tags": [
                    "BPMS - FormBuilder - Element"
                ],
                "summary": "Delete a form element",
                "operationId": "44549f9e0223335f99a596595f437c96",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Element deleted successfully"
                    }
                }
            }
        },
        "/form-builder/elements": {
            "get": {
                "tags": [
                    "BPMS - FormBuilder - Element"
                ],
                "summary": "List all elements of a form",
                "operationId": "7eaf461f298f77932cf7475b0056d0a2",
                "parameters": [
                    {
                        "name": "form_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Elements retrieved successfully"
                    }
                }
            },
            "post": {
                "tags": [
                    "BPMS - FormBuilder - Element"
                ],
                "summary": "Create a new form element",
                "operationId": "01792ac972f0e0e6edfbba6f14d105bd",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "form_id",
                                    "type",
                                    "name",
                                    "label"
                                ],
                                "properties": {
                                    "form_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "type": {
                                        "type": "string",
                                        "example": "input"
                                    },
                                    "name": {
                                        "type": "string",
                                        "example": "first_name"
                                    },
                                    "label": {
                                        "type": "string",
                                        "example": "First Name"
                                    },
                                    "placeholder": {
                                        "type": "string",
                                        "example": "Enter your name"
                                    },
                                    "default_value": {
                                        "type": "string",
                                        "example": "John"
                                    },
                                    "validations": {
                                        "type": "object",
                                        "example": {
                                            "required": true,
                                            "max": 50
                                        }
                                    },
                                    "options": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "example": [
                                            "Option1",
                                            "Option2"
                                        ]
                                    },
                                    "ui_settings": {
                                        "type": "object",
                                        "example": {
                                            "class": "form-control"
                                        }
                                    },
                                    "visibility_rules": {
                                        "type": "object",
                                        "example": {
                                            "depends_on": "age",
                                            "value": 18
                                        }
                                    },
                                    "element_order": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "is_required": {
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Element created successfully"
                    }
                }
            }
        },
        "/form-builder/forms/{id}": {
            "put": {
                "tags": [
                    "BPMS - FormBuilder - Form"
                ],
                "summary": "Update form",
                "description": "Updates an existing form with the provided attributes.",
                "operationId": "updateForm",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the form to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": "1"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "id",
                                    "title"
                                ],
                                "properties": {
                                    "id": {
                                        "description": "id of the form",
                                        "type": "integer",
                                        "example": "123"
                                    },
                                    "title": {
                                        "description": "title of form",
                                        "type": "string",
                                        "example": "form 1"
                                    },
                                    "description": {
                                        "description": "description about the form",
                                        "type": "string",
                                        "example": "this form is for sending some data"
                                    },
                                    "elements": {
                                        "description": "List of form elements",
                                        "type": "array",
                                        "items": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "example": "text"
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "example": "First Name"
                                                },
                                                "required": {
                                                    "type": "boolean",
                                                    "example": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid input data"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Form not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Form not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "BPMS - FormBuilder - Form"
                ],
                "summary": "Delete formbuilder form",
                "description": "Deletes a formbuilder form and all its associated data using its id.",
                "operationId": "deleteForm",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the formbuilder form to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "formbuilder form deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    },
                    "404": {
                        "description": "formbuilder form not found"
                    }
                }
            }
        },
        "/form-builder/forms/{form}/submit": {
            "post": {
                "tags": [
                    "BPMS - FormBuilder - Form"
                ],
                "summary": "Submit a form and trigger workflow",
                "description": "Submit a form entry and automatically start related workflow(s) if start conditions are met",
                "operationId": "submitFormEntry",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "form_id",
                                    "data"
                                ],
                                "properties": {
                                    "form_id": {
                                        "description": "ID of the form being submitted",
                                        "type": "integer",
                                        "example": 12
                                    },
                                    "data": {
                                        "description": "Key-value pair of submitted form fields",
                                        "type": "object",
                                        "example": {
                                            "full_name": "John Doe",
                                            "email": "john@example.com",
                                            "request_type": "vacation"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Form submitted successfully and workflow triggered",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "entry": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 55
                                                },
                                                "form_id": {
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "employee_id": {
                                                    "type": "integer",
                                                    "example": 7
                                                },
                                                "workflow_instance_id": {
                                                    "type": "integer",
                                                    "example": 101
                                                },
                                                "data": {
                                                    "type": "object",
                                                    "example": {
                                                        "full_name": "John Doe",
                                                        "email": "john@example.com"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "فرم با موفقیت ثبت و گردش‌کار آغاز شد."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation failed"
                    }
                }
            }
        },
        "/form-builder/forms": {
            "get": {
                "tags": [
                    "BPMS - FormBuilder - Form"
                ],
                "summary": "List of formbuilder forms",
                "description": "Fetches a list of all available formbuilder forms.",
                "operationId": "listForms",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid request"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "BPMS - FormBuilder - Form"
                ],
                "summary": "Store formbuilder form",
                "description": "Creates a new formbuilder form with the provided attributes.",
                "operationId": "storeForm",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title"
                                ],
                                "properties": {
                                    "title": {
                                        "description": "title of form",
                                        "type": "string",
                                        "example": "form 1"
                                    },
                                    "description": {
                                        "description": "descripion about the form",
                                        "type": "string",
                                        "example": "this form is for sending some data"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid input data"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Validation error"
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/form-builder/forms/create": {
            "get": {
                "tags": [
                    "BPMS - FormBuilder - Form"
                ],
                "summary": "Get forms Create Data",
                "description": "Fetches a list of Get available forms.",
                "operationId": "GetFormCreateData",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid request"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/form-builder/forms/{form}": {
            "get": {
                "tags": [
                    "BPMS - FormBuilder - Form"
                ],
                "summary": "Get A form",
                "description": "Fetches an available form.",
                "operationId": "GetForm",
                "parameters": [
                    {
                        "name": "form",
                        "in": "path",
                        "description": "ID of the form to get",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": "1"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid request"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/companies/{company_id}": {
            "get": {
                "summary": "Get company by ID",
                "operationId": "cb34dbb516b509a9d08ba650dc4bf79b",
                "responses": {
                    "200": {
                        "description": "Company retrieved successfully"
                    }
                }
            },
            "put": {
                "summary": "Update company information",
                "operationId": "6a61e5483f6cee536e5ec64f1a444f59",
                "parameters": [
                    {
                        "name": "company_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "شرکت به‌روز شده"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Company updated successfully"
                    }
                }
            },
            "delete": {
                "summary": "Delete company (soft delete)",
                "operationId": "0b9fa907d1713a60991a9dea1a96b088",
                "parameters": [
                    {
                        "name": "company_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Company deleted successfully"
                    }
                }
            }
        },
        "/companies": {
            "get": {
                "summary": "List all companies",
                "operationId": "31c1ffc3c6c588c085fa2531ec2f7812",
                "responses": {
                    "200": {
                        "description": "Companies list retrieved successfully"
                    }
                }
            },
            "post": {
                "summary": "Create new company",
                "description": "ثبت شرکت جدید",
                "operationId": "storeCompany",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "شرکت نمونه"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Company created successfully"
                    }
                }
            }
        },
        "/companies/create": {
            "get": {
                "summary": "Get reference data for creating a company",
                "operationId": "a5e657c6f93d5b1c4ce3b78993e953f2",
                "responses": {
                    "200": {
                        "description": "Reference data retrieved"
                    }
                }
            }
        },
        "/companies/report": {
            "get": {
                "tags": [
                    "Basics - Company"
                ],
                "summary": "Get Company Report with comprehensive metrics",
                "operationId": "67288b8c62f73b0ac7673c410113a23d",
                "parameters": [
                    {
                        "name": "contract_status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "active",
                                "expired",
                                "upcoming"
                            ]
                        }
                    },
                    {
                        "name": "booking_status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "contract_start_from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "contract_start_to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "contract_end_from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "contract_end_to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "booking_start_from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "booking_start_to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "min_revenue",
                        "in": "query",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "max_revenue",
                        "in": "query",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "has_contracts",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "has_bookings",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort_by",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "default": "id"
                        }
                    },
                    {
                        "name": "sort_direction",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "default": "desc",
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/companies/report/create-data": {
            "get": {
                "tags": [
                    "Basics - Company"
                ],
                "summary": "Reference data for Company report filters",
                "operationId": "4741ad73a9ee0cfe6f047970bb79ccdc",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/contracts/{contract_id}": {
            "get": {
                "summary": "Get contract by ID",
                "operationId": "4154a2a7efcf972d19ddcf1c41657280",
                "responses": {
                    "200": {
                        "description": "Contract retrieved successfully"
                    }
                }
            },
            "put": {
                "summary": "Update contract information",
                "operationId": "fc27253080f1abc6ba14636cd0568e94",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "company_id": {
                                        "type": "integer",
                                        "example": 2
                                    },
                                    "start_at": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2025-02-01"
                                    },
                                    "finished_at": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2026-01-31"
                                    },
                                    "discount_percent": {
                                        "type": "number",
                                        "format": "float",
                                        "example": "20.00"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Contract updated successfully"
                    }
                }
            },
            "delete": {
                "summary": "Delete contract (soft delete)",
                "operationId": "a4f9251eb8b36d209f468535f5f5dd95",
                "parameters": [
                    {
                        "name": "contract_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Contract deleted successfully"
                    }
                }
            }
        },
        "/contracts": {
            "get": {
                "summary": "List all contracts",
                "operationId": "7cd2f20eda99ebf7298a78ed6af55e36",
                "responses": {
                    "200": {
                        "description": "Contracts list retrieved successfully"
                    }
                }
            },
            "post": {
                "summary": "Create new contract",
                "description": "ثبت قرارداد جدید",
                "operationId": "storeContract",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "company_id",
                                    "start_at",
                                    "finished_at"
                                ],
                                "properties": {
                                    "company_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "start_at": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2025-01-01"
                                    },
                                    "finished_at": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2025-12-31"
                                    },
                                    "discount_percent": {
                                        "type": "number",
                                        "format": "float",
                                        "example": "15.50"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Contract created successfully"
                    }
                }
            }
        },
        "/contracts/create": {
            "get": {
                "summary": "Get reference data for creating a contract",
                "operationId": "9628d358c090378b59e447c42122a39b",
                "responses": {
                    "200": {
                        "description": "Reference data retrieved"
                    }
                }
            }
        },
        "/dashboard/getData": {
            "get": {
                "tags": [
                    "Basics - Dashboard"
                ],
                "summary": "دریافت داده‌های داشبورد",
                "description": "این API اطلاعات داشبورد شامل آمارهای کلی، لیست رزروهای اخیر و مشتریان اخیر را برمی‌گرداند.",
                "operationId": "969da2cec04603e4dd212ebe8ea207ca",
                "responses": {
                    "200": {
                        "description": "لیست داده‌های داشبورد",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "widgets": {
                                            "properties": {
                                                "tiles": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "title": {
                                                                "type": "string",
                                                                "example": "مشتریان"
                                                            },
                                                            "value": {
                                                                "type": "integer",
                                                                "example": 152
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "lists": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "title": {
                                                                "type": "string",
                                                                "example": "آخرین رزروها"
                                                            },
                                                            "width": {
                                                                "type": "integer",
                                                                "example": 6
                                                            },
                                                            "data": {
                                                                "type": "array",
                                                                "items": {
                                                                    "$ref": "object"
                                                                }
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acl/permissions": {
            "get": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Get all permissions",
                "description": "Retrieve a list of all permissions defined in the system",
                "operationId": "getAllPermissions",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "object"
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            },
            "post": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Create permission",
                "description": "Create a permission",
                "operationId": "createpermission",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "save-widget"
                                    },
                                    "title": {
                                        "type": "string",
                                        "example": "ذخیره ویجت"
                                    },
                                    "type": {
                                        "type": "string",
                                        "example": "store"
                                    },
                                    "is_global": {
                                        "type": "boolean",
                                        "example": "true"
                                    },
                                    "group": {
                                        "type": "numeric",
                                        "example": "7"
                                    },
                                    "module_name": {
                                        "type": "string",
                                        "example": "Widget"
                                    },
                                    "action_class": {
                                        "type": "string",
                                        "example": "StoreWidget"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "permission created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/acl/permissions/{id}": {
            "put": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Update a permission",
                "description": "Update the title and global status of a permission",
                "operationId": "UpdatePermission",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the permission to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title",
                                    "is_global"
                                ],
                                "properties": {
                                    "title": {
                                        "description": "Title of the permission",
                                        "type": "string",
                                        "example": "Manage Users"
                                    },
                                    "is_global": {
                                        "description": "Whether this permission is global",
                                        "type": "boolean",
                                        "example": false
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Permission updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "permission": {
                                            "$ref": ""
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input data"
                    },
                    "404": {
                        "description": "Permission not found"
                    }
                }
            }
        },
        "/acl/permissions/create": {
            "get": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Get metadata for creating a new permission",
                "description": "Returns permissions, guards, and other data required to create a permission",
                "operationId": "getPermissionCreateData",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/acl/permissions/groups": {
            "get": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Get all permission groups",
                "description": "Retrieve a list of all permission groups in the system",
                "operationId": "getAllPermissionGroups",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "object"
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/acl/organizations/create": {
            "get": {
                "tags": [
                    "Basics - OrganizationAcl"
                ],
                "summary": "Get organization ACL create data",
                "description": "Get organization ACL create data",
                "operationId": "GetOrganizationAclCreateData",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/acl/permissions/organizations/create": {
            "get": {
                "tags": [
                    "Basics - OrganizationAcl"
                ],
                "summary": "Get organization permission create data",
                "description": "Get organization permission create data",
                "operationId": "GetOrganizationPermissionCreateData",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/acl/permissions/organizations": {
            "get": {
                "tags": [
                    "Basics - OrganizationAcl"
                ],
                "summary": "Get organization permission list",
                "description": "Get organization permission list",
                "operationId": "GetOrganizationPermissionList",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/acl/roles": {
            "get": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Get all roles",
                "description": "Retrieve all roles and their associated permissions",
                "operationId": "getAllRoles",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "object"
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            },
            "post": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Create role",
                "description": "Create a tenant role. wellness_admin and customer are reserved system roles.",
                "operationId": "createRole",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "display_name": {
                                        "description": "Required unless default_role_id is given",
                                        "type": "string",
                                        "example": "مربی یوگا"
                                    },
                                    "value": {
                                        "description": "Optional latin key; generated from display_name or the suggestion when omitted",
                                        "type": "string",
                                        "example": "yoga_instructor"
                                    },
                                    "default_role_id": {
                                        "description": "Optional superadmin suggestion to pre-fill from",
                                        "type": "integer",
                                        "example": 7,
                                        "nullable": true
                                    },
                                    "is_service_provider": {
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "parent_id": {
                                        "type": "integer",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Role created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Delete role",
                "description": "Get role via 'id' field then delete it",
                "operationId": "deleteRole",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "id"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "integer",
                                        "example": "1"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/acl/roles/permissions": {
            "post": {
                "tags": [
                    "Basics - OrganizationAcl"
                ],
                "summary": "Create permission for role",
                "description": "Create permission for role",
                "operationId": "CreatePermissionForRole",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "permissions"
                                ],
                                "properties": {
                                    "permissions": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": "view otp codes"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/acl/roles/{id}/employees": {
            "post": {
                "tags": [
                    "Basics - OrganizationAcl"
                ],
                "summary": "Create employee for role",
                "description": "Create employee for role",
                "operationId": "CreateemployeeForRole",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "employees"
                                ],
                                "properties": {
                                    "employees": {
                                        "type": "array",
                                        "items": {
                                            "type": "integer",
                                            "example": "1"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/acl/roles/{id}/widgets": {
            "post": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Assign widgets to a role",
                "description": "Assigns or updates widgets for a specific role, including their order, enabled status, and config if available.",
                "operationId": "storeWidgetForRole",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the role",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 3
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "widgets"
                                ],
                                "properties": {
                                    "widgets": {
                                        "description": "List of widgets with their metadata",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "id"
                                            ],
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "enabled": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "order": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "config": {
                                                    "type": "object",
                                                    "example": {
                                                        "limit": 5,
                                                        "filter": "recent"
                                                    },
                                                    "nullable": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Widgets assigned to role successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "role": {
                                            "$ref": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Role not found"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/acl/roles/{id}": {
            "put": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Update role",
                "description": "Update a tenant role. System roles (wellness_admin, customer) answer 403.",
                "operationId": "updateRole",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the role to update",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "value": {
                                        "type": "string",
                                        "example": "yoga_instructor"
                                    },
                                    "display_name": {
                                        "type": "string",
                                        "example": "مربی یوگا"
                                    },
                                    "is_service_provider": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Role updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "System role is read-only"
                    }
                }
            }
        },
        "/acl/roles/create": {
            "get": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Get metadata for creating a new role",
                "description": "Returns permissions, guards, and other data required to create a role",
                "operationId": "getRoleCreateData",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/acl/roles/{role}": {
            "get": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Get role details",
                "description": "Retrieve a role and its associated permissions",
                "operationId": "getRole",
                "parameters": [
                    {
                        "name": "role",
                        "in": "path",
                        "description": "ID of the role",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 2
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    },
                    "404": {
                        "description": "Role not found"
                    }
                }
            }
        },
        "/acl/{role_id}/permissions": {
            "get": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Get role permissions",
                "description": "Retrieves all permissions assigned to a specific role",
                "operationId": "getRolePermissions",
                "parameters": [
                    {
                        "name": "role_id",
                        "in": "path",
                        "description": "Role ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Permissions retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "view_users"
                                                    },
                                                    "guard_name": {
                                                        "type": "string",
                                                        "example": "api"
                                                    },
                                                    "display_name": {
                                                        "type": "string",
                                                        "example": "View Users"
                                                    },
                                                    "description": {
                                                        "type": "string",
                                                        "example": "Can view user list"
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-01-15T10:30:00.000000Z"
                                                    },
                                                    "updated_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-01-15T10:30:00.000000Z"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid role ID"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Role not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Role not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/acl/{role_id}/widgets": {
            "get": {
                "tags": [
                    "Basics - ACL"
                ],
                "summary": "Get role widgets",
                "description": "Retrieves all widgets assigned to a specific role",
                "operationId": "getRoleWidgets",
                "parameters": [
                    {
                        "name": "role_id",
                        "in": "path",
                        "description": "Role ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "format": "int64",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Widgets retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "dashboard_stats"
                                                    },
                                                    "title": {
                                                        "type": "string",
                                                        "example": "Dashboard Statistics"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "example": "chart"
                                                    },
                                                    "component": {
                                                        "type": "string",
                                                        "example": "StatsWidget"
                                                    },
                                                    "order": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "is_active": {
                                                        "type": "boolean",
                                                        "example": true
                                                    },
                                                    "config": {
                                                        "type": "object",
                                                        "example": {
                                                            "color": "blue",
                                                            "size": "medium"
                                                        }
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-01-15T10:30:00.000000Z"
                                                    },
                                                    "updated_at": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-01-15T10:30:00.000000Z"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid role ID"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Role not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Role not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/auth/user": {
            "post": {
                "tags": [
                    "Authentication"
                ],
                "summary": "Set user's organization context and retrieve authenticated user data",
                "description": "Sets the active organization and fiscal year for the authenticated user, then returns complete user context including employee details and roles",
                "operationId": "setUserContext",
                "requestBody": {
                    "description": "Organization and fiscal year selection",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "organization_id"
                                ],
                                "properties": {
                                    "organization_id": {
                                        "description": "ID of the organization to set as active context",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "fiscal_year_id": {
                                        "description": "ID of the fiscal year to set as active (optional, defaults to organization's default fiscal year)",
                                        "type": "integer",
                                        "example": 5,
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "User context set successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "user": {
                                                    "description": "Authenticated user minimal information",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 2
                                                        },
                                                        "mobile": {
                                                            "type": "string",
                                                            "example": "09123456789"
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "John Doe"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "organization": {
                                                    "description": "Selected organization minimal information",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "Acme Corporation"
                                                        },
                                                        "code": {
                                                            "type": "string",
                                                            "example": "ACME001"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "employee": {
                                                    "description": "Employee record for user in selected organization",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 15
                                                        },
                                                        "employee_code": {
                                                            "type": "string",
                                                            "example": "EMP-001"
                                                        },
                                                        "full_name": {
                                                            "type": "string",
                                                            "example": "John Doe"
                                                        },
                                                        "position": {
                                                            "type": "string",
                                                            "example": "Software Engineer"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "organization_id": {
                                                    "description": "Active organization ID",
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "fiscal_year_id": {
                                                    "description": "Active fiscal year ID",
                                                    "type": "integer",
                                                    "example": 5,
                                                    "nullable": true
                                                },
                                                "roles": {
                                                    "description": "User's roles in the selected organization",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "example": [
                                                        "Admin",
                                                        "HR Manager"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated - Invalid or missing JWT token",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "example": "Unauthorized"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "User not authenticated"
                                        },
                                        "code": {
                                            "type": "string",
                                            "example": "UNAUTHENTICATED"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Resource not found - Organization or employee not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "example": "Not Found"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "No query results for model [Organization]"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error - Invalid input data",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "properties": {
                                                "organization_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "example": [
                                                        "The organization id field is required."
                                                    ]
                                                },
                                                "fiscal_year_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "example": [
                                                        "The selected fiscal year id is invalid."
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "example": "Internal Server Error"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "An unexpected error occurred"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "jwt": []
                    }
                ]
            }
        },
        "/plans/{id}": {
            "get": {
                "tags": [
                    "Basics - Plans"
                ],
                "summary": "Get plan details",
                "description": "Retrieves a specific subscription plan with its tiered pricing details.",
                "operationId": "getPlan",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the plan to retrieve",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Plan retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "plan": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "Basic Plan"
                                                        },
                                                        "slug": {
                                                            "type": "string",
                                                            "example": "basic"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "example": "Basic plan for small organizations",
                                                            "nullable": true
                                                        },
                                                        "duration_days": {
                                                            "type": "integer",
                                                            "example": 30
                                                        },
                                                        "duration_label": {
                                                            "type": "string",
                                                            "example": "Monthly"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean",
                                                            "example": true
                                                        },
                                                        "sort": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "created_at": {
                                                            "type": "string",
                                                            "format": "datetime",
                                                            "example": "2026-09-06T10:30:00.000000Z"
                                                        },
                                                        "updated_at": {
                                                            "type": "string",
                                                            "format": "datetime",
                                                            "example": "2026-09-06T10:30:00.000000Z"
                                                        },
                                                        "tiers": {
                                                            "description": "List of pricing tiers for this plan",
                                                            "type": "array",
                                                            "items": {
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer",
                                                                        "example": 1
                                                                    },
                                                                    "plan_id": {
                                                                        "type": "integer",
                                                                        "example": 1
                                                                    },
                                                                    "min_users": {
                                                                        "description": "Minimum number of users",
                                                                        "type": "integer",
                                                                        "example": 1
                                                                    },
                                                                    "max_users": {
                                                                        "description": "Maximum number of users (null = unlimited)",
                                                                        "type": "integer",
                                                                        "example": 10,
                                                                        "nullable": true
                                                                    },
                                                                    "price": {
                                                                        "description": "Price in IRR (Toman)",
                                                                        "type": "integer",
                                                                        "example": 5900
                                                                    },
                                                                    "created_at": {
                                                                        "type": "string",
                                                                        "format": "datetime",
                                                                        "example": "2026-09-06T10:30:00.000000Z"
                                                                    },
                                                                    "updated_at": {
                                                                        "type": "string",
                                                                        "format": "datetime",
                                                                        "example": "2026-09-06T10:30:00.000000Z"
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Plan not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Plan not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - User does not have permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "This action is unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Basics - Plans"
                ],
                "summary": "Update an existing plan",
                "description": "Updates a subscription plan and its tiered pricing. Tiers without ID will be created, tiers with ID will be updated, and tiers not included will be deleted.",
                "operationId": "updatePlan",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the plan to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "description": "Display name of the plan",
                                        "type": "string",
                                        "maxLength": 100,
                                        "example": "Basic Plan"
                                    },
                                    "slug": {
                                        "description": "Unique identifier slug for the plan",
                                        "type": "string",
                                        "maxLength": 100,
                                        "example": "basic"
                                    },
                                    "description": {
                                        "description": "Optional description of the plan",
                                        "type": "string",
                                        "example": "Basic plan for small organizations",
                                        "nullable": true
                                    },
                                    "duration_days": {
                                        "description": "Subscription duration in days",
                                        "type": "integer",
                                        "minimum": 1,
                                        "example": 30
                                    },
                                    "duration_label": {
                                        "description": "Human readable duration label",
                                        "type": "string",
                                        "example": "Monthly"
                                    },
                                    "is_active": {
                                        "description": "Whether the plan is active",
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "sort": {
                                        "description": "Display order for sorting plans",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "tiers": {
                                        "description": "List of pricing tiers. Include 'id' to update existing tier, omit 'id' to create new tier",
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "min_users",
                                                "price"
                                            ],
                                            "properties": {
                                                "id": {
                                                    "description": "ID of existing tier (omit for new tier)",
                                                    "type": "integer",
                                                    "example": 1,
                                                    "nullable": true
                                                },
                                                "min_users": {
                                                    "description": "Minimum number of users for this tier",
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "example": 1
                                                },
                                                "max_users": {
                                                    "description": "Maximum number of users (null = unlimited)",
                                                    "type": "integer",
                                                    "example": 10,
                                                    "nullable": true
                                                },
                                                "price": {
                                                    "description": "Price in IRR (Toman) for this tier",
                                                    "type": "integer",
                                                    "minimum": 0,
                                                    "example": 5900
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "minItems": 1
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Plan updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "plan": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "Basic Plan"
                                                        },
                                                        "slug": {
                                                            "type": "string",
                                                            "example": "basic"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "duration_days": {
                                                            "type": "integer",
                                                            "example": 30
                                                        },
                                                        "duration_label": {
                                                            "type": "string",
                                                            "example": "Monthly"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean",
                                                            "example": true
                                                        },
                                                        "sort": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "tiers": {
                                                            "type": "array",
                                                            "items": {
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer",
                                                                        "example": 1
                                                                    },
                                                                    "plan_id": {
                                                                        "type": "integer",
                                                                        "example": 1
                                                                    },
                                                                    "min_users": {
                                                                        "type": "integer",
                                                                        "example": 1
                                                                    },
                                                                    "max_users": {
                                                                        "type": "integer",
                                                                        "example": 10,
                                                                        "nullable": true
                                                                    },
                                                                    "price": {
                                                                        "type": "integer",
                                                                        "example": 5900
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Plan not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Plan not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "properties": {
                                                "name": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The name field is required."
                                                    }
                                                },
                                                "slug": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The slug has already been taken."
                                                    }
                                                },
                                                "tiers.*.min_users": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The tiers.0.min_users must be at least 1."
                                                    }
                                                },
                                                "tiers.*.price": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The tiers.0.price must be at least 0."
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - User does not have permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "This action is unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/plans": {
            "get": {
                "tags": [
                    "Plans"
                ],
                "summary": "Get list of all plans",
                "description": "Retrieves a list of all active subscription plans with their tiered pricing details, sorted by display order.",
                "operationId": "getPlanList",
                "responses": {
                    "200": {
                        "description": "List of plans retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "plans": {
                                                    "description": "List of all active plans",
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "Basic Plan"
                                                            },
                                                            "slug": {
                                                                "type": "string",
                                                                "example": "basic"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "Basic plan for small organizations",
                                                                "nullable": true
                                                            },
                                                            "duration_days": {
                                                                "type": "integer",
                                                                "example": 30
                                                            },
                                                            "duration_label": {
                                                                "type": "string",
                                                                "example": "Monthly"
                                                            },
                                                            "is_active": {
                                                                "type": "boolean",
                                                                "example": true
                                                            },
                                                            "sort": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "created_at": {
                                                                "type": "string",
                                                                "format": "datetime",
                                                                "example": "2026-09-06T10:30:00.000000Z"
                                                            },
                                                            "updated_at": {
                                                                "type": "string",
                                                                "format": "datetime",
                                                                "example": "2026-09-06T10:30:00.000000Z"
                                                            },
                                                            "tiers": {
                                                                "description": "Pricing tiers for this plan",
                                                                "type": "array",
                                                                "items": {
                                                                    "properties": {
                                                                        "id": {
                                                                            "type": "integer",
                                                                            "example": 1
                                                                        },
                                                                        "plan_id": {
                                                                            "type": "integer",
                                                                            "example": 1
                                                                        },
                                                                        "min_users": {
                                                                            "type": "integer",
                                                                            "example": 1
                                                                        },
                                                                        "max_users": {
                                                                            "type": "integer",
                                                                            "example": 10,
                                                                            "nullable": true
                                                                        },
                                                                        "price": {
                                                                            "type": "integer",
                                                                            "example": 5900
                                                                        },
                                                                        "created_at": {
                                                                            "type": "string",
                                                                            "format": "datetime",
                                                                            "example": "2026-09-06T10:30:00.000000Z"
                                                                        },
                                                                        "updated_at": {
                                                                            "type": "string",
                                                                            "format": "datetime",
                                                                            "example": "2026-09-06T10:30:00.000000Z"
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - User does not have permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "This action is unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/plans/price": {
            "get": {
                "tags": [
                    "Basics - Plans"
                ],
                "summary": "Calculate plan price based on user count",
                "description": "Calculates the appropriate tier price for a plan based on the number of users. Returns the matching tier with formatted price.",
                "operationId": "getPlanPrice",
                "parameters": [
                    {
                        "name": "plan_id",
                        "in": "query",
                        "description": "ID of the plan to calculate price for",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    },
                    {
                        "name": "user_count",
                        "in": "query",
                        "description": "Number of users to calculate price for (default: 1)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "example": 15
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Price calculated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "plan": {
                                                    "description": "Name of the plan",
                                                    "type": "string",
                                                    "example": "Basic Plan"
                                                },
                                                "user_count": {
                                                    "description": "Number of users provided",
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "tier": {
                                                    "description": "Matching price tier for the user count",
                                                    "properties": {
                                                        "min_users": {
                                                            "description": "Minimum number of users for this tier",
                                                            "type": "integer",
                                                            "example": 11
                                                        },
                                                        "max_users": {
                                                            "description": "Maximum number of users for this tier (null = unlimited)",
                                                            "type": "integer",
                                                            "example": 20,
                                                            "nullable": true
                                                        },
                                                        "price": {
                                                            "description": "Price in IRR (Toman)",
                                                            "type": "integer",
                                                            "example": 7900
                                                        },
                                                        "formatted": {
                                                            "description": "Formatted price with currency",
                                                            "type": "string",
                                                            "example": "7,900 تومان"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Plan not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Plan not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error or no matching tier",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "properties": {
                                                "plan_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The plan id field is required."
                                                    }
                                                },
                                                "user_count": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The user count must be at least 1."
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - User does not have permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "This action is unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/menus/{menu_id}": {
            "put": {
                "tags": [
                    "Basics - Menu"
                ],
                "summary": "Update menu",
                "description": "Get menu with menu_id and update menu with 'title', 'slug', 'description', 'url', 'priority', 'parent_id' fields and returns it",
                "operationId": "updateCategory",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "menu_id",
                                    "title",
                                    "slug",
                                    "description",
                                    "url",
                                    "priority",
                                    "parent_id"
                                ],
                                "properties": {
                                    "menu_id": {
                                        "type": "integer",
                                        "example": "1"
                                    },
                                    "title": {
                                        "type": "string",
                                        "example": "Test Menu"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "example": "test-menu"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "this is test description"
                                    },
                                    "url": {
                                        "type": "integer",
                                        "example": "/categories/test"
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "example": "1"
                                    },
                                    "parent_id": {
                                        "type": "integer",
                                        "example": "null|[0,...]"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Basics - Menu"
                ],
                "summary": "Delete menu",
                "description": "Get menu with menu_id and delete menu with it's children",
                "operationId": "deleteCategory",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "menu_id"
                                ],
                                "properties": {
                                    "menu_id": {
                                        "type": "integer",
                                        "example": "1"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/menus": {
            "get": {
                "tags": [
                    "Basics - Menu"
                ],
                "summary": "Get all menus",
                "description": "Retrieve all menus with their nested children",
                "operationId": "getAllCategories",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/MenuResource"
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            },
            "post": {
                "tags": [
                    "Basics - Menu"
                ],
                "summary": "Create menu",
                "description": "Create menu with 'title', 'slug', 'description', 'url', 'priority', 'parent_id' fields and returns it",
                "operationId": "createCategory",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title",
                                    "slug",
                                    "description",
                                    "url",
                                    "priority",
                                    "parent_id"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "Test Menu"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "example": "test-menu"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "this is test description"
                                    },
                                    "url": {
                                        "type": "integer",
                                        "example": "/categories/test"
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "example": "1"
                                    },
                                    "parent_id": {
                                        "type": "integer",
                                        "example": "null|[0,...]"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/menus/create": {
            "get": {
                "tags": [
                    "Basics - Menu"
                ],
                "summary": "Get all menu create data",
                "description": "Get all menu create data",
                "operationId": "getCategoryCreateData",
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/menus/{menu_id}/get": {
            "get": {
                "tags": [
                    "Basics - Menu"
                ],
                "summary": "Get menu info",
                "description": "Get menu by id",
                "operationId": "getCategory",
                "parameters": [
                    {
                        "name": "menu_id",
                        "in": "path",
                        "description": "Menu ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": ""
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            }
        },
        "/widgets/assign-widget-to-role": {
            "get": {
                "tags": [
                    "Basics - Widgets"
                ],
                "summary": "Get list of widget allowed roles",
                "description": "Retrieves a paginated list of all widget-role assignments with their details.",
                "operationId": "getWidgetAllowedRoleList",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number for pagination",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Number of items per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 15
                        }
                    },
                    {
                        "name": "sort_by",
                        "in": "query",
                        "description": "Field to sort by",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "widget_id",
                                "role_id",
                                "created_at"
                            ],
                            "example": "id"
                        }
                    },
                    {
                        "name": "sort_direction",
                        "in": "query",
                        "description": "Sort direction",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "example": "desc"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search term for filtering",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "admin"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "columns": {
                                            "description": "List of table columns with their configuration",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "key": {
                                                        "type": "string",
                                                        "example": "id"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "ID"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "example": "number"
                                                    },
                                                    "sortable": {
                                                        "type": "boolean",
                                                        "example": true
                                                    },
                                                    "filterable": {
                                                        "type": "boolean",
                                                        "example": false
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "data": {
                                            "description": "List of widget-role assignments",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "widget_id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "widget_name": {
                                                        "type": "string",
                                                        "example": "dashboard_widget"
                                                    },
                                                    "widget_title": {
                                                        "type": "string",
                                                        "example": "Dashboard Widget"
                                                    },
                                                    "role_id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "role_name": {
                                                        "type": "string",
                                                        "example": "admin"
                                                    },
                                                    "role_display_name": {
                                                        "type": "string",
                                                        "example": "Administrator"
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "datetime",
                                                        "example": "2026-09-01 10:30:00"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "paginate": {
                                            "description": "Pagination metadata",
                                            "properties": {
                                                "total": {
                                                    "type": "integer",
                                                    "example": 50
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "current_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "example": 4
                                                },
                                                "from": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "to": {
                                                    "type": "integer",
                                                    "example": 15
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - User does not have permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "This action is unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Server Error"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Basics - Widgets"
                ],
                "summary": "Assign roles to a widget",
                "description": "Assigns a list of roles to a specific widget. This will replace any previously assigned roles with the new list.",
                "operationId": "assignWidgetToRoles",
                "parameters": [
                    {
                        "name": "widget",
                        "in": "path",
                        "description": "ID of the widget to assign roles to",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "widget_id",
                                    "role_ids"
                                ],
                                "properties": {
                                    "widget_id": {
                                        "description": "ID of the widget",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "role_ids": {
                                        "description": "List of role IDs to assign to the widget",
                                        "type": "array",
                                        "items": {
                                            "type": "integer",
                                            "example": [
                                                1,
                                                2,
                                                3
                                            ]
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Roles assigned successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "widget": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "dashboard_widget"
                                                },
                                                "title": {
                                                    "type": "string",
                                                    "example": "Dashboard Widget"
                                                },
                                                "allowed_roles": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "admin"
                                                            },
                                                            "display_name": {
                                                                "type": "string",
                                                                "example": "Administrator"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The widget_id field is required."
                                        },
                                        "errors": {
                                            "properties": {
                                                "widget_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The widget_id field is required."
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - User does not have permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "This action is unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Widget or role not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "No query results for model [Widget] 1"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "properties": {
                                                "role_ids.*": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The selected role_ids.0 is invalid."
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/content/widgets/{id}": {
            "get": {
                "tags": [
                    "Basics - Widgets"
                ],
                "summary": "Get a widget",
                "description": "Fetches an existing widget by its ID.",
                "operationId": "getWidget",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the widget to fetch",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": "1"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Request processed successfully"
                    },
                    "404": {
                        "description": "Widget not found"
                    }
                }
            },
            "put": {
                "tags": [
                    "Basics - Widgets"
                ],
                "summary": "Update an existing widget",
                "description": "Updates an existing widget with the provided attributes.",
                "operationId": "updateWidget",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the widget to update",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": "1"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title",
                                    "type",
                                    "permission_id"
                                ],
                                "properties": {
                                    "title": {
                                        "description": "Updated title of the widget",
                                        "type": "string",
                                        "example": "Updated Widget"
                                    },
                                    "type": {
                                        "description": "Updated type of the widget",
                                        "type": "string",
                                        "example": "chart"
                                    },
                                    "permission_id": {
                                        "description": "Updated permission ID",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "handler_class": {
                                        "type": "string",
                                        "example": "employees_count"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Widget updated successfully"
                    },
                    "400": {
                        "description": "Invalid input"
                    },
                    "404": {
                        "description": "Widget not found"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Basics - Widgets"
                ],
                "summary": "Delete Widget",
                "description": "Deletes a widget by its ID.",
                "operationId": "deleteWidget",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the widget to delete",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": "1"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Widget deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Widget not found"
                    }
                }
            }
        },
        "/content/widgets": {
            "get": {
                "tags": [
                    "Basics - Widgets"
                ],
                "summary": "List of Widgets",
                "description": "Get list of widgets",
                "operationId": "WidgetList",
                "responses": {
                    "200": {
                        "description": "Request processed successfully"
                    },
                    "400": {
                        "description": "Invalid input"
                    }
                }
            },
            "post": {
                "tags": [
                    "Basics - Widgets"
                ],
                "summary": "Store Widget",
                "description": "Creates a new widget with the provided attributes.",
                "operationId": "storeWidget",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title",
                                    "type"
                                ],
                                "properties": {
                                    "title": {
                                        "description": "Title of the widget",
                                        "type": "string",
                                        "example": "Widget Title"
                                    },
                                    "type": {
                                        "description": "Type of the widget",
                                        "type": "string",
                                        "example": "statistical"
                                    },
                                    "icon": {
                                        "description": "Icon for the widget",
                                        "type": "string",
                                        "example": "icon.svg"
                                    },
                                    "handler_class": {
                                        "type": "string",
                                        "example": "employees_count"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Widget created successfully"
                    },
                    "400": {
                        "description": "Invalid input",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid input data"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Validation error"
                                        },
                                        "errors": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/widgets/widget-role-create": {
            "get": {
                "tags": [
                    "Basics - Widgets"
                ],
                "summary": "Get widget role creation data",
                "description": "Retrieves the necessary data for creating a widget-role assignment, including all available widgets and roles.",
                "operationId": "getWidgetRoleCreateData",
                "responses": {
                    "200": {
                        "description": "Data retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "roles": {
                                            "description": "List of all available roles",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "admin"
                                                    },
                                                    "display_name": {
                                                        "type": "string",
                                                        "example": "Administrator"
                                                    },
                                                    "guard_name": {
                                                        "type": "string",
                                                        "example": "api"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "widgets": {
                                            "description": "List of all available widgets as value-label pairs",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "value": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "Dashboard Widget"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - User does not have permission",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "This action is unauthorized."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Server Error"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/content/widgets/create": {
            "get": {
                "tags": [
                    "Basics - Widgets"
                ],
                "summary": "Get permissions for widget creation",
                "description": "Fetches a list of permissions available for widget creation.",
                "operationId": "getWidgetCreateData",
                "responses": {
                    "200": {
                        "description": "Permissions fetched successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "permissions": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "Create Widget"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Invalid request"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/sms-logs/update-delivery-status": {
            "post": {
                "tags": [
                    "SMS Log"
                ],
                "summary": "Update delivery status for pending SMS messages",
                "operationId": "3580928589d0c9dea254d1f9f8b2a88e",
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "hours": {
                                        "description": "Check messages from last X hours",
                                        "type": "integer",
                                        "example": 24
                                    },
                                    "limit": {
                                        "description": "Maximum messages to check per run",
                                        "type": "integer",
                                        "example": 100
                                    },
                                    "message_ids": {
                                        "description": "Specific message IDs to check (optional)",
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": "12345678"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Delivery status updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "total_checked": {
                                            "type": "integer",
                                            "example": 50
                                        },
                                        "updated": {
                                            "type": "integer",
                                            "example": 45
                                        },
                                        "failed": {
                                            "type": "integer",
                                            "example": 5
                                        },
                                        "delivered": {
                                            "type": "integer",
                                            "example": 40
                                        },
                                        "delivery_failed": {
                                            "type": "integer",
                                            "example": 5
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/sms-logs/{id}": {
            "get": {
                "tags": [
                    "SMS Logs"
                ],
                "summary": "Get SMS log detail",
                "operationId": "GetSMSLogDetail",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Request processed successfully"
                    },
                    "404": {
                        "description": "Not found"
                    }
                }
            }
        },
        "/sms-logs": {
            "get": {
                "tags": [
                    "SMS Log"
                ],
                "summary": "List SMS logs with delivery status",
                "operationId": "ae7a712a3ed049594633bf1b999a1f30",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Search by receptor (phone number) or message content",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "0912"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Filter by SMS type",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "general",
                                "booking_customer",
                                "booking_therapist",
                                "verification"
                            ],
                            "example": "booking_customer"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Filter by send status",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "sent",
                                "failed"
                            ],
                            "example": "sent"
                        }
                    },
                    {
                        "name": "delivery_status",
                        "in": "query",
                        "description": "Filter by delivery status code",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 10
                        }
                    },
                    {
                        "name": "date_from",
                        "in": "query",
                        "description": "Filter from date (Y-m-d)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2025-02-01"
                        }
                    },
                    {
                        "name": "date_to",
                        "in": "query",
                        "description": "Filter to date (Y-m-d)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "2025-02-24"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of SMS logs returned successfully"
                    },
                    "401": {
                        "description": "Unauthorized"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/wellness/bookings/{id}/cancel": {
            "post": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Cancel booking",
                "description": "Cancel a booking (either by staff or system)",
                "operationId": "6c0c1c2252f32bb8a664b2be479cc570",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Booking ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 12
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "example": "مشتری حضور پیدا نکرد"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Booking canceled successfully"
                    },
                    "422": {
                        "description": "Booking cannot be canceled at this stage"
                    }
                }
            }
        },
        "/bookings/{id}": {
            "get": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Get booking details (with items)",
                "operationId": "35911fd6c918fb931cd6efcf04c706e8",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Booking details returned"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Delete booking (soft delete)",
                "operationId": "dfe05c66ef1815b9bf51cdf6ac4209b3",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Booking deleted"
                    }
                }
            }
        },
        "/wellness/bookings": {
            "post": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Create booking with items",
                "operationId": "5b61a8fda5aec77b4fe405062dc4e707",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "customer_id",
                                    "items"
                                ],
                                "properties": {
                                    "customer_id": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "pending",
                                            "confirmed",
                                            "in_progress",
                                            "done",
                                            "canceled"
                                        ],
                                        "example": "pending"
                                    },
                                    "start_at": {
                                        "type": "string",
                                        "example": "2025-11-04 14:00:00",
                                        "nullable": true
                                    },
                                    "end_at": {
                                        "type": "string",
                                        "example": "2025-11-04 15:00:00",
                                        "nullable": true
                                    },
                                    "total_amount": {
                                        "type": "number",
                                        "example": 450000
                                    },
                                    "deposit": {
                                        "type": "number",
                                        "example": 100000
                                    },
                                    "discount_amount": {
                                        "type": "number",
                                        "example": 50000
                                    },
                                    "tax_amount": {
                                        "type": "number",
                                        "example": 45000
                                    },
                                    "payable_amount": {
                                        "type": "number",
                                        "example": 445000
                                    },
                                    "paid_amount": {
                                        "type": "number",
                                        "example": 200000
                                    },
                                    "company_id": {
                                        "type": "integer",
                                        "example": 1,
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "example": "نیاز به اتاق آرام",
                                        "nullable": true
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "service_id",
                                                "therapist_id",
                                                "resource_id",
                                                "date",
                                                "start_at",
                                                "end_at"
                                            ],
                                            "properties": {
                                                "service_id": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "therapist_id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "resource_id": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "date": {
                                                    "type": "string",
                                                    "example": "1404/09/05"
                                                },
                                                "start_at": {
                                                    "type": "string",
                                                    "example": "08:30"
                                                },
                                                "end_at": {
                                                    "type": "string",
                                                    "example": "10:30"
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "company_id": {
                                                    "type": "integer",
                                                    "example": 1,
                                                    "nullable": true
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "enum": [
                                                        "pending",
                                                        "confirmed",
                                                        "in_progress",
                                                        "done",
                                                        "canceled"
                                                    ],
                                                    "example": "pending"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Booking created"
                    },
                    "422": {
                        "description": "Validation or availability error"
                    }
                }
            }
        },
        "/bookings/{booking_id}/rate": {
            "put": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Update booking rating",
                "description": "Update an existing rating for a booking. Only ratings for confirmed or done bookings can be updated.",
                "operationId": "updateBookingRating",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "booking_id",
                                    "overall_score"
                                ],
                                "properties": {
                                    "booking_id": {
                                        "description": "ID of the booking",
                                        "type": "integer",
                                        "example": 123
                                    },
                                    "overall_score": {
                                        "description": "Overall score from 1 to 5",
                                        "type": "integer",
                                        "maximum": 5,
                                        "minimum": 1,
                                        "example": 4
                                    },
                                    "skill": {
                                        "description": "Skill score (1-100)",
                                        "type": "integer",
                                        "maximum": 100,
                                        "minimum": 1,
                                        "example": 85,
                                        "nullable": true
                                    },
                                    "cleanliness": {
                                        "description": "Cleanliness score (1-100)",
                                        "type": "integer",
                                        "maximum": 100,
                                        "minimum": 1,
                                        "example": 90,
                                        "nullable": true
                                    },
                                    "behavior": {
                                        "description": "Behavior score (1-100)",
                                        "type": "integer",
                                        "maximum": 100,
                                        "minimum": 1,
                                        "example": 80,
                                        "nullable": true
                                    },
                                    "punctuality": {
                                        "description": "Punctuality score (1-100)",
                                        "type": "integer",
                                        "maximum": 100,
                                        "minimum": 1,
                                        "example": 95,
                                        "nullable": true
                                    },
                                    "description": {
                                        "description": "Additional feedback description",
                                        "type": "string",
                                        "maxLength": 500,
                                        "example": "Great service, very professional therapist.",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Rating updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Operation successful."
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "data": {
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "example": "Rating updated successfully."
                                                },
                                                "data": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "booking_id": {
                                                            "type": "integer",
                                                            "example": 123
                                                        },
                                                        "overall_score": {
                                                            "type": "integer",
                                                            "example": 4
                                                        },
                                                        "skill": {
                                                            "type": "integer",
                                                            "example": 85,
                                                            "nullable": true
                                                        },
                                                        "cleanliness": {
                                                            "type": "integer",
                                                            "example": 90,
                                                            "nullable": true
                                                        },
                                                        "behavior": {
                                                            "type": "integer",
                                                            "example": 80,
                                                            "nullable": true
                                                        },
                                                        "punctuality": {
                                                            "type": "integer",
                                                            "example": 95,
                                                            "nullable": true
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "example": "Great service, very professional therapist.",
                                                            "nullable": true
                                                        },
                                                        "staff": {
                                                            "description": "Staff member who provided the service",
                                                            "type": "object"
                                                        },
                                                        "creator": {
                                                            "description": "User who created the rating",
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "You do not have permission."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Booking or rating not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Booking not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error or invalid state",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Rating cannot be updated for this booking."
                                        },
                                        "errors": {
                                            "properties": {
                                                "booking_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The booking_id field is required."
                                                    }
                                                },
                                                "overall_score": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The overall_score must be between 1 and 5."
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Rate a therapist for a completed booking",
                "operationId": "2ed1e2933bcdf5ea515b965fade2af6c",
                "parameters": [
                    {
                        "name": "booking",
                        "in": "path",
                        "description": "ID of the booking to rate",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "booking_id",
                                    "overall_score"
                                ],
                                "properties": {
                                    "booking_id": {
                                        "description": "ID of the booking",
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "overall_score": {
                                        "description": "Overall rating score (1-5)",
                                        "type": "integer",
                                        "maximum": 5,
                                        "minimum": 1,
                                        "example": 5
                                    },
                                    "skill": {
                                        "description": "Technical skill rating (1-100)",
                                        "type": "integer",
                                        "maximum": 100,
                                        "minimum": 1,
                                        "example": 85,
                                        "nullable": true
                                    },
                                    "cleanliness": {
                                        "description": "Cleanliness rating (1-100)",
                                        "type": "integer",
                                        "maximum": 100,
                                        "minimum": 1,
                                        "example": 90,
                                        "nullable": true
                                    },
                                    "behavior": {
                                        "description": "Behavior and attitude rating (1-100)",
                                        "type": "integer",
                                        "maximum": 100,
                                        "minimum": 1,
                                        "example": 95,
                                        "nullable": true
                                    },
                                    "punctuality": {
                                        "description": "Punctuality rating (1-100)",
                                        "type": "integer",
                                        "maximum": 100,
                                        "minimum": 1,
                                        "example": 80,
                                        "nullable": true
                                    },
                                    "description": {
                                        "description": "Additional comments about the therapist",
                                        "type": "string",
                                        "example": "Excellent massage therapy session",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Rating submitted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Rating submitted successfully"
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "booking_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "staff_id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "staff_name": {
                                                    "type": "string",
                                                    "example": "Dr. Ahmad Mohammadi"
                                                },
                                                "overall_score": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "skill": {
                                                    "type": "integer",
                                                    "example": 85,
                                                    "nullable": true
                                                },
                                                "cleanliness": {
                                                    "type": "integer",
                                                    "example": 90,
                                                    "nullable": true
                                                },
                                                "behavior": {
                                                    "type": "integer",
                                                    "example": 95,
                                                    "nullable": true
                                                },
                                                "punctuality": {
                                                    "type": "integer",
                                                    "example": 80,
                                                    "nullable": true
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Excellent massage therapy session",
                                                    "nullable": true
                                                },
                                                "created_by": {
                                                    "type": "string",
                                                    "example": "Reza Karimi"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "example": "2026-08-02 10:30:00"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error or business rule violation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Rating is only allowed for completed bookings"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden - User does not have permission to rate"
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/bookings/customer": {
            "post": {
                "tags": [
                    "Wellness - Customer Booking"
                ],
                "summary": "Create a new booking by customer",
                "operationId": "cc1c8cc818eba735dac22097f89d8847",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "items"
                                ],
                                "properties": {
                                    "items": {
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "service_id",
                                                "staff_id",
                                                "resource_id",
                                                "date",
                                                "start_at",
                                                "end_at"
                                            ],
                                            "properties": {
                                                "service_id": {
                                                    "description": "Service ID",
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "staff_id": {
                                                    "description": "Therapist/Staff ID",
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "resource_id": {
                                                    "description": "Room/Resource ID",
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "date": {
                                                    "description": "Date in Jalali format (Y/m/d)",
                                                    "type": "string",
                                                    "example": "1405/05/17"
                                                },
                                                "start_at": {
                                                    "description": "Start time (H:i)",
                                                    "type": "string",
                                                    "example": "10:00"
                                                },
                                                "end_at": {
                                                    "description": "End time (H:i)",
                                                    "type": "string",
                                                    "example": "11:00"
                                                },
                                                "quantity": {
                                                    "description": "Quantity (default: 1)",
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "company_id": {
                                                    "description": "Company ID (optional)",
                                                    "type": "integer",
                                                    "example": null
                                                },
                                                "status": {
                                                    "description": "Booking status",
                                                    "type": "string",
                                                    "enum": [
                                                        "pending",
                                                        "confirmed",
                                                        "cancelled"
                                                    ],
                                                    "example": "pending"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "company_id": {
                                        "description": "Company ID for the booking",
                                        "type": "integer",
                                        "example": null
                                    },
                                    "status": {
                                        "description": "Booking status",
                                        "type": "string",
                                        "enum": [
                                            "pending",
                                            "confirmed",
                                            "cancelled"
                                        ],
                                        "example": "pending"
                                    },
                                    "total_amount": {
                                        "description": "Total amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 150000
                                    },
                                    "deposit": {
                                        "description": "Deposit amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 50000
                                    },
                                    "discount_amount": {
                                        "description": "Discount amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 20000
                                    },
                                    "tax_amount": {
                                        "description": "Tax amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 15000
                                    },
                                    "payable_amount": {
                                        "description": "Payable amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 130000
                                    },
                                    "paid_amount": {
                                        "description": "Paid amount",
                                        "type": "number",
                                        "format": "float",
                                        "example": 130000
                                    },
                                    "notes": {
                                        "description": "Additional notes",
                                        "type": "string",
                                        "example": "Special requests"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Booking created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "booking": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "customer_id": {
                                                    "type": "integer",
                                                    "example": 123
                                                },
                                                "organization_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "pending"
                                                },
                                                "start_at": {
                                                    "type": "string",
                                                    "format": "datetime",
                                                    "example": "2026-08-10 10:00:00"
                                                },
                                                "end_at": {
                                                    "type": "string",
                                                    "format": "datetime",
                                                    "example": "2026-08-10 11:00:00"
                                                },
                                                "total_amount": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 150000
                                                },
                                                "items": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "service_id": {
                                                                "type": "integer",
                                                                "example": 5
                                                            },
                                                            "staff_id": {
                                                                "type": "integer",
                                                                "example": 12
                                                            },
                                                            "resource_id": {
                                                                "type": "integer",
                                                                "example": 3
                                                            },
                                                            "start_at": {
                                                                "type": "string",
                                                                "format": "datetime",
                                                                "example": "2026-08-10 10:00:00"
                                                            },
                                                            "end_at": {
                                                                "type": "string",
                                                                "format": "datetime",
                                                                "example": "2026-08-10 11:00:00"
                                                            },
                                                            "quantity": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "unit_price": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 150000
                                                            },
                                                            "total_price": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 150000
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - Only customers can book",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "فقط مشتریان قادر به ثبت هستند"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "تراپیست 12 در بازه 2026-08-10 10:00:00 تا 2026-08-10 11:00:00 فعال نیست."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/bookings/score": {
            "post": {
                "tags": [
                    "Wellness - Customer Score"
                ],
                "summary": "Submit a score for a therapist",
                "operationId": "05d51a068b51d6cf35a659205b8b88ad",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "staff_id",
                                    "score"
                                ],
                                "properties": {
                                    "staff_id": {
                                        "description": "Therapist (Staff) ID",
                                        "type": "integer",
                                        "example": 12
                                    },
                                    "score": {
                                        "description": "Score from 1 to 5",
                                        "type": "integer",
                                        "maximum": 5,
                                        "minimum": 1,
                                        "example": 4
                                    },
                                    "comment": {
                                        "description": "Optional comment (max 500 characters)",
                                        "type": "string",
                                        "maxLength": 500,
                                        "example": "عالی بود، بسیار حرفه‌ای"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Score submitted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "امتیاز شما با موفقیت ثبت شد."
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "customer_id": {
                                                    "type": "integer",
                                                    "example": 123
                                                },
                                                "staff_id": {
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "score": {
                                                    "type": "integer",
                                                    "example": 4
                                                },
                                                "comment": {
                                                    "type": "string",
                                                    "example": "عالی بود، بسیار حرفه‌ای"
                                                },
                                                "booking_id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "datetime",
                                                    "example": "2026-08-10 14:30:00"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - Only customers can submit scores",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "فقط مشتریان قادر به امتیاز دهی هستند"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Therapist not found or no completed booking",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "درمانگر مورد نظر یافت نشد."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "شما قبلاً به این درمانگر امتیاز داده‌اید."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/customer/form": {
            "post": {
                "tags": [
                    "Wellness - Customer - Form"
                ],
                "summary": "Submit customer form data",
                "description": "Submit customer information form data and store it in form entries without creating or updating customer record.",
                "operationId": "submitCustomerForm",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "data"
                                ],
                                "properties": {
                                    "customer_id": {
                                        "description": "Customer ID (optional, stored in meta for reference)",
                                        "type": "integer",
                                        "example": 2290,
                                        "nullable": true
                                    },
                                    "data": {
                                        "description": "Form field values keyed by field name",
                                        "type": "object",
                                        "example": {
                                            "field_1785136613622": "123456"
                                        },
                                        "additionalProperties": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Form submitted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Operation successful."
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "data": {
                                            "properties": {
                                                "entry_id": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "example": "پاسخ‌های فرم با موفقیت ذخیره شد."
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "You do not have permission."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Form not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "فرم اطلاعات مشتری در سیستم تعریف نشده است."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The data field is required."
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/wellness/bookings/{id}": {
            "put": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Update existing booking (with availability & conflict checks)",
                "operationId": "e4814b9de7cf8a72e24b0578dcbb38ae",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "pending",
                                            "confirmed",
                                            "in_progress",
                                            "done",
                                            "canceled"
                                        ]
                                    },
                                    "notes": {
                                        "type": "string"
                                    },
                                    "total_amount": {
                                        "type": "number"
                                    },
                                    "company_id": {
                                        "type": "number"
                                    },
                                    "deposit": {
                                        "type": "number"
                                    },
                                    "discount_amount": {
                                        "type": "number"
                                    },
                                    "tax_amount": {
                                        "type": "number"
                                    },
                                    "payable_amount": {
                                        "type": "number"
                                    },
                                    "paid_amount": {
                                        "type": "number"
                                    },
                                    "items": {
                                        "type": "array",
                                        "items": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "service_id": {
                                                    "type": "integer"
                                                },
                                                "therapist_id": {
                                                    "type": "integer"
                                                },
                                                "resource_id": {
                                                    "type": "integer"
                                                },
                                                "start_at": {
                                                    "type": "string",
                                                    "example": "1403/10/01 14:00:00"
                                                },
                                                "end_at": {
                                                    "type": "string",
                                                    "example": "1403/10/01 15:00:00"
                                                },
                                                "quantity": {
                                                    "type": "integer"
                                                },
                                                "unit_price": {
                                                    "type": "number"
                                                },
                                                "total_price": {
                                                    "type": "number"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "enum": [
                                                        "pending",
                                                        "confirmed",
                                                        "in_progress",
                                                        "done",
                                                        "canceled"
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Booking updated successfully"
                    },
                    "422": {
                        "description": "Validation or conflict error"
                    }
                }
            }
        },
        "/wellness/bookings/{id}/status": {
            "put": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Update booking status",
                "operationId": "6226826a15804f13dd084356bd3d6959",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Booking ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 10
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "status"
                                ],
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "pending",
                                            "confirmed",
                                            "in_progress",
                                            "done",
                                            "canceled"
                                        ],
                                        "example": "confirmed"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "example": "تأیید توسط مدیر پذیرش"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Booking status updated successfully"
                    },
                    "422": {
                        "description": "Invalid transition or state"
                    }
                }
            }
        },
        "/bookings/{id}/customer/status": {
            "put": {
                "tags": [
                    "Wellness - Customer Booking"
                ],
                "summary": "Update customer booking status",
                "description": "Update the status of a customer booking with validation and business rules",
                "operationId": "updateCustomerBookingStatus",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Booking ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "status"
                                ],
                                "properties": {
                                    "status": {
                                        "description": "New status for the booking",
                                        "type": "string",
                                        "enum": [
                                            "pending",
                                            "confirmed",
                                            "in_progress",
                                            "done",
                                            "canceled"
                                        ],
                                        "example": "confirmed"
                                    },
                                    "resource_id": {
                                        "description": "Room/resource ID (required when status is 'confirmed')",
                                        "type": "integer",
                                        "example": 5,
                                        "nullable": true
                                    },
                                    "notes": {
                                        "description": "Additional notes for the booking",
                                        "type": "string",
                                        "example": "Customer requested VIP room",
                                        "nullable": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Status updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "وضعیت رزرو با موفقیت تغییر یافت."
                                        },
                                        "booking": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "code": {
                                                    "type": "string",
                                                    "example": "BK-2025-001"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "confirmed"
                                                },
                                                "customer": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 10
                                                        },
                                                        "first_name": {
                                                            "type": "string",
                                                            "example": "John"
                                                        },
                                                        "last_name": {
                                                            "type": "string",
                                                            "example": "Doe"
                                                        },
                                                        "phone": {
                                                            "type": "string",
                                                            "example": "09123456789"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "items": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "service_id": {
                                                                "type": "integer",
                                                                "example": 3
                                                            },
                                                            "staff_id": {
                                                                "type": "integer",
                                                                "example": 2
                                                            },
                                                            "status": {
                                                                "type": "string",
                                                                "example": "confirmed"
                                                            },
                                                            "start_at": {
                                                                "type": "string",
                                                                "format": "datetime",
                                                                "example": "2025-08-15 10:00:00"
                                                            },
                                                            "end_at": {
                                                                "type": "string",
                                                                "format": "datetime",
                                                                "example": "2025-08-15 11:00:00"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - User does not have admin access",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Booking not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "رزرو مورد نظر یافت نشد"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error or business rule violation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "oneOf": [
                                        {
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "example": "تغییر وضعیت از pending به done مجاز نیست."
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "example": "برای تایید رزرو، انتخاب اتاق الزامی است."
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "example": "این اتاق در بازه زمانی مورد نظر رزرو شده است."
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "properties": {
                                                "errors": {
                                                    "type": "object",
                                                    "example": {
                                                        "id": [
                                                            "The selected id is invalid."
                                                        ],
                                                        "status": [
                                                            "The selected status is invalid."
                                                        ]
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/customer/form-entry": {
            "get": {
                "tags": [
                    "Wellness - Customer - Form"
                ],
                "summary": "Get customer form entries",
                "description": "Retrieve the latest submitted form entry for a specific customer.",
                "operationId": "getCustomerFormEntries",
                "parameters": [
                    {
                        "name": "customer_id",
                        "in": "query",
                        "description": "Customer ID (required)",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 2290
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Form entries retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Operation successful."
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "data": {
                                            "properties": {
                                                "customer": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 2290
                                                        },
                                                        "first_name": {
                                                            "type": "string",
                                                            "example": "Noshin"
                                                        },
                                                        "last_name": {
                                                            "type": "string",
                                                            "example": "Talaie"
                                                        },
                                                        "phone": {
                                                            "type": "string",
                                                            "example": "09132072377"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "form_data": {
                                                    "description": "Form field values",
                                                    "type": "object",
                                                    "example": {
                                                        "field_1785136613622": "789"
                                                    },
                                                    "nullable": true
                                                },
                                                "submitted_at": {
                                                    "type": "string",
                                                    "format": "datetime",
                                                    "example": "2026-08-03 12:45:50",
                                                    "nullable": true
                                                },
                                                "entry_id": {
                                                    "type": "integer",
                                                    "example": 15,
                                                    "nullable": true
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "example": "Form information retrieved successfully."
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "You do not have permission."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error or customer not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Customer ID is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Wellness - Customer - Form"
                ],
                "summary": "Update customer form entry",
                "description": "Update an existing customer form entry. Only customers who have previously submitted a form can update it. Changes are logged in the form entry logs.",
                "operationId": "updateCustomerFormEntry",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "customer_id",
                                    "data"
                                ],
                                "properties": {
                                    "customer_id": {
                                        "description": "Customer ID (must have an existing form entry)",
                                        "type": "integer",
                                        "example": 2290
                                    },
                                    "data": {
                                        "description": "Updated form field values keyed by field name",
                                        "type": "object",
                                        "example": {
                                            "field_1785136613622": "newpassword123"
                                        },
                                        "additionalProperties": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Form entry updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Operation successful."
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "data": {
                                            "properties": {
                                                "entry_id": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "example": "updated"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "example": "پاسخ‌های فرم با موفقیت به‌روزرسانی شد."
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "You do not have permission."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Customer or form not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "مشتری مورد نظر یافت نشد."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error or customer has no form entry",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "این مشتری هیچ فرمی پر نکرده است. برای ثبت جدید از متد POST استفاده کنید."
                                        },
                                        "errors": {
                                            "properties": {
                                                "customer_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "The customer_id field is required."
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/wellness/bookings/calendar-matrix": {
            "get": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "نمایش ماتریسی رزروها (تراپیست‌ها/منابع × روزها)",
                "description": "\n * این API یک ساختار ماتریسی برای نمایش رزروها بین یک بازه تاریخ شمسی برمی‌گرداند.\n *\n * هر ردیف یک تراپیست یا یک منبع (اتاق) است.\n * هر ستون یک تاریخ شمسی در بازه انتخاب‌شده است.\n * داخل هر سلول لیست Event های آن روز قرار می‌گیرد.\n *\n * مناسب برای نمایش UIهای ماتریسی شبیه:\n *\n * - جدول هفتگی تراپیست‌ها\n * - جدول اتاق‌ها × روزها\n * - Matrix Calendar\n *\n * ورودی‌ها به‌صورت تاریخ **شمسی** هستند: Y/m/d\n * خروجی نیز کاملاً شمسی است، شامل ساعت رزروها.\n *     ",
                "operationId": "9a2aef0138ce48a8d1e2cdd811ed170b",
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "description": "تاریخ شروع بازه (شمسی: Y/m/d)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "1404/08/20"
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "تاریخ پایان بازه (شمسی: Y/m/d)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "1404/08/26"
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "نوع ماتریس: براساس تراپیست یا براساس منبع (اتاق)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "therapist",
                                "resource"
                            ]
                        },
                        "example": "therapist"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Matrix calendar data returned successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "from": "1404/08/20",
                                    "to": "1404/08/26",
                                    "type": "therapist",
                                    "dates": [
                                        "1404/08/20",
                                        "1404/08/21",
                                        "1404/08/22",
                                        "1404/08/23",
                                        "1404/08/24",
                                        "1404/08/25",
                                        "1404/08/26"
                                    ],
                                    "rows": [
                                        {
                                            "id": 5,
                                            "name": "محمد رضایی",
                                            "days": [
                                                {
                                                    "date": "1404/08/20",
                                                    "count": 2,
                                                    "events": [
                                                        {
                                                            "id": 33,
                                                            "service": "ماساژ ریلکسیشن",
                                                            "customer": "علی احمدی",
                                                            "start": "1404/08/20 14:00:00",
                                                            "end": "1404/08/20 15:00:00",
                                                            "status": "تایید شده",
                                                            "color": "#22c55e"
                                                        },
                                                        {
                                                            "id": 34,
                                                            "service": "ماساژ سوئدی",
                                                            "customer": "رضا محمدی",
                                                            "start": "1404/08/20 16:00:00",
                                                            "end": "1404/08/20 17:00:00",
                                                            "status": "در حال انجام",
                                                            "color": "#0ea5e9"
                                                        }
                                                    ]
                                                },
                                                {
                                                    "date": "1404/08/21",
                                                    "count": 0,
                                                    "events": []
                                                }
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wellness/bookings/calendar-range": {
            "get": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Get bookings for a date range (multi-day calendar view)",
                "description": "Returns all bookings within a date range, grouped by therapist or resource — suitable for week or multi-day calendar views",
                "operationId": "f9a3ad8d0b588d59fd860c8820e822cf",
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "description": "Start date (Jalali: Y/m/d)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "1404/08/20"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "End date (Jalali: Y/m/d)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "1404/08/26"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Group type: therapist or resource",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "therapist",
                                "resource"
                            ],
                            "example": "therapist"
                        }
                    },
                    {
                        "name": "id",
                        "in": "query",
                        "description": "Specific therapist_id or resource_id to filter",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 3
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Filter by booking status",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "confirmed"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Range calendar data retrieved successfully"
                    }
                }
            }
        },
        "/wellness/bookings/calendar": {
            "get": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Get bookings calendar view",
                "description": "Returns all bookings for a given day or range, suitable for displaying in a calendar (grouped by therapist or resource)",
                "operationId": "a012326e2c3a36a41e1c202a03ac63ae",
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "description": "Date to show (YYYY-MM-DD)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "2025-11-02"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "Group type: therapist or resource",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "therapist",
                                "resource"
                            ],
                            "example": "therapist"
                        }
                    },
                    {
                        "name": "id",
                        "in": "query",
                        "description": "Specific therapist_id or resource_id to filter",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 3
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Filter by booking status",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "confirmed"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Calendar data retrieved successfully"
                    }
                }
            }
        },
        "/bookings/create": {
            "get": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Get enums and related data for booking form",
                "operationId": "5019d5c07c321a057a5d2d11430357c5",
                "responses": {
                    "200": {
                        "description": "Create data returned"
                    }
                }
            }
        },
        "/bookings": {
            "get": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "List bookings (with filters and pagination)",
                "operationId": "bb1b767961983381b1e596d4681a9841",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Search by code, customer name or phone"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Filter by booking status"
                    },
                    {
                        "name": "customer_id",
                        "in": "query",
                        "description": "Filter by customer id"
                    },
                    {
                        "name": "therapist_id",
                        "in": "query",
                        "description": "Filter by therapist id (via items)"
                    },
                    {
                        "name": "resource_id",
                        "in": "query",
                        "description": "Filter by resource id (via items)"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List returned successfully"
                    }
                }
            }
        },
        "/bookings/{booking_id}/rating": {
            "get": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Get booking rating details",
                "description": "Retrieves the rating details for a specific booking if it has been rated",
                "operationId": "getBookingRating",
                "parameters": [
                    {
                        "name": "booking",
                        "in": "path",
                        "description": "ID of the booking",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Rating details retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "rating": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "booking_id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "staff_id": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "staff_name": {
                                                    "type": "string",
                                                    "example": "Dr. Ahmad Mohammadi"
                                                },
                                                "overall_score": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "skill": {
                                                    "type": "integer",
                                                    "example": 85,
                                                    "nullable": true
                                                },
                                                "cleanliness": {
                                                    "type": "integer",
                                                    "example": 90,
                                                    "nullable": true
                                                },
                                                "behavior": {
                                                    "type": "integer",
                                                    "example": 95,
                                                    "nullable": true
                                                },
                                                "punctuality": {
                                                    "type": "integer",
                                                    "example": 80,
                                                    "nullable": true
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Excellent massage therapy session",
                                                    "nullable": true
                                                },
                                                "created_by": {
                                                    "type": "string",
                                                    "example": "Reza Karimi"
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "example": "2026-08-02 10:30:00"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "No rating found for this booking",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "No rating found for this booking"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden - User does not have permission to view rating"
                    },
                    "404": {
                        "description": "Booking not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Booking not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/bookings/report": {
            "get": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Comprehensive bookings report",
                "description": "Get list of bookings with filtering, search, sorting and pagination",
                "operationId": "dff19dc0322ae07c4ef284baa2bae490",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pending",
                                "confirmed",
                                "in_progress",
                                "done",
                                "canceled"
                            ]
                        }
                    },
                    {
                        "name": "company",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "customer_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "start_from",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "start_to",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_from",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_to",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "created_from",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "created_to",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "total_amount_min",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "total_amount_max",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "payable_amount_min",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "payable_amount_max",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "payment_status",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "paid",
                                "unpaid",
                                "partial"
                            ]
                        }
                    },
                    {
                        "name": "has_deposit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "true",
                                "false"
                            ]
                        }
                    },
                    {
                        "name": "therapist_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "service_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "min_booking_count",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "max_booking_count",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "has_items",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "true",
                                "false"
                            ]
                        }
                    },
                    {
                        "name": "with_stats",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "true",
                            "enum": [
                                "true",
                                "false"
                            ]
                        }
                    },
                    {
                        "name": "sort_by",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "id"
                        }
                    },
                    {
                        "name": "sort_direction",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "desc",
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Unauthorized"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/bookings/customer/admin/list": {
            "get": {
                "tags": [
                    "Wellness - Customer Booking"
                ],
                "summary": "Get list of customer bookings for admin",
                "description": "Get paginated list of customer bookings with filters and sorting for admin panel",
                "operationId": "getCustomerBookingAdminList",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Filter by booking status",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pending",
                                "confirmed",
                                "in_progress",
                                "done",
                                "canceled"
                            ]
                        }
                    },
                    {
                        "name": "customer_id",
                        "in": "query",
                        "description": "Filter by customer ID",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    },
                    {
                        "name": "from_date",
                        "in": "query",
                        "description": "Filter from date (Shamsi format: Y/m/d)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "1405/05/01"
                        }
                    },
                    {
                        "name": "to_date",
                        "in": "query",
                        "description": "Filter to date (Shamsi format: Y/m/d)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "1405/05/30"
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Search by booking code or customer name",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "John"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of items per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 15
                        }
                    },
                    {
                        "name": "sort_by",
                        "in": "query",
                        "description": "Sort by column",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "created_at",
                            "enum": [
                                "id",
                                "code",
                                "customer_name",
                                "status",
                                "total_price",
                                "payable_amount",
                                "paid_amount",
                                "created_at"
                            ]
                        }
                    },
                    {
                        "name": "sort_order",
                        "in": "query",
                        "description": "Sort order",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": "desc",
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "columns": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "key": {
                                                        "type": "string"
                                                    },
                                                    "label": {
                                                        "type": "string"
                                                    },
                                                    "sortable": {
                                                        "type": "boolean"
                                                    },
                                                    "type": {
                                                        "type": "string"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "code": {
                                                        "type": "string",
                                                        "example": "BK-2025-001"
                                                    },
                                                    "customer_name": {
                                                        "type": "string",
                                                        "example": "John Doe"
                                                    },
                                                    "phone": {
                                                        "type": "string",
                                                        "example": "09123456789"
                                                    },
                                                    "therapist_name": {
                                                        "type": "string",
                                                        "example": "Dr. Smith"
                                                    },
                                                    "date": {
                                                        "type": "string",
                                                        "format": "date",
                                                        "example": "1405/05/15"
                                                    },
                                                    "start_time": {
                                                        "type": "string",
                                                        "format": "time",
                                                        "example": "10:00"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "enum": [
                                                            "pending",
                                                            "confirmed",
                                                            "in_progress",
                                                            "done",
                                                            "canceled"
                                                        ]
                                                    },
                                                    "total_price": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 1500000
                                                    },
                                                    "payable_amount": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 1500000
                                                    },
                                                    "paid_amount": {
                                                        "type": "number",
                                                        "format": "float",
                                                        "example": 500000
                                                    },
                                                    "created_at": {
                                                        "type": "string",
                                                        "format": "datetime",
                                                        "example": "2025-08-10 14:30:00"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "paginate": {
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 150
                                                },
                                                "from": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "to": {
                                                    "type": "integer",
                                                    "example": 15
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden - User does not have admin access",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Forbidden"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "errors": {
                                            "type": "object",
                                            "example": {
                                                "status": [
                                                    "The selected status is invalid."
                                                ]
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/wellness/bookings/customer/{booking_id}": {
            "get": {
                "tags": [
                    "Wellness - Customer Booking"
                ],
                "summary": "Get customer booking details",
                "description": "\n * Retrieve full details of a specific booking for the authenticated customer.\n *\n * Features:\n * - Only returns bookings belonging to the logged-in customer\n * - Full booking information including customer, therapist, service, room\n * - Financial details (total, discount, tax, payable, paid, remaining)\n * - Cancellation availability check\n * - Booking items with service, therapist, room details\n *     ",
                "operationId": "2c6f534c2ed4add005132deb4909c6bc",
                "parameters": [
                    {
                        "name": "booking_id",
                        "in": "path",
                        "description": "Booking ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1001
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Booking details retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1001
                                                },
                                                "code": {
                                                    "type": "string",
                                                    "example": "BK-1001"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "enum": [
                                                        "pending",
                                                        "confirmed",
                                                        "in_progress",
                                                        "done",
                                                        "canceled"
                                                    ],
                                                    "example": "confirmed"
                                                },
                                                "status_label": {
                                                    "type": "string",
                                                    "example": "Confirmed"
                                                },
                                                "customer": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 20
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "Arash Savarani"
                                                        },
                                                        "phone": {
                                                            "type": "string",
                                                            "example": "09120000000"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "company": {
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 23
                                                        },
                                                        "name": {
                                                            "type": "string",
                                                            "example": "Wellness Club A"
                                                        }
                                                    },
                                                    "type": "object",
                                                    "nullable": true
                                                },
                                                "start_at": {
                                                    "type": "string",
                                                    "format": "datetime",
                                                    "example": "2026-07-12 08:00:00"
                                                },
                                                "end_at": {
                                                    "type": "string",
                                                    "format": "datetime",
                                                    "example": "2026-07-12 09:00:00"
                                                },
                                                "date": {
                                                    "type": "string",
                                                    "example": "1404/08/28"
                                                },
                                                "day_name": {
                                                    "type": "string",
                                                    "example": "Saturday"
                                                },
                                                "start_time": {
                                                    "type": "string",
                                                    "example": "08:00"
                                                },
                                                "end_time": {
                                                    "type": "string",
                                                    "example": "09:00"
                                                },
                                                "duration_minutes": {
                                                    "type": "integer",
                                                    "example": 60
                                                },
                                                "total_amount": {
                                                    "type": "string",
                                                    "example": "350,000 ریال"
                                                },
                                                "deposit": {
                                                    "type": "string",
                                                    "example": "0 ریال"
                                                },
                                                "discount_amount": {
                                                    "type": "string",
                                                    "example": "0 ریال"
                                                },
                                                "tax_amount": {
                                                    "type": "string",
                                                    "example": "0 ریال"
                                                },
                                                "payable_amount": {
                                                    "type": "string",
                                                    "example": "350,000 ریال"
                                                },
                                                "paid_amount": {
                                                    "type": "string",
                                                    "example": "0 ریال"
                                                },
                                                "remaining_amount": {
                                                    "type": "string",
                                                    "example": "350,000 ریال"
                                                },
                                                "items": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "service": {
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer",
                                                                        "example": 3
                                                                    },
                                                                    "title": {
                                                                        "type": "string",
                                                                        "example": "Relaxation Massage"
                                                                    }
                                                                },
                                                                "type": "object"
                                                            },
                                                            "therapist": {
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer",
                                                                        "example": 5
                                                                    },
                                                                    "name": {
                                                                        "type": "string",
                                                                        "example": "Mehran Mokhtari"
                                                                    },
                                                                    "avatar": {
                                                                        "type": "string",
                                                                        "nullable": true
                                                                    }
                                                                },
                                                                "type": "object"
                                                            },
                                                            "room": {
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer",
                                                                        "example": 1
                                                                    },
                                                                    "name": {
                                                                        "type": "string",
                                                                        "example": "Room 1"
                                                                    }
                                                                },
                                                                "type": "object"
                                                            },
                                                            "start_at": {
                                                                "type": "string",
                                                                "example": "08:00"
                                                            },
                                                            "end_at": {
                                                                "type": "string",
                                                                "example": "09:00"
                                                            },
                                                            "duration_minutes": {
                                                                "type": "integer",
                                                                "example": 60
                                                            },
                                                            "price": {
                                                                "type": "integer",
                                                                "example": 350000
                                                            },
                                                            "status": {
                                                                "type": "string",
                                                                "example": "confirmed"
                                                            },
                                                            "status_label": {
                                                                "type": "string",
                                                                "example": "Confirmed"
                                                            },
                                                            "notes": {
                                                                "type": "string",
                                                                "nullable": true
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "can_cancel": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "can_reschedule": {
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "notes": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "created_at": {
                                                    "type": "string",
                                                    "format": "datetime",
                                                    "example": "2026-07-12 08:00:00"
                                                },
                                                "updated_at": {
                                                    "type": "string",
                                                    "format": "datetime",
                                                    "example": "2026-07-12 08:00:00"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - User not authenticated"
                    },
                    "403": {
                        "description": "Forbidden - User is not a customer"
                    },
                    "404": {
                        "description": "Booking not found - The booking does not exist or belongs to another customer"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "wellness/bookings/customer/list": {
            "get": {
                "tags": [
                    "Wellness - Customer Booking"
                ],
                "summary": "Get customer bookings list",
                "description": "\n * Retrieve a paginated list of bookings for the authenticated customer.\n *\n * Features:\n * - Only returns bookings belonging to the logged-in customer\n * - Includes therapist, service, room, date, time information\n * - Filter by status and date range\n * - Sorted by start date (newest first)\n * - Pagination support\n * - Summary statistics (total, upcoming, completed, canceled)\n *     ",
                "operationId": "10c7527e2eac8a33c4860729da78bc39",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Filter by booking status",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pending",
                                "confirmed",
                                "in_progress",
                                "done",
                                "canceled"
                            ]
                        }
                    },
                    {
                        "name": "from_date",
                        "in": "query",
                        "description": "Filter bookings from this date (Jalali format: Y/m/d)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "1404/08/01"
                        }
                    },
                    {
                        "name": "to_date",
                        "in": "query",
                        "description": "Filter bookings until this date (Jalali format: Y/m/d)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "1404/08/30"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of items per page (default: 15, max: 50)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 15
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Customer bookings retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "columns": {
                                            "description": "Customer information",
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 20
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Arash Savarani"
                                                },
                                                "phone": {
                                                    "type": "string",
                                                    "example": "09120000000"
                                                },
                                                "membership_type": {
                                                    "type": "string",
                                                    "example": "member"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "summary": {
                                            "description": "Booking statistics summary",
                                            "properties": {
                                                "total": {
                                                    "type": "integer",
                                                    "example": 25
                                                },
                                                "upcoming": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "completed": {
                                                    "type": "integer",
                                                    "example": 20
                                                },
                                                "canceled": {
                                                    "type": "integer",
                                                    "example": 2
                                                }
                                            },
                                            "type": "object"
                                        },
                                        "data": {
                                            "description": "List of bookings",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 33
                                                    },
                                                    "booking_code": {
                                                        "type": "string",
                                                        "example": "BK-1404-001"
                                                    },
                                                    "service": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 3
                                                            },
                                                            "title": {
                                                                "type": "string",
                                                                "example": "Relaxation Massage"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "therapist": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 5
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "Mehran Mokhtari"
                                                            },
                                                            "avatar": {
                                                                "type": "string",
                                                                "example": "/storage/avatars/therapist5.jpg"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "room": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "Room 1"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "date": {
                                                        "type": "string",
                                                        "example": "1404/08/28"
                                                    },
                                                    "day_name": {
                                                        "type": "string",
                                                        "example": "Saturday"
                                                    },
                                                    "start_time": {
                                                        "type": "string",
                                                        "example": "08:00"
                                                    },
                                                    "end_time": {
                                                        "type": "string",
                                                        "example": "09:00"
                                                    },
                                                    "duration_minutes": {
                                                        "type": "integer",
                                                        "example": 60
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "confirmed"
                                                    },
                                                    "status_label": {
                                                        "type": "string",
                                                        "example": "Confirmed"
                                                    },
                                                    "price": {
                                                        "type": "integer",
                                                        "example": 350000
                                                    },
                                                    "notes": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "can_cancel": {
                                                        "type": "boolean",
                                                        "example": true
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "paginate": {
                                            "description": "Pagination metadata",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 25
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "has_more": {
                                                    "type": "boolean",
                                                    "example": true
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - User not authenticated"
                    },
                    "403": {
                        "description": "Forbidden - User is not a customer"
                    },
                    "422": {
                        "description": "Validation error - Invalid status or date format"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "customer/form": {
            "get": {
                "tags": [
                    "Wellness - Customer - Form"
                ],
                "summary": "Get customer form with optional customer data",
                "description": "Retrieve the customer information form structure along with existing customer data if customer_id is provided.",
                "operationId": "getCustomerForm",
                "parameters": [
                    {
                        "name": "customer_id",
                        "in": "query",
                        "description": "Customer ID (optional) - if provided, customer data will be returned to pre-fill the form",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 2290
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Form retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Operation successful."
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "data": {
                                            "properties": {
                                                "form": {
                                                    "description": "Form structure with elements",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 5
                                                        },
                                                        "title": {
                                                            "type": "string",
                                                            "example": "Customer Information Form"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "example": "New description"
                                                        },
                                                        "type": {
                                                            "type": "string",
                                                            "example": "customer_info"
                                                        },
                                                        "version": {
                                                            "type": "integer",
                                                            "example": 2
                                                        },
                                                        "elements": {
                                                            "type": "array",
                                                            "items": {
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer",
                                                                        "example": 5
                                                                    },
                                                                    "name": {
                                                                        "type": "string",
                                                                        "example": "field_1785136613622"
                                                                    },
                                                                    "label": {
                                                                        "type": "string",
                                                                        "example": "Password Field"
                                                                    },
                                                                    "type": {
                                                                        "type": "string",
                                                                        "example": "password"
                                                                    },
                                                                    "is_required": {
                                                                        "type": "boolean",
                                                                        "example": false
                                                                    },
                                                                    "is_active": {
                                                                        "type": "boolean",
                                                                        "example": true
                                                                    },
                                                                    "placeholder": {
                                                                        "type": "string",
                                                                        "nullable": true
                                                                    },
                                                                    "default_value": {
                                                                        "type": "string",
                                                                        "nullable": true
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "customer_data": {
                                                    "description": "Customer data for pre-filling the form (only if customer_id provided)",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 2290
                                                        },
                                                        "first_name": {
                                                            "type": "string",
                                                            "example": "Noshin"
                                                        },
                                                        "last_name": {
                                                            "type": "string",
                                                            "example": "Talaie"
                                                        },
                                                        "phone": {
                                                            "type": "string",
                                                            "example": "09132072377"
                                                        },
                                                        "national_code": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "gender": {
                                                            "type": "string",
                                                            "example": "female"
                                                        },
                                                        "birth_date": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "email": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "address": {
                                                            "type": "string",
                                                            "nullable": true
                                                        },
                                                        "status": {
                                                            "type": "string",
                                                            "nullable": true
                                                        }
                                                    },
                                                    "type": "object",
                                                    "nullable": true
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "example": "Form retrieved successfully."
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "You do not have permission."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Form not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Customer information form is not defined in the system. Please create it first."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/customer/form/logs": {
            "get": {
                "tags": [
                    "Wellness - Customer - Form"
                ],
                "summary": "Get customer form change logs",
                "description": "Retrieve the complete change history of form submissions for a specific customer.",
                "operationId": "getCustomerFormLogs",
                "parameters": [
                    {
                        "name": "customer_id",
                        "in": "query",
                        "description": "Customer ID (required)",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 2290
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Form logs retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Operation successful."
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "data": {
                                            "properties": {
                                                "customer_id": {
                                                    "type": "integer",
                                                    "example": 2290
                                                },
                                                "logs": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "data": {
                                                                "description": "Current form data at this log entry",
                                                                "type": "object",
                                                                "example": {
                                                                    "field_1785136613622": "789"
                                                                }
                                                            },
                                                            "previous_data": {
                                                                "description": "Previous form data before this change",
                                                                "type": "object",
                                                                "example": {
                                                                    "field_1785136613622": "123456"
                                                                },
                                                                "nullable": true
                                                            },
                                                            "changed_at": {
                                                                "type": "string",
                                                                "format": "datetime",
                                                                "example": "2026-08-03 12:00:00"
                                                            },
                                                            "updated_by": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "is_changed": {
                                                                "type": "boolean",
                                                                "example": true
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "total_changes": {
                                                    "type": "integer",
                                                    "example": 3
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "You do not have permission."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Customer ID is required."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/wellness/bookings/daily-board": {
            "get": {
                "tags": [
                    "Wellness - Booking"
                ],
                "summary": "Daily booking board (spa paper sheet style)",
                "description": "\n * برمی‌گرداند جدول نوبت‌دهی روزانه برای یک تاریخ مشخص:\n * - لیست بازه‌های زمانی در آن روز (بر اساس شیفت‌ها + اسلات‌های استاندارد)\n * - برای هر بازه، لیست رزروها (ممکن است چند ردیف داشته باشد)\n * - در هر ردیف: اتاق، تراپیست، مشتری، شماره تماس، سرویس، مبلغ، بیعانه، وضعیت و...\n * - لینک‌های روز قبل و روز بعد برای ناوبری سریع در داشبورد.\n *     ",
                "operationId": "c0c5b6bf02e852472a85e6bb35269f9a",
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "description": "Jalali date (Y/m/d)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "1404/08/28"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Daily board data",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "date": "1404/08/28",
                                    "prev_url": "/wellness/bookings/daily-board?date=1404/08/27",
                                    "next_url": "/wellness/bookings/daily-board?date=1404/08/29",
                                    "slots": [
                                        {
                                            "from": "08:00",
                                            "to": "09:00",
                                            "label": "8 تا 9",
                                            "rows": [
                                                {
                                                    "booking_item_id": 33,
                                                    "booking_id": 10,
                                                    "room": {
                                                        "id": 1,
                                                        "name": "اتاق 1"
                                                    },
                                                    "therapist": {
                                                        "id": 5,
                                                        "name": "مهران مختاری"
                                                    },
                                                    "customer": {
                                                        "id": 20,
                                                        "name": "آرش سوارانی",
                                                        "phone": "09120000000"
                                                    },
                                                    "service": {
                                                        "id": 3,
                                                        "title": "ماساژ ریلکسیشن"
                                                    },
                                                    "status": "confirmed",
                                                    "start_time": "08:00",
                                                    "end_time": "09:00",
                                                    "price": 350000,
                                                    "deposit": 50000
                                                }
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wellness/therapist/bookings/daily-board": {
            "get": {
                "tags": [
                    "Wellness - Therapist Booking"
                ],
                "summary": "Therapist daily booking board (dynamic rows/columns)",
                "operationId": "edf5e77103c2f4943903d3ac32a0f652",
                "responses": {
                    "200": {
                        "description": "Daily booking board returned successfully"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/customers/{id}": {
            "get": {
                "tags": [
                    "Wellness - Customer"
                ],
                "summary": "Get single customer details",
                "operationId": "9e2b1328064a85f7a8143dbb3ba778e5",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Customer ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Customer details returned"
                    }
                }
            },
            "put": {
                "tags": [
                    "Wellness - Customer"
                ],
                "summary": "Update customer",
                "operationId": "0c596a171648613f4b1e096b8f62a51d",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "first_name": {
                                        "type": "string"
                                    },
                                    "last_name": {
                                        "type": "string"
                                    },
                                    "phone": {
                                        "type": "string"
                                    },
                                    "gender": {
                                        "type": "string"
                                    },
                                    "membership_type": {
                                        "type": "string"
                                    },
                                    "status": {
                                        "type": "string"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Customer updated"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Wellness - Customer"
                ],
                "summary": "Delete customer",
                "operationId": "864f6bc6cbc72c9e748f4af82c519feb",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Deleted successfully"
                    }
                }
            }
        },
        "/customers/import": {
            "post": {
                "tags": [
                    "Wellness - Customer"
                ],
                "summary": "Import customers from Excel file",
                "description": "\nآپلود فایل اکسل مشتریان و ثبت اطلاعات آن‌ها در سیستم.\nاین عملیات شامل:\n- نرمال‌سازی و اعتبارسنجی تاریخ تولد (به‌صورت جلالی)\n- بررسی یکتایی شماره تماس (شماره‌های تکراری *skip* می‌شوند)\n- بررسی صحت نام و شماره تلفن\n- شمارش تعداد رکوردهای درج‌شده، رکوردهای تکراری اسکیپ‌شده، و ردیف‌های خطادار\n- نمایش خطاهای مربوط به ردیف‌های دارای مشکل (تاریخ نامعتبر، نام خالی، شماره‌ تماس خالی، ...)\n",
                "operationId": "2d126d22d8e8e288c033c505df8879ee",
                "requestBody": {
                    "description": "فایل اکسل شامل اطلاعات مشتریان (xlsx یا xls)",
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "فایل Excel شامل ستون‌های: ردیف، نام کامل، تاریخ تولد جلالی، شماره تماس",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Import completed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "عملیات با موفقیت انجام شد"
                                        },
                                        "data": {
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "example": "ایمپورت با موفقیت انجام شد."
                                                },
                                                "inserted": {
                                                    "description": "تعداد مشتری‌های جدید که با موفقیت ثبت شدند",
                                                    "type": "integer",
                                                    "example": 185
                                                },
                                                "skipped_duplicates": {
                                                    "description": "تعداد ردیف‌هایی که شماره تماس آن‌ها تکراری بوده و در نتیجه ثبت نشده‌اند",
                                                    "type": "integer",
                                                    "example": 23
                                                },
                                                "error_rows": {
                                                    "description": "تعداد ردیف‌هایی که دارای خطا بوده‌اند",
                                                    "type": "integer",
                                                    "example": 4
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error – some rows are invalid",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "The given data was invalid."
                                        },
                                        "errors": {
                                            "properties": {
                                                "file": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "ردیف 5: تاریخ تولد نامعتبر است: 1376/4/31"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers": {
            "get": {
                "tags": [
                    "Wellness - Customer"
                ],
                "summary": "List customers",
                "operationId": "fa8dee30ea477639a6fd4a87a5efe03c",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Search by name or phone",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "0912"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of customers returned successfully"
                    }
                }
            },
            "post": {
                "tags": [
                    "Wellness - Customer"
                ],
                "summary": "Create new customer",
                "operationId": "ecb41964cf8ec1ed45cb9b716a56a967",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "first_name",
                                    "last_name",
                                    "phone",
                                    "gender"
                                ],
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "example": "نگار"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "example": "احمدی"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "example": "09121234567"
                                    },
                                    "gender": {
                                        "type": "string",
                                        "enum": [
                                            "male",
                                            "female",
                                            "other"
                                        ]
                                    },
                                    "membership_type": {
                                        "type": "string",
                                        "example": "guest"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Customer created successfully"
                    }
                }
            }
        },
        "/customers/create": {
            "get": {
                "tags": [
                    "Wellness - Customer"
                ],
                "summary": "Get reference data for customer creation form",
                "operationId": "1e115b52d6d9ac199a3e8f6cc39bafcc",
                "responses": {
                    "200": {
                        "description": "Reference data returned successfully"
                    }
                }
            }
        },
        "/customers/report": {
            "get": {
                "tags": [
                    "Customer Report"
                ],
                "summary": "دریافت گزارش مشتری‌ها",
                "description": "این endpoint گزارش جامع مشتری‌ها را با امکان فیلتر و مرتب‌سازی برمی‌گرداند",
                "operationId": "getCustomerReport",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "description": "جستجو در نام، نام خانوادگی، موبایل، کد ملی",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "علی"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "وضعیت مشتری",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "active",
                                "inactive",
                                "banned"
                            ],
                            "example": "active"
                        }
                    },
                    {
                        "name": "membership_type",
                        "in": "query",
                        "description": "نوع عضویت",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "guest",
                                "member",
                                "vip"
                            ],
                            "example": "member"
                        }
                    },
                    {
                        "name": "gender",
                        "in": "query",
                        "description": "جنسیت",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "male",
                                "female"
                            ],
                            "example": "male"
                        }
                    },
                    {
                        "name": "booking_status",
                        "in": "query",
                        "description": "فیلتر بر اساس وضعیت رزرو",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "pending",
                                "confirmed",
                                "in_progress",
                                "done",
                                "canceled"
                            ],
                            "example": "confirmed"
                        }
                    },
                    {
                        "name": "booking_start_from",
                        "in": "query",
                        "description": "تاریخ شروع رزرو از (فرمت: YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2025-01-01"
                        }
                    },
                    {
                        "name": "booking_start_to",
                        "in": "query",
                        "description": "تاریخ شروع رزرو تا (فرمت: YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2025-12-31"
                        }
                    },
                    {
                        "name": "joined_from",
                        "in": "query",
                        "description": "تاریخ عضویت از (فرمت: YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2025-01-01"
                        }
                    },
                    {
                        "name": "joined_to",
                        "in": "query",
                        "description": "تاریخ عضویت تا (فرمت: YYYY-MM-DD)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date",
                            "example": "2025-12-31"
                        }
                    },
                    {
                        "name": "min_revenue",
                        "in": "query",
                        "description": "حداقل درآمد",
                        "required": false,
                        "schema": {
                            "type": "number",
                            "format": "float",
                            "example": 1000000
                        }
                    },
                    {
                        "name": "max_revenue",
                        "in": "query",
                        "description": "حداکثر درآمد",
                        "required": false,
                        "schema": {
                            "type": "number",
                            "format": "float",
                            "example": 10000000
                        }
                    },
                    {
                        "name": "has_bookings",
                        "in": "query",
                        "description": "فیلتر مشتری‌های دارای رزرو",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "true",
                                "false"
                            ],
                            "example": "true"
                        }
                    },
                    {
                        "name": "sort_by",
                        "in": "query",
                        "description": "مرتب‌سازی بر اساس",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "name",
                                "bookings_count",
                                "total_revenue",
                                "last_booking_date",
                                "joined_at"
                            ],
                            "example": "total_revenue"
                        }
                    },
                    {
                        "name": "sort_direction",
                        "in": "query",
                        "description": "جهت مرتب‌سازی",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "example": "desc"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "تعداد آیتم در هر صفحه",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 15
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "شماره صفحه",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "عملیات موفق",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "code": {
                                                        "type": "string",
                                                        "example": "C-001"
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "علی احمدی"
                                                    },
                                                    "first_name": {
                                                        "type": "string",
                                                        "example": "علی"
                                                    },
                                                    "last_name": {
                                                        "type": "string",
                                                        "example": "احمدی"
                                                    },
                                                    "phone": {
                                                        "type": "string",
                                                        "example": "09123456789"
                                                    },
                                                    "national_code": {
                                                        "type": "string",
                                                        "example": "1234567890"
                                                    },
                                                    "gender": {
                                                        "type": "string",
                                                        "example": "male"
                                                    },
                                                    "gender_label": {
                                                        "type": "string",
                                                        "example": "مرد"
                                                    },
                                                    "birth_date": {
                                                        "type": "string",
                                                        "example": "1370/01/01"
                                                    },
                                                    "status": {
                                                        "type": "string",
                                                        "example": "active"
                                                    },
                                                    "status_label": {
                                                        "type": "string",
                                                        "example": "فعال"
                                                    },
                                                    "membership_type": {
                                                        "type": "string",
                                                        "example": "member"
                                                    },
                                                    "membership_type_label": {
                                                        "type": "string",
                                                        "example": "عضو"
                                                    },
                                                    "joined_at": {
                                                        "type": "string",
                                                        "example": "1404/01/01"
                                                    },
                                                    "stats": {
                                                        "properties": {
                                                            "bookings_count": {
                                                                "type": "integer",
                                                                "example": 15
                                                            },
                                                            "total_revenue": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 5000000
                                                            },
                                                            "average_booking_amount": {
                                                                "type": "number",
                                                                "format": "float",
                                                                "example": 333333.33
                                                            },
                                                            "services_count": {
                                                                "type": "integer",
                                                                "example": 5
                                                            },
                                                            "therapists_count": {
                                                                "type": "integer",
                                                                "example": 3
                                                            },
                                                            "first_booking_date": {
                                                                "type": "string",
                                                                "example": "2025-01-15 10:00:00"
                                                            },
                                                            "last_booking_date": {
                                                                "type": "string",
                                                                "example": "2025-05-10 14:30:00"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "bookings_by_status": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "status": {
                                                                    "type": "string",
                                                                    "example": "done"
                                                                },
                                                                "status_label": {
                                                                    "type": "string",
                                                                    "example": "انجام شده"
                                                                },
                                                                "count": {
                                                                    "type": "integer",
                                                                    "example": 10
                                                                },
                                                                "total_amount": {
                                                                    "type": "number",
                                                                    "format": "float",
                                                                    "example": 3500000
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "example": 5
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 15
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "example": 73
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "خطای احراز هویت"
                    },
                    "422": {
                        "description": "خطای اعتبارسنجی"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/customers/report/create-data": {
            "get": {
                "tags": [
                    "Customer Report"
                ],
                "summary": "دریافت داده‌های مرجع برای فرم فیلتر گزارش مشتری‌ها",
                "description": "این endpoint داده‌های مورد نیاز برای فیلترهای گزارش مشتری‌ها را برمی‌گرداند",
                "operationId": "getCustomerReportCreateData",
                "responses": {
                    "200": {
                        "description": "عملیات موفق",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "customerStatuses": {
                                            "description": "لیست وضعیت‌های مشتری",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "value": {
                                                        "type": "string",
                                                        "example": "active"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "فعال"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "membershipTypes": {
                                            "description": "لیست انواع عضویت",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "value": {
                                                        "type": "string",
                                                        "example": "member"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "عضو"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "genders": {
                                            "description": "لیست جنسیت‌ها",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "value": {
                                                        "type": "string",
                                                        "example": "male"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "مرد"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "bookingStatuses": {
                                            "description": "لیست وضعیت‌های رزرو",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "value": {
                                                        "type": "string",
                                                        "example": "confirmed"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "تایید شده"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "sortOptions": {
                                            "description": "گزینه‌های مرتب‌سازی",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "value": {
                                                        "type": "string",
                                                        "example": "bookings_count"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "تعداد رزرو"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "sortDirections": {
                                            "description": "جهت مرتب‌سازی",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "value": {
                                                        "type": "string",
                                                        "example": "desc"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "نزولی"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "booleanOptions": {
                                            "description": "گزینه‌های بله/خیر",
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "value": {
                                                        "type": "string",
                                                        "example": "true"
                                                    },
                                                    "label": {
                                                        "type": "string",
                                                        "example": "بله"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "خطای احراز هویت"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/customers/{customer_id}/statistics": {
            "get": {
                "tags": [
                    "Customers"
                ],
                "summary": "Get customer statistics",
                "description": "Returns detailed statistical information about customer's bookings, payments, sessions and visit history.",
                "operationId": "87c941605202272fc1601920ea11bab2",
                "parameters": [
                    {
                        "name": "customer_id",
                        "in": "path",
                        "description": "ID of the customer",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 12
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Customer statistics loaded successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "total_bookings": {
                                            "description": "Total number of bookings made by the customer",
                                            "type": "integer",
                                            "example": 12
                                        },
                                        "completed_bookings": {
                                            "description": "Number of completed bookings",
                                            "type": "integer",
                                            "example": 9
                                        },
                                        "canceled_bookings": {
                                            "description": "Number of canceled bookings",
                                            "type": "integer",
                                            "example": 1
                                        },
                                        "total_sessions": {
                                            "description": "Total number of booking items (sessions)",
                                            "type": "integer",
                                            "example": 28
                                        },
                                        "total_minutes": {
                                            "description": "Total duration of all sessions in minutes",
                                            "type": "integer",
                                            "example": 1740
                                        },
                                        "total_amount": {
                                            "description": "Total raw booking amount before discounts",
                                            "type": "number",
                                            "format": "float",
                                            "example": 4800000
                                        },
                                        "total_discount": {
                                            "description": "Total discount amount applied",
                                            "type": "number",
                                            "format": "float",
                                            "example": 450000
                                        },
                                        "total_paid": {
                                            "description": "Total amount paid by the customer",
                                            "type": "number",
                                            "format": "float",
                                            "example": 4200000
                                        },
                                        "first_visit": {
                                            "description": "Date and time of the customer's first visit",
                                            "type": "string",
                                            "example": "2025-06-12 15:00",
                                            "nullable": true
                                        },
                                        "last_visit": {
                                            "description": "Date and time of the most recent visit",
                                            "type": "string",
                                            "example": "2026-02-01 17:30",
                                            "nullable": true
                                        },
                                        "favorite_service": {
                                            "description": "Service ID customer has booked most frequently",
                                            "type": "integer",
                                            "example": 3,
                                            "nullable": true
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Customer not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Customer not found."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wellness/customers/search": {
            "get": {
                "tags": [
                    "Wellness - Customer"
                ],
                "summary": "Search customers by name or phone (autocomplete for booking)",
                "operationId": "8a0ecf831ae83e85fb6cac320553cdb9",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Search query (phone, first_name, last_name)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Search results returned"
                    }
                }
            }
        },
        "/wellness/facilities/{facility_id}": {
            "get": {
                "tags": [
                    "Wellness - Facility"
                ],
                "summary": "Get facility by ID",
                "operationId": "93ee47ef9a31802d15d92bdaa72eaf77",
                "responses": {
                    "200": {
                        "description": "Facility retrieved successfully"
                    }
                }
            },
            "put": {
                "tags": [
                    "Wellness - Facility"
                ],
                "summary": "Update facility information",
                "operationId": "2e467fddbdea71a023b64dbb63af49de",
                "parameters": [
                    {
                        "name": "facility_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "شعبه نیاوران"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "example": "021-98765432"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Facility updated successfully"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Wellness - Facility"
                ],
                "summary": "Delete facility (soft delete)",
                "operationId": "d5ff757506afa3ba5f21e09e71cade6b",
                "parameters": [
                    {
                        "name": "facility_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Facility deleted successfully"
                    }
                }
            }
        },
        "/wellness/facilities": {
            "get": {
                "tags": [
                    "Wellness - Facility"
                ],
                "summary": "List all facilities",
                "operationId": "c1582e1d07cc8040d9ee26a0d52a08aa",
                "responses": {
                    "200": {
                        "description": "Facilities list retrieved successfully"
                    }
                }
            },
            "post": {
                "tags": [
                    "Wellness - Facility"
                ],
                "summary": "Create new facility (branch/building)",
                "description": "ثبت یک شعبه یا ساختمان جدید برای سازمان",
                "operationId": "storeWellnessFacility",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "name"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "شعبه مرکزی سعادت‌آباد"
                                    },
                                    "code": {
                                        "type": "string",
                                        "example": "BR001"
                                    },
                                    "city": {
                                        "type": "string",
                                        "example": "تهران"
                                    },
                                    "address": {
                                        "type": "string",
                                        "example": "خیابان سرو، نبش میدان کتاب"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "example": "021-12345678"
                                    },
                                    "manager_name": {
                                        "type": "string",
                                        "example": "دکتر علی مرادی"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Facility created successfully"
                    }
                }
            }
        },
        "/wellness/facilities/create": {
            "get": {
                "tags": [
                    "Wellness - Facility"
                ],
                "summary": "Get reference data for creating a facility",
                "operationId": "e5e13e0befd2e48a7c46c948ba9613fc",
                "responses": {
                    "200": {
                        "description": "Reference data retrieved"
                    }
                }
            }
        },
        "/wellness/resources/{resource_id}": {
            "get": {
                "tags": [
                    "Wellness - Resource"
                ],
                "summary": "Get single resource",
                "operationId": "db3bb732c9103c293df57e3f3fbefd01",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            },
            "put": {
                "tags": [
                    "Wellness - Resource"
                ],
                "summary": "Update resource",
                "operationId": "598cdf9e58dcf15468aca95fe4e6bfe7",
                "parameters": [
                    {
                        "name": "resource_id",
                        "in": "path",
                        "description": "شناسه‌ی منبع (resource) برای ویرایش",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "اتاق ماساژ شماره ۲"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "اتاق مخصوص ماساژ درمانی ویژه بانوان"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Resource updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Resource updated successfully."
                                        },
                                        "data": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Resource not found"
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "500": {
                        "description": "Server error"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Wellness - Resource"
                ],
                "summary": "Delete resource (soft delete)",
                "operationId": "760115904a847d06d66e4e8999faa08f",
                "parameters": [
                    {
                        "name": "resource_id",
                        "in": "path",
                        "description": "شناسه‌ی منبع (resource) برای حذف",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Resource deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Resource deleted successfully."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Resource not found"
                    },
                    "500": {
                        "description": "Server error"
                    }
                }
            }
        },
        "/wellness/resource-types/{type_id}": {
            "get": {
                "tags": [
                    "Wellness - ResourceType"
                ],
                "summary": "Get a single resource type",
                "operationId": "fc066a750df2cc928118862df6c7c5e6",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            },
            "put": {
                "tags": [
                    "Wellness - ResourceType"
                ],
                "summary": "Update resource type",
                "operationId": "096bb1c4992294e40b456fc8afad0ea2",
                "parameters": [
                    {
                        "name": "type_id",
                        "in": "path",
                        "description": "شناسه‌ی نوع منبع برای ویرایش",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "اتاق ماساژ"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "اتاق‌های مخصوص ماساژ درمانی"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    },
                                    "meta": {
                                        "type": "object",
                                        "example": {
                                            "capacity": 2,
                                            "color": "#78B3CE"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Resource type updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Resource type updated successfully."
                                        },
                                        "data": {
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Resource type not found"
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "500": {
                        "description": "Server error"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Wellness - ResourceType"
                ],
                "summary": "Delete resource type (soft delete)",
                "operationId": "ea319041e3e572306659c84267036931",
                "parameters": [
                    {
                        "name": "type_id",
                        "in": "path",
                        "description": "شناسه‌ی نوع منبع برای حذف",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Resource type deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Resource type deleted successfully."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Resource type not found"
                    },
                    "500": {
                        "description": "Server error"
                    }
                }
            }
        },
        "/wellness/resources": {
            "get": {
                "tags": [
                    "Wellness - Resource"
                ],
                "summary": "List resources",
                "operationId": "feac664cbda217fc9809e40a8bb6fdb8",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            },
            "post": {
                "tags": [
                    "Wellness - Resource"
                ],
                "summary": "Create resource",
                "operationId": "136415d2be2d65a8aac2c44ed1e71247",
                "responses": {
                    "200": {
                        "description": "Created"
                    }
                }
            }
        },
        "/wellness/resource-types": {
            "get": {
                "tags": [
                    "Wellness - ResourceType"
                ],
                "summary": "List resource types",
                "operationId": "36510e961df28a302da41d9d8954b0da",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            },
            "post": {
                "tags": [
                    "Wellness - ResourceType"
                ],
                "summary": "Create resource type",
                "operationId": "d6b2698dbd0fd0c15ba1bdec74fc6f96",
                "responses": {
                    "200": {
                        "description": "Created"
                    }
                }
            }
        },
        "/wellness/resources/create": {
            "get": {
                "tags": [
                    "Wellness - Resource"
                ],
                "summary": "Get reference data for creating a resource",
                "operationId": "2f239d41a0da7d291dc3d7340be41465",
                "responses": {
                    "200": {
                        "description": "Reference data retrieved"
                    }
                }
            }
        },
        "/resource/availabilities/{id}": {
            "get": {
                "tags": [
                    "Wellness - Resource Availability"
                ],
                "summary": "Get single resource availability",
                "operationId": "9e378d5f5cf6d1cefa2d247a28ad990d",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Resource availability found"
                    }
                }
            },
            "put": {
                "tags": [
                    "Wellness - Resource Availability"
                ],
                "summary": "Update resource availability",
                "operationId": "466b1682cf540934d5a76f6be84e023f",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Availability ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 3
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "weekday": {
                                        "type": "string",
                                        "example": "monday"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "example": "10:00"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "example": "17:00"
                                    },
                                    "breaks": {
                                        "type": "array",
                                        "items": {
                                            "example": {
                                                "start": "13:00",
                                                "end": "13:30"
                                            }
                                        }
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Resource availability updated successfully"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Wellness - Resource Availability"
                ],
                "summary": "Delete resource availability",
                "operationId": "2b0dcd2671157ead7562a70b3ab7d1ba",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Availability ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 2
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Availability deleted successfully"
                    }
                }
            }
        },
        "/resource/availabilities": {
            "get": {
                "tags": [
                    "Wellness - Resource Availability"
                ],
                "summary": "List resource availabilities",
                "operationId": "1d5a0170d98b1005e61c643b6ccd6e40",
                "parameters": [
                    {
                        "name": "resource_id",
                        "in": "query",
                        "description": "Filter by resource ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "weekday",
                        "in": "query",
                        "description": "Filter by weekday",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Availabilities listed successfully"
                    }
                }
            },
            "post": {
                "tags": [
                    "Wellness - Resource Availability"
                ],
                "summary": "Create new availability slot for a resource (room, bed, etc.)",
                "operationId": "43220de0d42ec9f35f46e275ac3779a0",
                "parameters": [
                    {
                        "name": "resource_id",
                        "in": "path",
                        "description": "Resource ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "weekday",
                                    "start_time",
                                    "end_time"
                                ],
                                "properties": {
                                    "weekday": {
                                        "type": "string",
                                        "example": "saturday"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "example": "09:00"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "example": "18:00"
                                    },
                                    "breaks": {
                                        "type": "array",
                                        "items": {
                                            "example": {
                                                "start": "12:00",
                                                "end": "13:00"
                                            }
                                        }
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Resource availability created successfully"
                    }
                }
            }
        },
        "/resource/availabilities/create": {
            "get": {
                "tags": [
                    "Wellness - Resource Availability"
                ],
                "summary": "Get reference data for resource availability creation",
                "operationId": "2b09157cbad7e1470a205265024fd9f2",
                "responses": {
                    "200": {
                        "description": "Create data returned successfully"
                    }
                }
            }
        },
        "/wellness/services/{service_id}": {
            "get": {
                "tags": [
                    "Wellness - Service"
                ],
                "summary": "Get single service",
                "operationId": "d30ca807a012942c22a7afb9719cf0a7",
                "parameters": [
                    {
                        "name": "service_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Service found"
                    }
                }
            },
            "put": {
                "tags": [
                    "Wellness - Service"
                ],
                "summary": "Update service",
                "operationId": "3ecc0de204daa22f6b6b8dd0f34446ff",
                "parameters": [
                    {
                        "name": "service_id",
                        "in": "path",
                        "description": "Service ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "ماساژ سوئدی ویژه"
                                    },
                                    "base_price": {
                                        "type": "number",
                                        "example": 650000
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Service updated successfully"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Wellness - Service"
                ],
                "summary": "Delete service",
                "operationId": "33aceb4ccbf48eb5a5e30291323cc532",
                "parameters": [
                    {
                        "name": "service_id",
                        "in": "path",
                        "description": "Service ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Service deleted successfully"
                    },
                    "404": {
                        "description": "Service not found"
                    }
                }
            }
        },
        "/wellness/services": {
            "get": {
                "tags": [
                    "Wellness - Service"
                ],
                "summary": "List services",
                "operationId": "dd476e41b4a6465f5d54d21c18b2c3d1",
                "parameters": [
                    {
                        "name": "category",
                        "in": "query",
                        "description": "Filter by category",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "ماساژ"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Request processed successfully"
                    }
                }
            },
            "post": {
                "tags": [
                    "Wellness - Service"
                ],
                "summary": "Create new service",
                "operationId": "1ec22741cc508bcb645a9e1227c11a55",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title",
                                    "base_price"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "ماساژ سوئدی ۶۰ دقیقه"
                                    },
                                    "category_id": {
                                        "type": "integer",
                                        "example": "12"
                                    },
                                    "duration_minutes": {
                                        "type": "integer",
                                        "example": 60
                                    },
                                    "base_price": {
                                        "type": "number",
                                        "example": 550000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "example": "IRR"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Service created successfully"
                    }
                }
            }
        },
        "/wellness/services/create": {
            "get": {
                "tags": [
                    "Wellness - Service"
                ],
                "summary": "Get reference data for service creation",
                "description": "Returns lists of categories and enum-based dropdowns required for creating a wellness service",
                "operationId": "getWellnessServiceCreateData",
                "responses": {
                    "200": {
                        "description": "Reference data retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "categories": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "object"
                                            }
                                        },
                                        "gender_policies": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "example": {
                                                    "value": "any",
                                                    "label": "بدون محدودیت جنسیت"
                                                }
                                            }
                                        },
                                        "currencies": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "example": {
                                                    "value": "IRR",
                                                    "label": "ریال"
                                                }
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "{service_id}/price": {
            "get": {
                "tags": [
                    "Wellness - Service"
                ],
                "summary": "Get service price history",
                "description": "Get price history logs for a specific service with pagination",
                "operationId": "getServicePriceHistory",
                "parameters": [
                    {
                        "name": "service_id",
                        "in": "path",
                        "description": "Service ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 59
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Items per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Operation successful."
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 200
                                        },
                                        "data": {
                                            "properties": {
                                                "service": {
                                                    "description": "Service information",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer",
                                                            "example": 59
                                                        },
                                                        "title": {
                                                            "type": "string",
                                                            "example": "Swedish Massage"
                                                        },
                                                        "category": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer",
                                                                    "example": 26
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "Massage"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "prices": {
                                                    "description": "List of price history logs",
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 3
                                                            },
                                                            "price": {
                                                                "type": "integer",
                                                                "example": 894500
                                                            },
                                                            "price_formatted": {
                                                                "type": "string",
                                                                "example": "894,500 IRR"
                                                            },
                                                            "created_at": {
                                                                "type": "string",
                                                                "example": "1404/04/17 14:30:00"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "paginate": {
                                                    "properties": {
                                                        "current_page": {
                                                            "type": "integer",
                                                            "example": 1
                                                        },
                                                        "per_page": {
                                                            "type": "integer",
                                                            "example": 20
                                                        },
                                                        "total": {
                                                            "type": "integer",
                                                            "example": 3
                                                        },
                                                        "last_page": {
                                                            "type": "integer",
                                                            "example": 1
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Unauthenticated."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "You do not have permission."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Service not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "No query results for model [Modules\\\\Wellness\\\\Service\\\\Models\\\\Service]."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/services/report": {
            "get": {
                "tags": [
                    "Wellness - Service"
                ],
                "summary": "Get Service Report with metrics",
                "operationId": "12d99ad0577b9ec6f2ea1fd1d0b4909f",
                "parameters": [
                    {
                        "name": "category_id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "gender_policy",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "active",
                                "inactive"
                            ]
                        }
                    },
                    {
                        "name": "booking_status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "company_id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "start_date",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "min_price",
                        "in": "query",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "max_price",
                        "in": "query",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "booking_filter",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "with_bookings",
                                "without_bookings"
                            ]
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort_by",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "default": "id"
                        }
                    },
                    {
                        "name": "sort_direction",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "default": "desc",
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/services/report/create-data": {
            "get": {
                "tags": [
                    "Wellness - Service"
                ],
                "summary": "Reference data for Service report filters",
                "operationId": "b71dd9480bba90894f821cce9a51068e",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/wellness/services/{id}/statistics": {
            "get": {
                "tags": [
                    "Services"
                ],
                "summary": "Service statistics (customers, therapists, financial, booking, company, time metrics)",
                "description": "Returns full analytics for a service including customer behavior, therapist distribution, financial KPIs, corporate usage, peak times, and booking performance.",
                "operationId": "d2b283a695372ff5f69f0b693517bdc1",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Service ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        },
                        "example": 12
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "total_sessions": {
                                            "type": "integer",
                                            "example": 132
                                        },
                                        "total_customers": {
                                            "type": "integer",
                                            "example": 48
                                        },
                                        "total_revenue": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 27400000
                                        },
                                        "total_paid": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 26000000
                                        },
                                        "total_discount": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 1400000
                                        },
                                        "average_price": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 210000
                                        },
                                        "average_revenue_per_session": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 207575
                                        },
                                        "total_bookings": {
                                            "type": "integer",
                                            "example": 102
                                        },
                                        "completed_bookings": {
                                            "type": "integer",
                                            "example": 88
                                        },
                                        "canceled_bookings": {
                                            "type": "integer",
                                            "example": 9
                                        },
                                        "no_show_bookings": {
                                            "type": "integer",
                                            "example": 5
                                        },
                                        "top_therapist": {
                                            "properties": {
                                                "therapist_id": {
                                                    "type": "integer",
                                                    "example": 4
                                                },
                                                "cnt": {
                                                    "type": "integer",
                                                    "example": 39
                                                }
                                            },
                                            "type": "object",
                                            "nullable": true
                                        },
                                        "therapist_distribution": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "therapist_id": {
                                                        "type": "integer",
                                                        "example": 4
                                                    },
                                                    "cnt": {
                                                        "type": "integer",
                                                        "example": 39
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "repeat_customers_count": {
                                            "type": "integer",
                                            "example": 19
                                        },
                                        "new_customers_count": {
                                            "type": "integer",
                                            "example": 29
                                        },
                                        "total_minutes": {
                                            "type": "integer",
                                            "example": 7560
                                        },
                                        "average_session_minutes": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 57
                                        },
                                        "first_used_at": {
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2024-02-10 15:00:00"
                                        },
                                        "last_used_at": {
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2026-02-03 17:40:00"
                                        },
                                        "peak_hours": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "hour": {
                                                        "type": "integer",
                                                        "example": 17
                                                    },
                                                    "cnt": {
                                                        "type": "integer",
                                                        "example": 25
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "peak_days": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "day": {
                                                        "type": "integer",
                                                        "example": 6
                                                    },
                                                    "cnt": {
                                                        "type": "integer",
                                                        "example": 31
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "total_corporate_sessions": {
                                            "type": "integer",
                                            "example": 23
                                        },
                                        "top_company": {
                                            "properties": {
                                                "company_id": {
                                                    "type": "integer",
                                                    "example": 3
                                                },
                                                "cnt": {
                                                    "type": "integer",
                                                    "example": 12
                                                }
                                            },
                                            "type": "object",
                                            "nullable": true
                                        },
                                        "company_distribution": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "company_id": {
                                                        "type": "integer",
                                                        "example": 3
                                                    },
                                                    "cnt": {
                                                        "type": "integer",
                                                        "example": 12
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Service not found"
                    }
                }
            }
        },
        "/wellness/service-categories/{category_id}": {
            "get": {
                "tags": [
                    "Wellness - Service Category"
                ],
                "summary": "Get single service category",
                "operationId": "31c836e9589e75ad76a88d1e181cb1b9",
                "parameters": [
                    {
                        "name": "category_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Category found"
                    }
                }
            },
            "put": {
                "tags": [
                    "Wellness - Service Category"
                ],
                "summary": "Update service category",
                "operationId": "188e98307e148379c857a4d594c2736a",
                "parameters": [
                    {
                        "name": "category_id",
                        "in": "path",
                        "description": "Category ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "سونا خشک"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Category updated successfully"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Wellness - Service Category"
                ],
                "summary": "Delete service category",
                "operationId": "78ef9aaeff16a2cb1b06ec79bd3d8fb5",
                "parameters": [
                    {
                        "name": "category_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Category deleted successfully"
                    },
                    "404": {
                        "description": "Category not found"
                    }
                }
            }
        },
        "/wellness/service-categories": {
            "get": {
                "tags": [
                    "Wellness - Service Category"
                ],
                "summary": "List service categories",
                "operationId": "27f307e18362f2dfa62c601414d327d3",
                "responses": {
                    "200": {
                        "description": "Request processed successfully"
                    }
                }
            },
            "post": {
                "tags": [
                    "Wellness - Service Category"
                ],
                "summary": "Create new service category",
                "operationId": "1dd0a194b098dc34dfa3cbd42076c868",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "title"
                                ],
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "ماساژ"
                                    },
                                    "icon": {
                                        "type": "string",
                                        "example": "mdi-spa"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "دسته خدمات ماساژ"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Category created successfully"
                    }
                }
            }
        },
        "/staff/{staff_id}": {
            "get": {
                "tags": [
                    "Wellness - Staff"
                ],
                "summary": "Get staff member",
                "description": "Retrieves detailed information about a specific staff member",
                "operationId": "1d15e325bebeaa91aadfc8d035b10ee1",
                "parameters": [
                    {
                        "name": "staff",
                        "in": "path",
                        "description": "Staff ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Staff not found"
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            },
            "put": {
                "tags": [
                    "Wellness - Staff"
                ],
                "summary": "Update staff member",
                "description": "Updates an existing staff member's information including user details",
                "operationId": "c2c1503d49520a29d4d1325068363ab0",
                "parameters": [
                    {
                        "name": "staff",
                        "in": "path",
                        "description": "Staff ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "first_name": {
                                        "description": "First name of the staff member",
                                        "type": "string",
                                        "example": "علی"
                                    },
                                    "last_name": {
                                        "description": "Last name of the staff member",
                                        "type": "string",
                                        "example": "محمدی"
                                    },
                                    "mobile": {
                                        "description": "Mobile number",
                                        "type": "string",
                                        "example": "09121234567"
                                    },
                                    "staff_type": {
                                        "type": "string",
                                        "enum": [
                                            "doctor",
                                            "nurse",
                                            "lab_technician",
                                            "lab_manager",
                                            "radiologist",
                                            "radiology_technician",
                                            "pharmacist",
                                            "pharmacy_technician",
                                            "receptionist",
                                            "administrative",
                                            "manager"
                                        ],
                                        "example": "doctor"
                                    },
                                    "employee_code": {
                                        "type": "string",
                                        "example": "DOC-001"
                                    },
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "active",
                                            "on_leave",
                                            "inactive"
                                        ],
                                        "example": "active"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Staff member updated successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "staff": {
                                                    "type": "object"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "404": {
                        "description": "Staff not found"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Wellness - Staff"
                ],
                "summary": "Delete staff member",
                "description": "Soft deletes a staff member (can be restored later)",
                "operationId": "c5c656cea072632354b18f600ed2e8cf",
                "parameters": [
                    {
                        "name": "staff",
                        "in": "path",
                        "description": "Staff ID",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Staff member deleted successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Staff member deleted successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Staff not found"
                    },
                    "422": {
                        "description": "Cannot delete - staff has active appointments"
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "staff": {
            "post": {
                "tags": [
                    "Wellness - Staff"
                ],
                "summary": "Create new staff member",
                "description": "Creates a new staff member (manager, secretary, therapist, etc.) in the EMR system.",
                "operationId": "98c73cc3c332dc8f532c2a65b77d80af",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "first_name",
                                    "last_name",
                                    "mobile",
                                    "national_code",
                                    "staff_type"
                                ],
                                "properties": {
                                    "first_name": {
                                        "description": "First name of the staff member",
                                        "type": "string",
                                        "maxLength": 100,
                                        "example": "Ali"
                                    },
                                    "last_name": {
                                        "description": "Last name of the staff member",
                                        "type": "string",
                                        "maxLength": 100,
                                        "example": "Rezaei"
                                    },
                                    "mobile": {
                                        "description": "Mobile number (must start with 09 and be 11 digits)",
                                        "type": "string",
                                        "pattern": "^09[0-9]{9}$",
                                        "example": "09123456789"
                                    },
                                    "national_code": {
                                        "description": "National code (10 digits, unique identifier)",
                                        "type": "string",
                                        "pattern": "^[0-9]{10}$",
                                        "example": "1234567890"
                                    },
                                    "gender": {
                                        "description": "Gender of the staff member",
                                        "type": "string",
                                        "enum": [
                                            "male",
                                            "female",
                                            "other"
                                        ],
                                        "example": "male"
                                    },
                                    "birth_date": {
                                        "description": "Birth date in Jalali (Shamsi) calendar",
                                        "type": "string",
                                        "format": "date",
                                        "example": "1380-01-01"
                                    },
                                    "staff_type": {
                                        "description": "Type of staff member: manager, secretary, therapist, or other",
                                        "type": "string",
                                        "enum": [
                                            "manager",
                                            "secretary",
                                            "other",
                                            "therapist"
                                        ],
                                        "example": "therapist"
                                    },
                                    "employee_code": {
                                        "description": "Employee code (optional - auto-generated if not provided)",
                                        "type": "string",
                                        "example": "THER023-1234"
                                    },
                                    "role_ids": {
                                        "description": "Array of role IDs to assign. If includes therapist role, therapist fields become available.",
                                        "type": "array",
                                        "items": {
                                            "type": "integer"
                                        },
                                        "example": [
                                            3,
                                            5
                                        ]
                                    },
                                    "facility_id": {
                                        "description": "Facility ID (only allowed if user has therapist role)",
                                        "type": "integer",
                                        "example": 7
                                    },
                                    "therapist_status": {
                                        "description": "Therapist status (only allowed if user has therapist role)",
                                        "type": "string",
                                        "enum": [
                                            "active",
                                            "inactive",
                                            "suspended"
                                        ],
                                        "example": "active"
                                    },
                                    "specialties": {
                                        "description": "List of specialties (only allowed if user has therapist role)",
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "example": [
                                            "massage",
                                            "aromatherapy"
                                        ]
                                    },
                                    "license_number": {
                                        "description": "License number (only allowed if user has therapist role)",
                                        "type": "string",
                                        "example": "MED-12345"
                                    },
                                    "hire_date": {
                                        "description": "Hire date (only allowed if user has therapist role)",
                                        "type": "string",
                                        "format": "date",
                                        "example": "1400-01-01"
                                    },
                                    "bio": {
                                        "description": "Biography (only allowed if user has therapist role)",
                                        "type": "string",
                                        "example": "Experienced therapist with 10 years of practice."
                                    },
                                    "avatar_path": {
                                        "description": "Avatar path (only allowed if user has therapist role)",
                                        "type": "string",
                                        "example": "uploads/avatars/therapist_123.jpg"
                                    },
                                    "commission_rate": {
                                        "description": "Commission rate percentage (only allowed if user has therapist role)",
                                        "type": "number",
                                        "format": "float",
                                        "maximum": 100,
                                        "minimum": 0,
                                        "example": 30
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Staff member created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "staff": {
                                            "description": "Created staff member",
                                            "type": "object"
                                        },
                                        "user_created": {
                                            "type": "boolean",
                                            "example": true
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/staff": {
            "get": {
                "tags": [
                    "Wellness - Staff"
                ],
                "summary": "List Staff Members",
                "description": "Get paginated list of all staff members with optional filters",
                "operationId": "ListStaff",
                "parameters": [
                    {
                        "name": "staff_type",
                        "in": "query",
                        "description": "Filter by staff type",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "doctor",
                                "nurse",
                                "lab_technician",
                                "lab_manager",
                                "radiologist",
                                "radiology_technician",
                                "pharmacist",
                                "pharmacy_technician",
                                "receptionist",
                                "administrative",
                                "manager"
                            ],
                            "example": "doctor"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "Filter by staff status (default: active)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "active",
                                "on_leave",
                                "inactive"
                            ],
                            "example": "active"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Search by name or employee code",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Ahmad"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Request processed successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "columns": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "object"
                                            }
                                        },
                                        "paginate": {
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/staff/create": {
            "get": {
                "tags": [
                    "Wellness - Staff"
                ],
                "summary": "Get staff creation form data",
                "description": "Returns staff types, roles, facilities, genders, therapist statuses, and user list for the staff creation form",
                "operationId": "72bbecc4ff5a011241020b98f98ddeb8",
                "responses": {
                    "200": {
                        "description": "Data retrieved successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "is_success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "staff_types": {
                                                    "description": "List of all available staff types",
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "value": {
                                                                "description": "Staff type key",
                                                                "type": "string",
                                                                "example": "doctor"
                                                            },
                                                            "label": {
                                                                "description": "Staff type display name",
                                                                "type": "string",
                                                                "example": "پزشک"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "example": [
                                                        {
                                                            "value": "doctor",
                                                            "label": "پزشک"
                                                        },
                                                        {
                                                            "value": "nurse",
                                                            "label": "پرستار"
                                                        },
                                                        {
                                                            "value": "receptionist",
                                                            "label": "پذیرش"
                                                        },
                                                        {
                                                            "value": "manager",
                                                            "label": "مدیر"
                                                        }
                                                    ]
                                                },
                                                "roles": {
                                                    "description": "List of roles available for the organization",
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "value": {
                                                                "description": "Role ID",
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "name": {
                                                                "description": "Role name",
                                                                "type": "string",
                                                                "example": "admin"
                                                            },
                                                            "label": {
                                                                "description": "Role display name",
                                                                "type": "string",
                                                                "example": "مدیر سیستم"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "example": [
                                                        {
                                                            "value": 1,
                                                            "name": "admin",
                                                            "label": "مدیر سیستم"
                                                        },
                                                        {
                                                            "value": 2,
                                                            "name": "doctor",
                                                            "label": "پزشک"
                                                        },
                                                        {
                                                            "value": 3,
                                                            "name": "nurse",
                                                            "label": "پرستار"
                                                        }
                                                    ]
                                                },
                                                "facilities": {
                                                    "description": "List of facilities in the organization",
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "value": {
                                                                "description": "Facility ID",
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "label": {
                                                                "description": "Facility name",
                                                                "type": "string",
                                                                "example": "درمانگاه مرکزی"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "example": [
                                                        {
                                                            "value": 1,
                                                            "label": "درمانگاه مرکزی"
                                                        },
                                                        {
                                                            "value": 2,
                                                            "label": "آزمایشگاه"
                                                        },
                                                        {
                                                            "value": 3,
                                                            "label": "رادیولوژی"
                                                        }
                                                    ]
                                                },
                                                "genders": {
                                                    "description": "List of gender options",
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "value": {
                                                                "description": "Gender key",
                                                                "type": "string",
                                                                "example": "male"
                                                            },
                                                            "label": {
                                                                "description": "Gender display name",
                                                                "type": "string",
                                                                "example": "مرد"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "example": [
                                                        {
                                                            "value": "male",
                                                            "label": "مرد"
                                                        },
                                                        {
                                                            "value": "female",
                                                            "label": "زن"
                                                        },
                                                        {
                                                            "value": "other",
                                                            "label": "سایر"
                                                        }
                                                    ]
                                                },
                                                "therapist_status": {
                                                    "description": "List of therapist statuses",
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "value": {
                                                                "description": "Status key",
                                                                "type": "string",
                                                                "example": "active"
                                                            },
                                                            "label": {
                                                                "description": "Status display name",
                                                                "type": "string",
                                                                "example": "فعال"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "example": [
                                                        {
                                                            "value": "active",
                                                            "label": "فعال"
                                                        },
                                                        {
                                                            "value": "inactive",
                                                            "label": "غیرفعال"
                                                        },
                                                        {
                                                            "value": "on_leave",
                                                            "label": "در مرخصی"
                                                        }
                                                    ]
                                                },
                                                "users": {
                                                    "description": "List of users available to assign as staff",
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "value": {
                                                                "description": "User ID",
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "label": {
                                                                "description": "User full name with mobile",
                                                                "type": "string",
                                                                "example": "علی محمدی (09123456789)"
                                                            },
                                                            "data": {
                                                                "description": "Additional user information",
                                                                "properties": {
                                                                    "first_name": {
                                                                        "type": "string",
                                                                        "example": "علی"
                                                                    },
                                                                    "last_name": {
                                                                        "type": "string",
                                                                        "example": "محمدی"
                                                                    },
                                                                    "father_name": {
                                                                        "type": "string",
                                                                        "example": "احمد",
                                                                        "nullable": true
                                                                    },
                                                                    "national_code": {
                                                                        "type": "string",
                                                                        "example": "1234567890",
                                                                        "nullable": true
                                                                    },
                                                                    "gender": {
                                                                        "type": "string",
                                                                        "example": "male",
                                                                        "nullable": true
                                                                    },
                                                                    "mobile": {
                                                                        "type": "string",
                                                                        "example": "09123456789"
                                                                    },
                                                                    "avatar": {
                                                                        "type": "string",
                                                                        "example": "users/avatars/1.jpg",
                                                                        "nullable": true
                                                                    }
                                                                },
                                                                "type": "object"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "example": [
                                                        {
                                                            "value": 1,
                                                            "label": "علی محمدی (09123456789)",
                                                            "data": {
                                                                "first_name": "علی",
                                                                "last_name": "محمدی",
                                                                "father_name": "احمد",
                                                                "national_code": "1234567890",
                                                                "gender": "male",
                                                                "mobile": "09123456789",
                                                                "avatar": "users/avatars/1.jpg"
                                                            }
                                                        }
                                                    ]
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated - Missing or invalid JWT token"
                    },
                    "403": {
                        "description": "Forbidden - User does not have access to this resource"
                    },
                    "500": {
                        "description": "Internal server error"
                    }
                },
                "security": [
                    {
                        "JWT": []
                    }
                ]
            }
        },
        "/therapists/{therapist}": {
            "get": {
                "tags": [
                    "Wellness - Therapist"
                ],
                "summary": "Get single therapist",
                "operationId": "aba9eac829c6dc879d22fea59763cbc9",
                "parameters": [
                    {
                        "name": "therapist",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/therapists/create": {
            "get": {
                "tags": [
                    "Wellness - Therapist"
                ],
                "summary": "Reference data for Therapist create form",
                "operationId": "b8a90dfc3e5af730c758b221afc10e88",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/therapists": {
            "get": {
                "tags": [
                    "Wellness - Therapist"
                ],
                "summary": "List therapists",
                "operationId": "4cf0a809098ed45a32f0b8a3923b4a4c",
                "parameters": [
                    {
                        "name": "facility_id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "active",
                                "inactive",
                                "suspended"
                            ]
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "search in user.name/phone"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/therapists/{id}/services": {
            "get": {
                "tags": [
                    "Wellness - Therapist"
                ],
                "summary": "Get list of services for a therapist",
                "operationId": "fb3bc047a6601981b1de6be3674cccb1",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Services returned successfully"
                    }
                }
            }
        },
        "/therapists/{therapist_id}/statistics": {
            "get": {
                "tags": [
                    "Wellness - Therapist"
                ],
                "summary": "Get therapist statistics",
                "description": "Returns booking and performance statistics for a specific therapist",
                "operationId": "84fb6acea364a9cc916e96432103f10e",
                "parameters": [
                    {
                        "name": "therapist",
                        "in": "path",
                        "description": "Therapist ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Therapist statistics",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "total_sessions": {
                                            "description": "Total sessions handled by therapist",
                                            "type": "integer",
                                            "example": 120
                                        },
                                        "completed_sessions": {
                                            "description": "Sessions with done status",
                                            "type": "integer",
                                            "example": 100
                                        },
                                        "canceled_sessions": {
                                            "description": "Canceled sessions",
                                            "type": "integer",
                                            "example": 8
                                        },
                                        "total_revenue": {
                                            "description": "Total revenue earned by therapist based on commission",
                                            "type": "number",
                                            "format": "float",
                                            "example": 4500000
                                        },
                                        "total_minutes": {
                                            "description": "Total minutes of therapy delivered",
                                            "type": "integer",
                                            "example": 7200
                                        },
                                        "unique_customers": {
                                            "description": "Number of unique customers served",
                                            "type": "integer",
                                            "example": 65
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Therapist not found"
                    }
                }
            }
        },
        "/therapists/report": {
            "get": {
                "tags": [
                    "Wellness - Therapist"
                ],
                "summary": "Comprehensive therapist report with advanced filters",
                "operationId": "6025bf5fb3b54253e75349421bc6ea7d",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "description": "جستجوی عمومی در نام، موبایل، کدملی، شماره پروانه"
                    },
                    {
                        "name": "first_name",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "last_name",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "mobile",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "national_code",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "gender",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "male",
                                "female",
                                "other"
                            ]
                        }
                    },
                    {
                        "name": "facility_id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "active",
                                "inactive",
                                "suspended"
                            ]
                        }
                    },
                    {
                        "name": "specialty",
                        "in": "query",
                        "description": "جستجو در تخصص‌ها"
                    },
                    {
                        "name": "license_number",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "hire_date_from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "hire_date_to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "commission_rate_min",
                        "in": "query",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "commission_rate_max",
                        "in": "query",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "has_bookings",
                        "in": "query",
                        "description": "فقط تراپیست‌های دارای رزرو",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "true",
                                "false"
                            ]
                        }
                    },
                    {
                        "name": "booking_status",
                        "in": "query",
                        "description": "فیلتر بر اساس وضعیت رزروها"
                    },
                    {
                        "name": "booking_date_from",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "booking_date_to",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "with_stats",
                        "in": "query",
                        "description": "شامل آمار رزروها",
                        "schema": {
                            "type": "string",
                            "default": "true",
                            "enum": [
                                "true",
                                "false"
                            ]
                        }
                    },
                    {
                        "name": "sort_by",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "id",
                                "hire_date",
                                "bookings_count",
                                "total_revenue"
                            ]
                        }
                    },
                    {
                        "name": "sort_dir",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "default": "desc",
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/therapists/report/create-data": {
            "get": {
                "tags": [
                    "Wellness - Therapist"
                ],
                "summary": "Reference data for Therapist report filters",
                "operationId": "1b9fbc2ed447c83a65728be2fa199c74",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/therapist/availabilities/{id}": {
            "get": {
                "tags": [
                    "Wellness - Therapist Availability"
                ],
                "summary": "Get single therapist availability",
                "operationId": "57207857fb571c19da11f41b6ecd2668",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Availability ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Availability found"
                    }
                }
            },
            "put": {
                "tags": [
                    "Wellness - Therapist Availability"
                ],
                "summary": "Update therapist availability",
                "operationId": "853ebc7b28a0b286460062b6e8170a61",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Availability ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 5
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "weekday": {
                                        "type": "string",
                                        "example": "monday"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "example": "10:00"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "example": "18:00"
                                    },
                                    "breaks": {
                                        "type": "array",
                                        "items": {
                                            "example": {
                                                "start": "13:00",
                                                "end": "14:00"
                                            }
                                        }
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Availability updated successfully"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Wellness - Therapist Availability"
                ],
                "summary": "Delete therapist availability",
                "operationId": "6b60e39c84462d480fc7f34ebcb1db01",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Availability ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 5
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Availability deleted successfully"
                    }
                }
            }
        },
        "/therapist/availabilities": {
            "get": {
                "tags": [
                    "Wellness - Therapist Availability"
                ],
                "summary": "List therapist availabilities",
                "operationId": "b22e8e04b3baaceac99c46615f4866b4",
                "parameters": [
                    {
                        "name": "therapist_id",
                        "in": "query",
                        "description": "Filter by therapist id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "weekday",
                        "in": "query",
                        "description": "Filter by weekday",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Availabilities listed successfully"
                    }
                }
            },
            "post": {
                "tags": [
                    "Wellness - Therapist Availability"
                ],
                "summary": "Create new availability slot for a therapist",
                "operationId": "31ab32d5d8f99501e4b529b5728ae9f4",
                "parameters": [
                    {
                        "name": "therapist_id",
                        "in": "path",
                        "description": "Therapist ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "weekday",
                                    "start_time",
                                    "end_time"
                                ],
                                "properties": {
                                    "weekday": {
                                        "type": "string",
                                        "example": "saturday"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "example": "09:00"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "example": "17:00"
                                    },
                                    "breaks": {
                                        "type": "array",
                                        "items": {
                                            "example": {
                                                "start": "12:00",
                                                "end": "13:00"
                                            }
                                        }
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Availability created successfully"
                    }
                }
            }
        },
        "/therapist/availabilities/create": {
            "get": {
                "tags": [
                    "Wellness - Therapist Availability"
                ],
                "summary": "Get reference data for therapist availability creation",
                "operationId": "eedc52ec996cf1a9d493a3ce25b2d7c8",
                "responses": {
                    "200": {
                        "description": "Create data returned successfully"
                    }
                }
            }
        },
        "/therapist-services/{id}": {
            "get": {
                "tags": [
                    "Wellness - Therapist Service"
                ],
                "summary": "Get single therapist-service link",
                "operationId": "d9b4c2dd691b6b18b80b5ba660ddb949",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            },
            "put": {
                "tags": [
                    "Wellness - Therapist Service"
                ],
                "summary": "Update therapist-service link",
                "operationId": "96c7a45233f0ca94127c07395ad08092",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "custom_price": {
                                        "type": "number",
                                        "example": 600000
                                    },
                                    "commission_rate": {
                                        "type": "number",
                                        "example": 30
                                    },
                                    "estimated_duration": {
                                        "type": "integer",
                                        "example": 75
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Updated successfully"
                    }
                }
            },
            "delete": {
                "tags": [
                    "Wellness - Therapist Service"
                ],
                "summary": "Delete therapist-service link",
                "operationId": "12d028fbd603f294ed7017672faf6f8c",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Deleted successfully"
                    }
                }
            }
        },
        "/therapist-services": {
            "get": {
                "tags": [
                    "Wellness - Therapist Service"
                ],
                "summary": "List therapist-service links",
                "operationId": "76dc274d8a995785e4fc84e73150af91",
                "parameters": [
                    {
                        "name": "therapist_id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "service_id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            },
            "post": {
                "tags": [
                    "Wellness - Therapist Service"
                ],
                "summary": "Assign service to therapist",
                "operationId": "8fb26125904d02fbe984cf454f11f259",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "therapist_id",
                                    "service_id"
                                ],
                                "properties": {
                                    "therapist_id": {
                                        "type": "integer",
                                        "example": 5
                                    },
                                    "service_id": {
                                        "type": "integer",
                                        "example": 12
                                    },
                                    "custom_price": {
                                        "type": "number",
                                        "example": 550000
                                    },
                                    "commission_rate": {
                                        "type": "number",
                                        "example": 25
                                    },
                                    "estimated_duration": {
                                        "type": "integer",
                                        "example": 60
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Therapist-service assigned successfully"
                    }
                }
            }
        },
        "/therapist-services/create": {
            "get": {
                "tags": [
                    "Wellness - Therapist Service"
                ],
                "summary": "Reference data for TherapistService form",
                "operationId": "c5a3d3bb480efbeaf47b9f156fb0ba25",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "MenuResource": {
                "title": "Menu Resource",
                "description": "Menu item with detailed information and nested sidebar-style children",
                "properties": {
                    "id": {
                        "description": "Unique identifier for the menu",
                        "type": "integer",
                        "example": 12
                    },
                    "name": {
                        "description": "Internal name of the menu",
                        "type": "string",
                        "example": "electronics"
                    },
                    "title": {
                        "description": "Display title of the menu",
                        "type": "string",
                        "example": "Electronics"
                    },
                    "icon": {
                        "description": "Relative path of the menu icon",
                        "type": "string",
                        "example": "/uploads/icons/electronics.png",
                        "nullable": true
                    },
                    "url": {
                        "description": "Full URL to the menu",
                        "type": "string",
                        "format": "uri",
                        "example": "https://example.com/categories/electronics"
                    },
                    "priority": {
                        "description": "Priority for ordering categories",
                        "type": "integer",
                        "example": 5
                    },
                    "description": {
                        "description": "Optional description of the menu",
                        "type": "string",
                        "example": "All electronic devices and gadgets",
                        "nullable": true
                    },
                    "parent_id": {
                        "description": "Parent menu ID",
                        "type": "integer",
                        "example": 3,
                        "nullable": true
                    },
                    "permission_id": {
                        "description": "Associated permission ID",
                        "type": "integer",
                        "example": 10,
                        "nullable": true
                    },
                    "permission_name": {
                        "description": "Name of the associated permission",
                        "type": "string",
                        "example": "view-electronics"
                    },
                    "children": {
                        "description": "Nested child categories in sidebar format",
                        "type": "array",
                        "items": {
                            "$ref": "object"
                        }
                    }
                },
                "type": "object"
            }
        },
        "responses": {
            "200": {
                "description": "Plan created successfully",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "is_success": {
                                    "type": "boolean",
                                    "example": true
                                },
                                "data": {
                                    "properties": {
                                        "plan": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Basic Plan"
                                                },
                                                "slug": {
                                                    "type": "string",
                                                    "example": "basic"
                                                },
                                                "description": {
                                                    "type": "string",
                                                    "example": "Basic plan for small organizations",
                                                    "nullable": true
                                                },
                                                "duration_days": {
                                                    "type": "integer",
                                                    "example": 30
                                                },
                                                "duration_label": {
                                                    "type": "string",
                                                    "example": "Monthly"
                                                },
                                                "is_active": {
                                                    "type": "boolean",
                                                    "example": true
                                                },
                                                "sort": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "tiers": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "plan_id": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "min_users": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "max_users": {
                                                                "type": "integer",
                                                                "example": 10,
                                                                "nullable": true
                                                            },
                                                            "price": {
                                                                "type": "integer",
                                                                "example": 5900
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "422": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "The given data was invalid."
                                },
                                "errors": {
                                    "properties": {
                                        "name": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The name field is required."
                                            }
                                        },
                                        "slug": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The slug has already been taken."
                                            }
                                        },
                                        "tiers.*.min_users": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The tiers.0.min_users must be at least 1."
                                            }
                                        },
                                        "tiers.*.price": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "The tiers.0.price must be at least 0."
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "401": {
                "description": "Unauthenticated",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "Unauthenticated."
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            },
            "403": {
                "description": "Forbidden - User does not have permission",
                "content": {
                    "application/json": {
                        "schema": {
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "example": "This action is unauthorized."
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            }
        },
        "requestBodies": {
            "StorePlan": {
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {
                            "required": [
                                "name",
                                "slug",
                                "duration_days",
                                "duration_label",
                                "tiers"
                            ],
                            "properties": {
                                "name": {
                                    "description": "Display name of the plan",
                                    "type": "string",
                                    "maxLength": 100,
                                    "example": "Basic Plan"
                                },
                                "slug": {
                                    "description": "Unique identifier slug for the plan",
                                    "type": "string",
                                    "maxLength": 100,
                                    "example": "basic"
                                },
                                "description": {
                                    "description": "Optional description of the plan",
                                    "type": "string",
                                    "example": "Basic plan for small organizations",
                                    "nullable": true
                                },
                                "duration_days": {
                                    "description": "Subscription duration in days",
                                    "type": "integer",
                                    "minimum": 1,
                                    "example": 30
                                },
                                "duration_label": {
                                    "description": "Human readable duration label (e.g., Monthly, Yearly)",
                                    "type": "string",
                                    "example": "Monthly"
                                },
                                "is_active": {
                                    "description": "Whether the plan is active and available for purchase",
                                    "type": "boolean",
                                    "example": true
                                },
                                "sort": {
                                    "description": "Display order for sorting plans",
                                    "type": "integer",
                                    "example": 1
                                },
                                "tiers": {
                                    "description": "List of pricing tiers based on user count",
                                    "type": "array",
                                    "items": {
                                        "required": [
                                            "min_users",
                                            "price"
                                        ],
                                        "properties": {
                                            "min_users": {
                                                "description": "Minimum number of users for this tier",
                                                "type": "integer",
                                                "minimum": 1,
                                                "example": 1
                                            },
                                            "max_users": {
                                                "description": "Maximum number of users for this tier (null = unlimited)",
                                                "type": "integer",
                                                "example": 10,
                                                "nullable": true
                                            },
                                            "price": {
                                                "description": "Price in IRR (Toman) for this tier",
                                                "type": "integer",
                                                "minimum": 0,
                                                "example": 5900
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "minItems": 1
                                }
                            },
                            "type": "object"
                        }
                    }
                }
            }
        }
    },
    "tags": [
        {
            "name": "BPMS - FormBuilder - Element",
            "description": "BPMS - FormBuilder - Element"
        },
        {
            "name": "BPMS - FormBuilder - Form",
            "description": "BPMS - FormBuilder - Form"
        },
        {
            "name": "Basics - Company",
            "description": "Basics - Company"
        },
        {
            "name": "Basics - Dashboard",
            "description": "Basics - Dashboard"
        },
        {
            "name": "Basics - ACL",
            "description": "Basics - ACL"
        },
        {
            "name": "Basics - OrganizationAcl",
            "description": "Basics - OrganizationAcl"
        },
        {
            "name": "Authentication",
            "description": "Authentication"
        },
        {
            "name": "Basics - Plans",
            "description": "Basics - Plans"
        },
        {
            "name": "Plans",
            "description": "Plans"
        },
        {
            "name": "Basics - Menu",
            "description": "Basics - Menu"
        },
        {
            "name": "Basics - Widgets",
            "description": "Basics - Widgets"
        },
        {
            "name": "SMS Log",
            "description": "SMS Log"
        },
        {
            "name": "SMS Logs",
            "description": "SMS Logs"
        },
        {
            "name": "Wellness - Booking",
            "description": "Wellness - Booking"
        },
        {
            "name": "Wellness - Customer Booking",
            "description": "Wellness - Customer Booking"
        },
        {
            "name": "Wellness - Customer Score",
            "description": "Wellness - Customer Score"
        },
        {
            "name": "Wellness - Customer - Form",
            "description": "Wellness - Customer - Form"
        },
        {
            "name": "Wellness - Therapist Booking",
            "description": "Wellness - Therapist Booking"
        },
        {
            "name": "Wellness - Customer",
            "description": "Wellness - Customer"
        },
        {
            "name": "Customer Report",
            "description": "Customer Report"
        },
        {
            "name": "Customers",
            "description": "Customers"
        },
        {
            "name": "Wellness - Facility",
            "description": "Wellness - Facility"
        },
        {
            "name": "Wellness - Resource",
            "description": "Wellness - Resource"
        },
        {
            "name": "Wellness - ResourceType",
            "description": "Wellness - ResourceType"
        },
        {
            "name": "Wellness - Resource Availability",
            "description": "Wellness - Resource Availability"
        },
        {
            "name": "Wellness - Service",
            "description": "Wellness - Service"
        },
        {
            "name": "Services",
            "description": "Services"
        },
        {
            "name": "Wellness - Service Category",
            "description": "Wellness - Service Category"
        },
        {
            "name": "Wellness - Staff",
            "description": "Wellness - Staff"
        },
        {
            "name": "Wellness - Therapist",
            "description": "Wellness - Therapist"
        },
        {
            "name": "Wellness - Therapist Availability",
            "description": "Wellness - Therapist Availability"
        },
        {
            "name": "Wellness - Therapist Service",
            "description": "Wellness - Therapist Service"
        }
    ]
}