ibms-dome/Backend/Models/Parking.cs

66 lines
1.7 KiB
C#
Raw Permalink Normal View History

2022-10-14 16:08:54 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Backend.Models
{
public enum VehicleTypeEnum : byte
{
Car = 1, //汽車
MOTO = 2, //機車
}
public class ParkingConfig
{
public string Host { get; set; }
public string Prefix { get; set; }
public string ApiBase { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public string VendorId { get; set; }
public string VendorToken { get; set; }
2022-10-14 16:08:54 +08:00
}
public class SpaceResponse
{
public string Code { get; set; }
public Payload Payload { get; set; }
}
public class Payload
{
public List<CarType> Car_types { get; set; } //該場地所有車位資訊
public List<Area> Areas { get; set; }
}
public class CarType
{
2023-11-02 13:19:23 +08:00
public string Vehicle_type_id { get; set; } //車種(請參照車種列表)
2022-10-14 16:08:54 +08:00
public int Total { get; set; } //該車種總車位數
public int Remain { get; set; } //該車種剩餘車位數
}
public partial class Area
{
public string Name { get; set; }
2023-11-02 13:19:23 +08:00
public string Vehicle_type_id { get; set; }
2022-10-14 16:08:54 +08:00
public int Total { get; set; }
public int Remain { get; set; }
}
public class EquipmentResponse
{
public string Code { get; set; }
public List<EquipmentPayload> Payload { get; set; }
}
public class EquipmentPayload
{
2023-11-02 13:19:23 +08:00
public string Id { get; set; }
2022-10-14 16:08:54 +08:00
public string Name { get; set; }
public string Type { get; set; }
public bool Alive { get; set; }
}
}