<?php

namespace App\Repositories\Contracts;

use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
use Illuminate\Database\Eloquent\Model;

interface BaseRepositoryContract
{

    public function find(int|string $id, array $columns = ['*']): ?Model;


    public function create(array $attributes): Model;

    public function statusToggle(Model $model, string $reason = '', string $column = 'is_active', array $relations = []): array;

    
    public function update(Model $model, array $attributes): bool;

    /**
     * Summary of delete
     * @param Model $model
     * @param array $relations
     * @return array
     */
    public function delete(Model $model, array $relations = []): array;

    /**
     * Summary of bulkDelete
     * @param array $ids
     * @param array $relations Relations to check before deletion
     * @return array Returns ['deleted' => count, 'skipped' => count, 'skipped_ids' => array]
     */
    public function bulkDelete(array $ids, array $relations = []);

    /**
     * Summary of bulkStatus
     * @param array $ids
     * @param bool $status
     * @param string $column
     * @param array $relations Relations to check before status change
     * @return array Returns ['updated' => count, 'skipped' => count, 'skipped_ids' => array]
     */
    public function bulkStatus(array $ids, bool $status, string $column = 'is_active', array $relations = []);
}
