first commot
This commit is contained in:
27
Entity/WeatherForecast.cs
Normal file
27
Entity/WeatherForecast.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 天气预报实体
|
||||
/// </summary>
|
||||
public class WeatherForecast : BaseEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 日期
|
||||
/// </summary>
|
||||
public DateOnly Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 摄氏温度
|
||||
/// </summary>
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 摄氏度转华氏度
|
||||
/// </summary>
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
/// <summary>
|
||||
/// 天气摘要
|
||||
/// </summary>
|
||||
public string? Summary { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user