aboutsummaryrefslogtreecommitdiff
path: root/src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServiceDetails.cshtml.cs
blob: a89efae8b0b1155c84e0860bb4bc4b97b72a7c34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
namespace Costasdev.ServiceViewer.Views.Services;

public class ServiceDetailsModel
{
    public DateOnly Date { get; set; }
    public string ServiceId { get; set; } = string.Empty;
    public string ServiceName { get; set; } = string.Empty;

    public List<ServiceDetailsItem> Items { get; set; } = [];
    public TimeSpan TotalDrivingTime { get; set; }

    public int TotalDistance { get; set; }
    public string TotalDistanceKm => (TotalDistance / 1000.0).ToString("0.00 km");
}

public class ServiceDetailsItem
{
    public string TripId { get; set; } = string.Empty;
    public string SafeRouteId { get; set; } = string.Empty;
    public string ShortName { get; set; } = string.Empty;
    public string LongName { get; set; } = string.Empty;
    public string TotalDistance { get; set; } = string.Empty;

    public string FirstStopTime { get; set; } = string.Empty;
    public string FirstStopName { get; set; } = string.Empty;

    public string LastStopTime { get; set; } = string.Empty;
    public string LastStopName { get; set; } = string.Empty;
}