1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! `MediaCollection` — hierarchical "where the file lives" folders.
//! One [`Media`] row belongs to at most one collection; collections
//! nest via `parent_id`.
//!
//! Sibling to [`crate::media::tag::MediaTag`]: collections express
//! exclusive location ("/products/2026/launch/"), tags express
//! inclusive labels ("featured", "approved"). Both are
//! orthogonal — Media has at most one collection FK and any number
//! of tag M2M rows.
//!
//! Soft-deleted via `deleted_at`. `slug` is unique and path-friendly.
//! A managed `#[derive(Model)]` on a `rustango_*` table, so its schema is
//! emitted as an ordinary **system migration** — there is no lazy
//! `ensure_*` creation layer.
//!
//! [`Media`]: crate::media::Media
use crateAuto;
/// One folder. Cheap to clone.