# Folder Structure

#### Seed Data Directory

Each module contains a `Database/Seeds` directory containing all files to seed the database for that module, including the`Seeder` class that specifies each seed data class. The seed data classes themselves are located in the `Database/Seeds/Data` directory.

#### Example:

```
- app
  - Modules
    - Events
      - Database
	- Seeds
	  - Data
    - Exams
      - Database
	- Seeds
	  - Data
```

#### Seed Data Location:

Seed data should be located in the module responsible for managing that data.&#x20;

{% hint style="success" %}
For instance, the Cases module uses Events, Courses, Curriculum Periods, Course Units and Weeks.

The seed data for Event models and tables used for the Cases tests should be under the Events module's seed data.
{% endhint %}

Sub-folders within the module's seed directory can be created for the purpose of organizing the files according to which other module depends on them. For instance:

```php
- app
  - Modules
    - Events
      - Database
	- Seeds
	  - Data
	    - Cases
	      - EventSeedData.php
	    - Exams
	      - EventSeedData.php
```

{% hint style="info" %}
Sub-folders for module-dependencies reduces confusion about which module is some seed data being inserted for.
{% endhint %}

{% hint style="warning" %}
Be mindful not to duplicate IDs across the different module sub-folders for the same entity.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.elentra.org/api/automated-testing/seed-data/folder-structure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
