39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using AutoMapper;
|
|
using LeafWeb.Core.Entities;
|
|
|
|
namespace LeafWeb.WebCms.Models
|
|
{
|
|
public class LeafInputDataSiteViewModel
|
|
{
|
|
/// <summary>Site identifier</summary>
|
|
/// <remarks>do not leave blank between letters</remarks>
|
|
[Display(Name = "Site Id")]
|
|
public string SiteId { get; set; }
|
|
|
|
/// <summary>Site latitude, northern hemisphere positive</summary>
|
|
[Display(Name = "Latitude (°)")]
|
|
[DisplayFormat(DataFormatString = "{0} °")]
|
|
public double? Latitude { get; set; }
|
|
|
|
/// <summary>Site longitude, east positive</summary>
|
|
[Display(Name = "Longitude (°)")]
|
|
[DisplayFormat(DataFormatString = "{0} °")]
|
|
public double? Longitude { get; set; }
|
|
|
|
/// <summary>site elevation</summary>
|
|
[DisplayFormat(DataFormatString = "{0} m")]
|
|
public double? Elevation { get; set; }
|
|
|
|
static LeafInputDataSiteViewModel()
|
|
{
|
|
}
|
|
|
|
public LeafInputDataSiteViewModel() {}
|
|
|
|
public LeafInputDataSiteViewModel(LeafInputDataSite site)
|
|
{
|
|
Mapper.Map(site, this);
|
|
}
|
|
}
|
|
} |