29 lines
516 B
PHP
29 lines
516 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Domain\Ingredients;
|
||
|
|
|
||
|
|
use App\Domain\Repository;
|
||
|
|
use App\Domain\Model;
|
||
|
|
|
||
|
|
class IngredientRepository extends Repository {
|
||
|
|
|
||
|
|
public static function getEntity(): string
|
||
|
|
{
|
||
|
|
return Ingredient::class;
|
||
|
|
}
|
||
|
|
|
||
|
|
public static function getStructure(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'table' => 'Ingredient',
|
||
|
|
'columns' => [
|
||
|
|
'num_ingredient', 'nom_ingredient'
|
||
|
|
]
|
||
|
|
];
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
public function add( Model $ingredient ): bool {
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|