package collection // Repository defines the data access operations for collections type Repository interface { // Create stores a new collection record Create(collection *Collection) error // Get retrieves a collection by its ID Get(id string) (*Collection, error) // Update modifies an existing collection record Update(collection *Collection) error // Delete removes a collection record by its ID Delete(id string) error // List returns all collection records List() ([]*Collection, error) // ListByParent returns all collections with a specific parent ID ListByParent(parentID string) ([]*Collection, error) // ListRoot returns all root-level collections (no parent) ListRoot() ([]*Collection, error) // Exists checks if a collection with the given ID exists Exists(id string) (bool, error) }