20 lines
391 B
Go
20 lines
391 B
Go
package notes
|
|
|
|
import (
|
|
"context"
|
|
|
|
"crm-core/internal/domain/notes"
|
|
)
|
|
|
|
type Repository interface {
|
|
Create(ctx context.Context, note notes.Note) (notes.Note, error)
|
|
List(ctx context.Context, tenantID string, entityType *string, entityID *string) ([]notes.Note, error)
|
|
}
|
|
|
|
type Service struct {
|
|
repo Repository
|
|
}
|
|
|
|
func NewService(repo Repository) *Service {
|
|
return &Service{repo: repo}
|
|
}
|