package service

import (
	"context"

	takeover "wucher/internal/domain/takeover"
)

type TakeoverModuleService struct {
	repo takeover.Repository
}

func NewTakeoverModuleService(repo takeover.Repository) *TakeoverModuleService {
	return &TakeoverModuleService{repo: repo}
}

func (s *TakeoverModuleService) Create(ctx context.Context, row *takeover.TakeoverAc) error {
	return s.repo.Create(ctx, row)
}

func (s *TakeoverModuleService) Update(ctx context.Context, row *takeover.TakeoverAc) error {
	return s.repo.Update(ctx, row)
}

func (s *TakeoverModuleService) Delete(ctx context.Context, id []byte, deletedBy []byte) error {
	return s.repo.Delete(ctx, id, deletedBy)
}

func (s *TakeoverModuleService) GetByID(ctx context.Context, id []byte) (*takeover.TakeoverAc, error) {
	return s.repo.GetByID(ctx, id)
}

func (s *TakeoverModuleService) List(ctx context.Context, limit, offset int) ([]takeover.TakeoverAc, int64, error) {
	return s.repo.List(ctx, limit, offset)
}
