Some checks failed
Deploy Application / deploy (push) Has been cancelled
40 lines
864 B
PHP
40 lines
864 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Framework\Database\Seed;
|
|
|
|
/**
|
|
* Interface for database seeders
|
|
*
|
|
* Seeders are used to populate the database with initial data.
|
|
* They are idempotent and can be run multiple times safely.
|
|
*/
|
|
interface Seeder
|
|
{
|
|
/**
|
|
* Execute the seeder
|
|
*
|
|
* This method should be idempotent - running it multiple times
|
|
* should produce the same result without creating duplicates.
|
|
*/
|
|
public function seed(): void;
|
|
|
|
/**
|
|
* Get the unique name of this seeder
|
|
*
|
|
* Used for tracking which seeders have been executed.
|
|
*
|
|
* @return string Unique seeder name
|
|
*/
|
|
public function getName(): string;
|
|
|
|
/**
|
|
* Get a human-readable description of what this seeder does
|
|
*
|
|
* @return string Description
|
|
*/
|
|
public function getDescription(): string;
|
|
}
|
|
|