mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-24 08:53:05 +03:00
This commit is contained in:
parent
dfacdc901a
commit
50ec06b29c
2 changed files with 41 additions and 2 deletions
|
@ -87,6 +87,33 @@ class Appointments_api_v1 extends EA_Controller {
|
||||||
$where['DATE(end_datetime) <='] = (new DateTime($till))->format('Y-m-d');
|
$where['DATE(end_datetime) <='] = (new DateTime($till))->format('Y-m-d');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Service ID query param.
|
||||||
|
|
||||||
|
$service_id = request('serviceId');
|
||||||
|
|
||||||
|
if ( ! empty($service_id))
|
||||||
|
{
|
||||||
|
$where['id_services'] = $service_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Provider ID query param.
|
||||||
|
|
||||||
|
$provider_id = request('providerId');
|
||||||
|
|
||||||
|
if ( ! empty($provider_id))
|
||||||
|
{
|
||||||
|
$where['id_users_provider'] = $provider_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Customer ID query param.
|
||||||
|
|
||||||
|
$customer_id = request('customerId');
|
||||||
|
|
||||||
|
if ( ! empty($customer_id))
|
||||||
|
{
|
||||||
|
$where['id_users_customer'] = $customer_id;
|
||||||
|
}
|
||||||
|
|
||||||
$appointments = empty($keyword)
|
$appointments = empty($keyword)
|
||||||
? $this->appointments_model->get($where, $limit, $offset, $order_by)
|
? $this->appointments_model->get($where, $limit, $offset, $order_by)
|
||||||
: $this->appointments_model->search($keyword, $limit, $offset, $order_by);
|
: $this->appointments_model->search($keyword, $limit, $offset, $order_by);
|
||||||
|
|
16
openapi.yml
16
openapi.yml
|
@ -104,14 +104,26 @@ paths:
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: start
|
- name: from
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: end
|
- name: till
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
- name: serviceId
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: providerId
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- name: customerId
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
|
|
Loading…
Reference in a new issue