b05e074456
Co-authored-by: ISMAIL MASSERAN <topaz@ISMAILs-Macbook.local> Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local> Reviewed-on: #11
45 lines
1.3 KiB
PHP
45 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Modules\Feedback\Repositories\Contracts;
|
|
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Modules\Feedback\Entities\Feedback;
|
|
|
|
interface FeedbackRepositoryInterface
|
|
{
|
|
/**
|
|
* Get all feedback with pagination and search
|
|
*/
|
|
public function getAllPaginated(int $perPage = 10, string $search = '', string $sortBy = 'id', string $sortOrder = 'asc', array $filters = []);
|
|
|
|
/**
|
|
* Get all feedback with their relationships and pagination with search
|
|
*/
|
|
public function getAllWithRelationsPaginated(int $perPage = 10, string $search = '', string $sortBy = 'id', string $sortOrder = 'asc', array $filters = []);
|
|
|
|
/**
|
|
* Get all feedback with their relationships and search
|
|
*/
|
|
public function getAllWithRelations(string $search = '', string $sortBy = 'id', string $sortOrder = 'asc'): Collection;
|
|
|
|
/**
|
|
* Create a new feedback
|
|
*/
|
|
public function create(array $data): Feedback;
|
|
|
|
/**
|
|
* Find feedback by ID
|
|
*/
|
|
public function findById(string $id): ?Feedback;
|
|
|
|
/**
|
|
* Delete feedback (soft delete)
|
|
*/
|
|
public function delete(string $id): bool;
|
|
|
|
/**
|
|
* Get all feedback
|
|
*/
|
|
public function all(string $search = '', string $sortBy = 'id', string $sortOrder = 'asc'): Collection;
|
|
}
|