initial commit

This commit is contained in:
m.zare
2026-04-10 18:25:21 +03:30
commit 77ca6c34a3
263 changed files with 34470 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
package asset
import (
"context"
"github.com/google/uuid"
)
type AssetRepository interface {
Create(ctx context.Context, asset *Asset) error
FindByID(ctx context.Context, id uuid.UUID) (*Asset, error)
Update(ctx context.Context, asset *Asset) error
Delete(ctx context.Context, asset *Asset) error
FindByProfileID(ctx context.Context, profileID uuid.UUID) ([]*Asset, error)
FindLatest(ctx context.Context, limit, offset int) ([]*Asset, error)
FindLatestByCategory(ctx context.Context, categoryID uuid.UUID, limit int) ([]*Asset, error)
FindLatestByCategoryPaginated(ctx context.Context, categoryID uuid.UUID, limit, offset int) ([]*Asset, error)
CountByCategory(ctx context.Context, categoryID uuid.UUID) (int, error)
Count(ctx context.Context) (int, error)
}
type CategoryRepository interface {
Create(ctx context.Context, category *Category) error
FindByID(ctx context.Context, id uuid.UUID) (*Category, error)
Update(ctx context.Context, category *Category) error
Delete(ctx context.Context, id uuid.UUID) error
FindAll(ctx context.Context) ([]*Category, error)
FindByIDs(ctx context.Context, ids []uuid.UUID) ([]*Category, error)
}