feat: add services and separate further

This commit is contained in:
2026-04-29 13:25:38 +02:00
parent 6c28aea655
commit 8f6b1efea0
16 changed files with 318 additions and 168 deletions
+21
View File
@@ -0,0 +1,21 @@
package service
import (
"orbits-server/internal/server/database"
"gorm.io/gorm"
)
type CtlService struct {
db *gorm.DB
}
func NewControlService(db *gorm.DB) *CtlService {
return &CtlService{
db: db,
}
}
func (s *CtlService) ListLatestCommand() (database.Command, error) {
return database.LatestCommand(s.db)
}