我滴个乖乖
This commit is contained in:
27
ZelWiki.Models/ViewModels/Admin/MenuItemViewModel.cs
Normal file
27
ZelWiki.Models/ViewModels/Admin/MenuItemViewModel.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using ZelWiki.Models.DataModels;
|
||||
|
||||
namespace ZelWiki.Models.ViewModels.Admin
|
||||
{
|
||||
public class MenuItemViewModel : ViewModelBase
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[Display(Name = "分类")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
[Display(Name = "链接")]
|
||||
public string Link { get; set; } = string.Empty;
|
||||
[Display(Name = "序列")]
|
||||
public int Ordinal { get; set; }
|
||||
|
||||
public MenuItem ToDataModel()
|
||||
{
|
||||
return new MenuItem
|
||||
{
|
||||
Name = Name,
|
||||
Id = Id,
|
||||
Link = Link,
|
||||
Ordinal = Ordinal
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user