package domain import "context" type Repository interface { SaveBrand(ctx context.Context, b *Brand) error GetBrand(ctx context.Context, id string) (*Brand, error) ListBrands(ctx context.Context, ownerUID int64) ([]*Brand, error) DeleteBrand(ctx context.Context, id string) error SaveProduct(ctx context.Context, p *Product) error GetProduct(ctx context.Context, id string) (*Product, error) ListProducts(ctx context.Context, ownerUID int64, brandID string) ([]*Product, error) DeleteProduct(ctx context.Context, id string) error GetActiveBrandID(ctx context.Context, ownerUID int64) (string, error) SetActiveBrandID(ctx context.Context, ownerUID int64, brandID string) error SavePost(ctx context.Context, p *Post) error GetPost(ctx context.Context, id string) (*Post, error) ListPosts(ctx context.Context, ownerUID int64, brandID string) ([]*Post, error) DeletePost(ctx context.Context, id string) error DeletePostsByTheme(ctx context.Context, ownerUID int64, themeKey string) error SaveHomework(ctx context.Context, h *Homework) error GetHomework(ctx context.Context, ownerUID int64, themeKey string) (*Homework, error) ListHomework(ctx context.Context, ownerUID int64) ([]*Homework, error) DeleteHomework(ctx context.Context, ownerUID int64, themeKey string) error GetCrawlerSession(ctx context.Context, ownerUID int64) (*CrawlerSession, error) SetCrawlerSession(ctx context.Context, sess *CrawlerSession) error ClearCrawlerSession(ctx context.Context, ownerUID int64) error }