init push

This commit is contained in:
2026-07-16 22:16:45 +07:00
commit 8b068bdb10
1021 changed files with 332816 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
package service
import (
"context"
"wucher/internal/domain/mcf"
)
type MCFService struct{ repo mcf.Repository }
func NewMCFService(repo mcf.Repository) *MCFService { return &MCFService{repo: repo} }
func (s *MCFService) Create(ctx context.Context, row *mcf.MaintenanceCheckFlight) error {
return s.repo.Create(ctx, row)
}
func (s *MCFService) Update(ctx context.Context, row *mcf.MaintenanceCheckFlight) error {
return s.repo.Update(ctx, row)
}
func (s *MCFService) Delete(ctx context.Context, id []byte, deletedBy []byte) error {
return s.repo.Delete(ctx, id, deletedBy)
}
func (s *MCFService) GetByID(ctx context.Context, id []byte) (*mcf.MaintenanceCheckFlight, error) {
return s.repo.GetByID(ctx, id)
}
func (s *MCFService) ListByHelicopter(ctx context.Context, helicopterID []byte) ([]mcf.MaintenanceCheckFlight, error) {
return s.repo.ListByHelicopter(ctx, helicopterID)
}
func (s *MCFService) GetLatestByHelicopter(ctx context.Context, helicopterID []byte) (*mcf.MaintenanceCheckFlight, error) {
return s.repo.GetLatestByHelicopter(ctx, helicopterID)
}
func (s *MCFService) LatestByHelicopterIDs(ctx context.Context, helicopterIDs [][]byte) (map[string]*mcf.MaintenanceCheckFlight, error) {
return s.repo.LatestByHelicopterIDs(ctx, helicopterIDs)
}
func (s *MCFService) PendingHelicopterIDs(ctx context.Context, helicopterIDs [][]byte) (map[string]bool, error) {
return s.repo.PendingHelicopterIDs(ctx, helicopterIDs)
}
func (s *MCFService) HelicopterHasOpenMCF(ctx context.Context, helicopterID []byte) (bool, error) {
return s.repo.HelicopterHasOpenMCF(ctx, helicopterID)
}