basic online

This commit is contained in:
zipfriis
2026-03-20 14:01:46 +01:00
parent 5083212e07
commit cd2db504d1
16 changed files with 1137 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
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, amount float64, notes, changedBy string) (*model.Budget, error) {
return s.repo.Update(ctx, id, amount, notes, changedBy)
}
func (s *BudgetService) Delete(ctx context.Context, id int) error {
return s.repo.Delete(ctx, id)
}