1 | <?php |
||
7 | class QueryRepository |
||
8 | { |
||
9 | private const VALIDATE_CREDENTIALS_QUERY = 'createdDate > now()'; |
||
10 | private const FETCH_ALL_TICKETS_QUERY = 'status in ' |
||
11 | . "('Work finished', 'Work in progress') " |
||
12 | . "OR (status = Done AND status changed AFTER startOfDay('-24h')) " |
||
13 | . 'ORDER BY key ASC'; |
||
14 | |||
15 | private const FETCH_TICKETS_BY_STATUS_QUERY = 'status = "%s"'; |
||
16 | private const FETCH_PARTICULAR_TICKET = 'key = %s'; |
||
17 | |||
18 | public function validateCredentials() : string |
||
22 | |||
23 | public function fetchAllTickets() : string |
||
27 | |||
28 | public function fetchTicketsByStatus(string $status) : string |
||
32 | |||
33 | public function fetchParticularTicket(string $key) : string |
||
37 | } |
||
38 |