Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Http\Repositories\interfaces; |
| 4 | |
| 5 | use App\Http\Models\InAppNotificationCampaign; |
| 6 | use Illuminate\Database\Eloquent\Collection; |
| 7 | |
| 8 | /** |
| 9 | * Interface for in-app notification campaign data access operations. |
| 10 | */ |
| 11 | interface IInAppNotificationCampaignRepository |
| 12 | { |
| 13 | /** |
| 14 | * Get all campaigns ordered by priority. |
| 15 | * |
| 16 | * @return Collection<int, InAppNotificationCampaign> |
| 17 | */ |
| 18 | public function getAll(): Collection; |
| 19 | |
| 20 | /** |
| 21 | * Get a campaign by its ID. |
| 22 | */ |
| 23 | public function getById(string $id): ?InAppNotificationCampaign; |
| 24 | |
| 25 | /** |
| 26 | * Get all active campaigns that have not expired. |
| 27 | * |
| 28 | * @return Collection<int, InAppNotificationCampaign> |
| 29 | */ |
| 30 | public function getActiveCampaigns(): Collection; |
| 31 | |
| 32 | /** |
| 33 | * Create a new campaign. |
| 34 | * |
| 35 | * @param array<string, mixed> $data |
| 36 | */ |
| 37 | public function create(array $data): InAppNotificationCampaign; |
| 38 | |
| 39 | /** |
| 40 | * Update an existing campaign. |
| 41 | * |
| 42 | * @param array<string, mixed> $data |
| 43 | */ |
| 44 | public function update(InAppNotificationCampaign $campaign, array $data): InAppNotificationCampaign; |
| 45 | |
| 46 | /** |
| 47 | * Delete a campaign. |
| 48 | */ |
| 49 | public function delete(InAppNotificationCampaign $campaign): bool; |
| 50 | } |