WorkSchedule


Horarios de trabajo. Permite que el sistema cambie el estado de disponibilidad de Comprany o Branch según los horarios registrados. Además, premite restringir las fechas y horas para admitir pedidos.

Modelo WorkSchedule

{
    "id": 308,
    "day": 0,
    "hour_from": "10:30",
    "hour_to": "00:00",
    "created_at": "2020-12-11 04:56:24",
    "updated_at": "2020-12-11 04:56:24",
    "company_id": 3,
    "branch_id": 2,
    "options": 196608
}

Insertar WorkSchedule

Insertar WorkSchedule de Branch

Store a newly created resource in storage.

Método URI Cabeceras
POST /companies/{companyId}/branches/{branchId}/work-schedules Authorization
{
    "day": "required|integer|min:0|max:6",
    "hour_from": {
        "required": true,
        "string": true,
        "regex": "/^([0-1][0-9]|2[0-3]):[0|3]0$/"
    },
    "hour_to": {
        "required": true,
        "string": true,
        "regex": "/^([0-1][0-9]|2[0-3]):[0|3]0$/"
    },
    "interval": [
        "boolean"
    ],
    "monthly_interval": "boolean"
}

Listar WorkSchedule

Listar WorkSchedule de Branch

{info} Soporta: Paginación Filters Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/branches/{branchId}/work-schedules N/A

Actualizar WorkSchedule

Actualizar WorkSchedule de Branch

Método URI Cabeceras
PATCH /companies/{companyId}/branches/{branchId}/work-schedules/{workScheduleId} Authorization
{
    "day": "required|integer|min:0|max:6",
    "hour_from": {
        "required": true,
        "string": true,
        "regex": "/^([0-1][0-9]|2[0-3]):[0|3]0$/"
    },
    "hour_to": {
        "required": true,
        "string": true,
        "regex": "/^([0-1][0-9]|2[0-3]):[0|3]0$/"
    },
    "interval": [
        "boolean"
    ],
    "monthly_interval": "boolean"
}

Sincronizar WorkSchedule

Sincronizar WorkSchedule de Branch

Método URI Cabeceras
PUT /companies/{companyId}/branches/{branchId}/work-schedules Authorization
[
    {
        "day": "required|integer|min:0|max:6",
        "hour_from": {
            "required": true,
            "string": true,
            "regex": "/^([0-1][0-9]|2[0-3]):[0|3]0$/"
        },
        "hour_to": {
            "required": true,
            "string": true,
            "regex": "/^([0-1][0-9]|2[0-3]):[0|3]0$/"
        },
        "interval": [
            "boolean"
        ],
        "monthly_interval": "boolean"
    }
]

Eliminar WorkSchedule

Eliminar WorkSchedule de Branch

Método URI Cabeceras
DELETE /companies/{companyId}/branches/{branchId}/work-schedules/{workScheduleId} Authorization

Acciones de WorkSchedule

Index By Blocks

{info} Soporta: Paginación Filters Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/branches/{branchId}/work-schedules/by-blocks N/A

Index For Ordering

{info} Soporta: Paginación Filters Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/branches/{branchId}/work-schedules/for-ordering N/A

Enlaces de WorkSchedule