haixunMaster/haixun-backend/internal/model/persona/domain/repository/repository.go

17 lines
631 B
Go
Raw Normal View History

2026-06-23 16:55:10 +00:00
package repository
import (
"context"
"haixun-backend/internal/model/persona/domain/entity"
)
type Repository interface {
EnsureIndexes(ctx context.Context) error
Create(ctx context.Context, persona *entity.Persona) (*entity.Persona, error)
FindByID(ctx context.Context, tenantID, ownerUID, personaID string) (*entity.Persona, error)
ListByOwner(ctx context.Context, tenantID, ownerUID string) ([]*entity.Persona, error)
Update(ctx context.Context, tenantID, ownerUID, personaID string, patch map[string]interface{}) (*entity.Persona, error)
SoftDelete(ctx context.Context, tenantID, ownerUID, personaID string) error
2026-06-24 10:02:42 +00:00
}