package repository

import (
	"context"

	"haixun-backend/internal/model/brand/domain/entity"
)

type Repository interface {
	EnsureIndexes(ctx context.Context) error
	Create(ctx context.Context, brand *entity.Brand) (*entity.Brand, error)
	FindByID(ctx context.Context, tenantID, ownerUID, brandID string) (*entity.Brand, error)
	ListByOwner(ctx context.Context, tenantID, ownerUID string) ([]*entity.Brand, error)
	Update(ctx context.Context, tenantID, ownerUID, brandID string, patch map[string]interface{}) (*entity.Brand, error)
	SoftDelete(ctx context.Context, tenantID, ownerUID, brandID string) error
	PushProduct(ctx context.Context, tenantID, ownerUID, brandID string, product entity.Product) (*entity.Product, error)
	UpdateProduct(ctx context.Context, tenantID, ownerUID, brandID, productID string, patch map[string]interface{}) (*entity.Product, error)
	PullProduct(ctx context.Context, tenantID, ownerUID, brandID, productID string) error
}
