RepositoryInterface.php 670 Bytes
Newer Older
王源's avatar
王源 committed
1 2 3 4 5 6 7 8 9 10 11 12 13
<?php

/**
 * Created by PhpStorm.
 * User: zero
 * Date: 2020/2/7
 * Time: 13:42
 */

namespace Meibuyu\Micro\Repository\Contracts;

interface RepositoryInterface
{
王源's avatar
王源 committed
14 15
    public function list();

王源's avatar
王源 committed
16 17 18 19 20 21
    public function show($id);

    /**
     * @param array $columns
     * @return mixed
     */
王源's avatar
王源 committed
22 23 24 25 26 27 28 29 30 31 32 33 34
    public function all($columns = array('*'));

    public function paginate($perPage = 10, $columns = array('*'));

    public function create(array $attributes);

    public function update(array $attributes, $id);

    public function delete($id);

    public function find($id, $columns = array('*'));

    public function findBy($field, $value, $columns = array('*'));
35

王源's avatar
王源 committed
36
}