testpush for feature
Some checks are pending
🧪 Go CI Pipeline / Build & Test Go Application (push) Waiting to run
Some checks are pending
🧪 Go CI Pipeline / Build & Test Go Application (push) Waiting to run
This commit is contained in:
parent
816d3279c0
commit
c49cc6e72e
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue