core/crm-core/internal/application/accounts/service.go
2025-12-27 14:32:00 -03:00

23 lines
591 B
Go

package accounts
import (
"context"
"crm-core/internal/domain/accounts"
)
type Repository interface {
Create(ctx context.Context, account accounts.Account) (accounts.Account, error)
Update(ctx context.Context, account accounts.Account) (accounts.Account, error)
List(ctx context.Context, tenantID string) ([]accounts.Account, error)
Get(ctx context.Context, tenantID, id string) (accounts.Account, error)
Archive(ctx context.Context, tenantID, id string) error
}
type Service struct {
repo Repository
}
func NewService(repo Repository) *Service {
return &Service{repo: repo}
}