30 lines
819 B
C#
30 lines
819 B
C#
|
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; }
|
|||
|
}
|
|||
|
}
|