40 lines
657 B
PHP
40 lines
657 B
PHP
<?php
|
|
|
|
namespace Aether;
|
|
|
|
interface AetherCrudInterface
|
|
{
|
|
/**
|
|
* 列表
|
|
* @return array
|
|
*/
|
|
public function list(): array;
|
|
|
|
/**
|
|
* 查询
|
|
* @param int $id
|
|
* @return object
|
|
*/
|
|
public function detail(int $id): object;
|
|
/**
|
|
* 新增
|
|
* @param array $data
|
|
* @return int
|
|
*/
|
|
public function create(array $data): int;
|
|
|
|
/**
|
|
* 更新
|
|
* @param int $id
|
|
* @param array $data
|
|
* @return bool
|
|
*/
|
|
public function update(int $id, array $data): bool;
|
|
|
|
/**
|
|
* 删除
|
|
* @param int $id
|
|
* @return bool
|
|
*/
|
|
public function delete(int $id): bool;
|
|
} |