47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using AutoMapper;
|
|
using LeafWeb.Core.DAL;
|
|
using LeafWeb.Core.Entities;
|
|
using LeafWeb.WebCms.Controllers;
|
|
|
|
namespace LeafWeb.WebCms.Models
|
|
{
|
|
public class LeafDataQuery
|
|
{
|
|
[Display(Name = "Search", Description = "General query")]
|
|
public string Query { get; set; }
|
|
|
|
[Display(Name = "Site ID", Description = "The site's name/Fluxnet ID, if known")]
|
|
public string SiteId { get; set; }
|
|
|
|
[Display(Name = "Species Name")]
|
|
public string SpeciesName { get; set; }
|
|
|
|
/// <summary>Site latitude, northern hemisphere positive</summary>
|
|
[RegularExpression(@"\d{0,2}", ErrorMessage = "Site latitude, northern hemisphere positive")]
|
|
public int Latitude { get; set; }
|
|
|
|
[Display(Name = "Range")]
|
|
public string LatitudeRange { get; set; }
|
|
|
|
/// <summary>Site longitude, east positive</summary>
|
|
[RegularExpression(@"\d{0,2}", ErrorMessage = "Site longitude, east positive")]
|
|
public string Longitude { get; set; }
|
|
|
|
[Display(Name = "Range")]
|
|
public string LongitudeRange { get; set; }
|
|
|
|
static LeafDataQuery()
|
|
{
|
|
//Mapper.CreateMap<LeafInputCreate, LeafInput>()
|
|
// .ForMember(dest => dest.PhotosynthesisType, opt => opt.Ignore());
|
|
//Mapper.CreateMap<LeafInput, LeafInputCreate>()
|
|
// .ForMember(dest => dest.PhotosynthesisType, opt => opt.Ignore());
|
|
}
|
|
|
|
public LeafDataQuery()
|
|
{
|
|
//PhotosynthesisType = new SelectListViewModel();
|
|
}
|
|
}
|
|
} |