# Data Model: File Storage Management & UI

## Entities

### StorageConfig
*Configuration for the storage system.*

| Field | Type | Description | Constraints |
|---|---|---|---|
| `root_path` | `string` | Absolute path to the storage root directory. | Must be a valid, writable path. Default: `../ss-tools-storage` |
| `backup_structure_pattern` | `string` | Pattern for backup directory structure. | Default: `{category}/` |
| `repo_structure_pattern` | `string` | Pattern for repository directory structure. | Default: `{category}/` |
| `filename_pattern` | `string` | Pattern for filenames. | Default: `{name}_{timestamp}` |

### StoredFile
*Representation of a file in the storage system.*

| Field | Type | Description | Constraints |
|---|---|---|---|
| `name` | `string` | Name of the file (including extension). | No path separators. |
| `path` | `string` | Relative path from storage root. | |
| `size` | `integer` | Size of the file in bytes. | >= 0 |
| `created_at` | `datetime` | Creation timestamp. | |
| `category` | `enum` | Category of the file. | `backup`, `repository` |
| `mime_type` | `string` | MIME type of the file. | Optional |

## Directory Structure

```text
{root_path}/
├── backups/
│   └── {filename}.zip
└── repositories/
    └── {filename}.zip