ibms-dome/Backend/Models/Parking.cs

66 lines
1.7 KiB
C#

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; }
}
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
{
public string Vehicle_type_id { get; set; } //車種(請參照車種列表)
public int Total { get; set; } //該車種總車位數
public int Remain { get; set; } //該車種剩餘車位數
}
public partial class Area
{
public string Name { get; set; }
public string Vehicle_type_id { get; set; }
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
{
public string Id { get; set; }
public string Name { get; set; }
public string Type { get; set; }
public bool Alive { get; set; }
}
}