first init
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\User\Repositories\Contracts;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Modules\Auth\Entities\User;
|
||||
|
||||
interface UserRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Get all Users with pagination and search
|
||||
*/
|
||||
public function getAllPaginated(int $perPage = 10, string $search = '');
|
||||
|
||||
/**
|
||||
* Get all Users with their relationships and pagination with search
|
||||
*/
|
||||
public function getAllWithRelationsPaginated(
|
||||
int $perPage = 10,
|
||||
string $search = '',
|
||||
string $status = '',
|
||||
string $sortBy = 'name',
|
||||
string $sortOrder = 'asc'
|
||||
);
|
||||
|
||||
/**
|
||||
* Get all Users with their relationships and search
|
||||
*/
|
||||
public function getAllWithRelations(string $search = ''): Collection;
|
||||
|
||||
/**
|
||||
* Create a new User
|
||||
*/
|
||||
public function create(array $data): User;
|
||||
|
||||
/**
|
||||
* Find User by ID
|
||||
*/
|
||||
public function findById(string $id): ?User;
|
||||
|
||||
/**
|
||||
* Delete User (soft delete)
|
||||
*/
|
||||
public function delete(string $id): bool;
|
||||
|
||||
/**
|
||||
* Get all Users
|
||||
*/
|
||||
public function all(string $search = ''): Collection;
|
||||
}
|
||||
Reference in New Issue
Block a user