yavsc/Yavsc/Models/Relationship/Location.cs

38 lines
851 B
C#
Raw Normal View History

2016-05-17 18:22:18 +02:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2017-01-19 12:59:49 +01:00
namespace Yavsc.Models.Relationship
2016-05-17 18:22:18 +02:00
{
/// <summary>
/// Position.
/// </summary>
2016-07-27 10:55:44 +02:00
public class Position
2016-05-17 18:22:18 +02:00
{
/// <summary>
/// The longitude.
/// </summary>
[Required(),Display(Name="Longitude")]
[Range(-180, 360.0)]
public double Longitude { get; set; }
/// <summary>
///
/// The latitude.
/// </summary>
[Required(),Display(Name="Latitude")]
[Range(-90, 90 )]
public double Latitude { get; set; }
}
2018-01-15 14:09:19 +01:00
public class Location : Position, ILocation {
2016-05-17 18:22:18 +02:00
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required(),
2016-10-23 01:31:09 +02:00
Display(Name="Address"),
MaxLength(512)]
2016-05-17 18:22:18 +02:00
public string Address { get; set; }
}
}