package service

import (
	"context"

	"Engine/internal/database"
	"Engine/internal/model"
)

type BudgetService struct {
	repo *database.BudgetRepo
}

func NewBudgetService(repo *database.BudgetRepo) *BudgetService {
	return &BudgetService{repo: repo}
}

func (s *BudgetService) Create(ctx context.Context, req model.CreateBudgetRequest) (*model.Budget, error) {
	return s.repo.Create(ctx, req)
}

func (s *BudgetService) Update(ctx context.Context, id int, req model.UpdateBudgetRequest) (*model.Budget, error) {
	return s.repo.Update(ctx, id, req)
}

func (s *BudgetService) Delete(ctx context.Context, id int) error {
	return s.repo.Delete(ctx, id)
}
