testpush for feature
Some checks are pending
🧪 Go CI Pipeline / Build & Test Go Application (push) Waiting to run

This commit is contained in:
Oliver Wallisch 2026-03-13 16:34:52 +01:00
parent 816d3279c0
commit c49cc6e72e
3 changed files with 10 additions and 3 deletions

View file

@ -21,4 +21,6 @@ type SensorService interface {
type StatusRepository interface {
SetDeviceActive(ctx context.Context, deviceID string) error
GetAllDevices(ctx context.Context) ([]string, error)
// GetDeviceByID(ctx context.Context, deviceID string) (models.Device, error)
GettAllActiveDevices(ctx context.Context) ([]models.DeviceTimeSummary, error)
}

View file

@ -13,8 +13,6 @@ type Device struct {
ID string `json:"id" gorm:"primaryKey"`
DeviceName string `json:"device_name"`
CreatedAt time.Time `json:"created_at"`
Customer Customer `json:"-" gorm:"foreignKey:CustomerID"`
}
type SensorData struct {
@ -33,3 +31,10 @@ type SensorPayload struct {
Humidity float64 `json:"humidity"`
Pressure float64 `json:"pressure"`
}
type DeviceTimeSummary struct {
DeviceID string `json:"device_id"`
LastSeen time.Time `json:"last_seen"`
}
type DeviceListResponse struct {
Devices []DeviceTimeSummary `json:"devices"`
}

View file

@ -36,7 +36,7 @@ services:
dockerfile: backend/Dockerfile
container_name: growmetrics_backend
ports:
- "1323:1323" # <--- Diese Zeile MUSS rein!
- "1323:1323"
env_file:
- .env
restart: always