31 lines
620 B
PHP
31 lines
620 B
PHP
<?php
|
|
|
|
|
|
namespace TorstenHettstedt\TimekeepingApi\Repositories;
|
|
|
|
/**
|
|
* @template T of \TorstenHettstedt\TimekeepingApi\Models\ModelInterface
|
|
*/
|
|
interface RepositoryWriterInterface
|
|
{
|
|
/**
|
|
* @param T $model
|
|
*
|
|
* @throws RepositoryRecordAlreadyExistException
|
|
*/
|
|
public function insert(mixed $model): void;
|
|
|
|
/**
|
|
* @param T $model
|
|
*
|
|
* @throws RepositoryRecordNotFoundException
|
|
*/
|
|
public function update(mixed $model): void;
|
|
|
|
/**
|
|
* @param T $model
|
|
*
|
|
* @throws RepositoryRecordNotFoundException
|
|
*/
|
|
public function delete(mixed $model): void;
|
|
} |