parking-webapi/WebApi_data_value/Models/ParkingLog.cs

30 lines
819 B
C#
Raw Permalink Normal View History

2024-10-01 02:30:08 +08:00
 using System.ComponentModel.DataAnnotations;
namespace WebApi_data_value.Models
{
public class ParkingLog
{
[Key] // 標示主鍵
public int Id { get; set; }
[Required]
public DateTime Timestamp { get; set; } // 儲存完整的時間
[Required]
public int TotalParkingSpaces { get; set; } // 總車位
[Required]
public int RemainingSpaces { get; set; } // 剩餘車位
[Required]
public int MonthlyRentSpaces { get; set; } // 月租車位
[Required]
public int TemporaryRentSpaces { get; set; } // 臨停車位
[Required]
[StringLength(10)]
public string? DayOfWeek { get; set; }
}
}