Leaf Input Details
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using AutoMapper;
|
||||
using LeafWeb.Core.Entities;
|
||||
|
||||
namespace LeafWeb.WebCms.Models
|
||||
{
|
||||
public class LeafInputStatusViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[UIHint("Status")]
|
||||
public string Status { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Details { get; set; }
|
||||
public DateTime DateTime { get; set; }
|
||||
|
||||
static LeafInputStatusViewModel()
|
||||
{
|
||||
Mapper.CreateMap<LeafInputStatus, LeafInputStatusViewModel>()
|
||||
.ForMember(dest => dest.Status, opt => opt.MapFrom(li => li.Status.ToString()));
|
||||
}
|
||||
|
||||
public LeafInputStatusViewModel() { }
|
||||
|
||||
public LeafInputStatusViewModel(LeafInputStatus status)
|
||||
{
|
||||
Mapper.Map(status, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user