bnymn-category 0.1.0

This package allows you to manage categories of any kind
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{CategoryEntity, CategorySaveEntity};

pub trait CategoryRepository {
    /**
     * Saves the given category without saving the children
     */
    fn save(&self, category: CategorySaveEntity) -> CategoryEntity;

    /**
     * Returns a CategoryEntity if found without children
     */
    fn find_by_id(&self, category_id: u64) -> Option<CategoryEntity>;

    /**
     * Deletes the CategoryEntity with the given category_id
     */
    fn delete_by_id(&self, category_id: u64) -> ();
}