mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Optimize view of machines admin page.
This commit is contained in:
27
cicm_web/Areas/Admin/Models/MachineViewModel.cs
Normal file
27
cicm_web/Areas/Admin/Models/MachineViewModel.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Cicm.Database;
|
||||
|
||||
namespace cicm_web.Areas.Admin.Models
|
||||
{
|
||||
public class MachineViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
public MachineType Type { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}")]
|
||||
[DataType(DataType.Date)]
|
||||
public DateTime? Introduced { get; set; }
|
||||
public string Family { get; set; }
|
||||
[StringLength(50)]
|
||||
public string Model { get; set; }
|
||||
|
||||
public string Company { get; set; }
|
||||
|
||||
[DisplayName("Introduced")]
|
||||
public string IntroducedView =>
|
||||
Introduced == DateTime.MinValue ? "Prototype" : Introduced?.ToShortDateString() ?? "Unknown";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user