add latitude & longitude

This commit is contained in:
2023-07-05 17:33:22 +08:00
parent 4bf330f824
commit 32464cb494
14 changed files with 581 additions and 31 deletions

View File

@ -8,7 +8,7 @@ namespace Blahblah.FlowerStory.Server.Data.Model;
/// 花草对象
/// </summary>
[Table("flowers")]
public class FlowerItem
public class FlowerItem : ILocation
{
/// <summary>
/// 自增 id主键
@ -83,4 +83,22 @@ public class FlowerItem
/// 封面相关照片
/// </summary>
public ICollection<PhotoItem>? Photos { get; set; }
/// <summary>
/// 纬度
/// </summary>
[Column("latitude")]
public double? Latitude { get; set; }
/// <summary>
/// 经度
/// </summary>
[Column("longitude")]
public double? Longitude { get; set; }
/// <summary>
/// 距离(米)
/// </summary>
[NotMapped]
public int? Distance { get; set; }
}