模型类

This commit is contained in:
橙子
2021-10-11 21:50:50 +08:00
parent 543800d0e7
commit 2093d1c78d
38 changed files with 652 additions and 185 deletions

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Model.Models
{
public class baseModel<T>
{
[Key]
[DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
public T id { get; set; }
public int is_delete { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Model.Models
{
public class loopModel:baseModel<int>
{
public int? is_top { get; set; }
public int? sort { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Model.Models
{
public class menu :loopModel
{
public string icon { get; set; }
public string router { get; set; }
public string menu_name { get; set; }
public menu children { get; set; }
public mould mould { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Model.Models
{
public class mould:baseModel<int>
{
public string mould_name { get; set; }
public string url { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Model.Models
{
public class role:baseModel
{
public string role_name { get; set; }
public string introduce { get; set; }
public ICollection<menu> menus { get; set; }
}
}

View File

@@ -7,11 +7,18 @@ using System.Threading.Tasks;
namespace Yi.Framework.Model.Models
{
public class user
public class user:baseModel<int>
{
[Key]
public int id { get; set; }
public string name { get; set; }
public int age { get; set; }
public string username { get; set; }
public string password { get; set; }
public string icon { get; set; }
public string nick { get; set; }
public string email { get; set; }
public string ip { get; set; }
public int? age { get; set; }
public string introduction { get; set; }
public ICollection<role> roles { get; set; }
}
}