Notification and parking zones
All checks were successful
Build, Push and Run Container / build (push) Successful in 37s

This commit is contained in:
2025-08-20 12:00:41 +02:00
parent 326c46cb27
commit a9121cf48e
8 changed files with 138316 additions and 10 deletions

View File

@@ -0,0 +1,47 @@
namespace ProofOfConcept.Models;
public class ParkingState
{
public bool CarParked { get; set; }
public bool ParkingInProgress { get; set; }
public DateTimeOffset? CarParkedAt { get; set; }
public DateTimeOffset? ParkingStartedAt { get; set; }
public DateTimeOffset? ParkingStoppedAt { get; set; }
public void SetCarParked()
{
if (!CarParked)
{
CarParked = true;
CarParkedAt = DateTimeOffset.Now;
}
}
public void SetCarMoved()
{
if (CarParked)
{
CarParked = false;
CarParkedAt = null;
}
}
public void SetParkingStarted()
{
if (!ParkingInProgress)
{
ParkingInProgress = true;
ParkingStartedAt = DateTimeOffset.Now;
}
}
public void SetParkingStopped()
{
if (ParkingInProgress)
{
ParkingInProgress = false;
ParkingStoppedAt = DateTimeOffset.Now;
}
}
}