Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue