This commit is contained in:
2025-03-24 15:20:33 +08:00
parent 9a5d3be528
commit b8d7371a56
22 changed files with 8562 additions and 496 deletions

View File

@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;
namespace DHSoftware.Models
{
[SugarTable("User")]
public class User
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
[SugarColumn(Length = 50, IsNullable = false)]
public string UserName { get; set; }
[SugarColumn(Length = 100, IsNullable = false)]
public string Password { get; set; }
[SugarColumn(IsNullable = true)]
public DateTime? LastLoginTime { get; set; }
}
[SugarTable("Role")]
public class Role
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
[SugarColumn(Length = 50, IsNullable = false)]
public string RoleName { get; set; }
[SugarColumn(Length = 200)]
public string Description { get; set; }
}
[SugarTable("Permission")]
public class Permission
{
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string Code { get; set; }
[SugarColumn(Length = 100, IsNullable = false)]
public string Name { get; set; }
}
[SugarTable("UserRole")]
public class UserRole
{
[SugarColumn(IsPrimaryKey = true)]
public int UserId { get; set; }
[SugarColumn(IsPrimaryKey = true)]
public int RoleId { get; set; }
}
[SugarTable("RolePermission")]
public class RolePermission
{
[SugarColumn(IsPrimaryKey = true)]
public int RoleId { get; set; }
[SugarColumn(IsPrimaryKey = true)]
public string PermissionCode { get; set; }
}
}

View File

@ -1,166 +0,0 @@
using AntdUI;
namespace AntdUIDemo.Models
{
public class User : NotifyProperty
{
private bool selected = false;
private string name;
private int age = 0;
private string address;
private bool enabled = false;
private CellImage[] cellImages;
private CellTag[] cellTags;
private CellBadge cellBadge;
private CellText cellText;
private CellLink[] cellLinks;
private CellProgress cellProgress;
private CellDivider cellDivider;
//用于设置树形表格,加入自身数组
private User[] users;
public bool Selected
{
get { return selected; }
set
{
if (selected == value) return;
selected = value;
OnPropertyChanged(nameof(Selected));
}
}
public string Name
{
get { return name; }
set
{
if (name == value) return;
name = value;
OnPropertyChanged(nameof(Name));
}
}
public int Age
{
get { return age; }
set
{
if (age == value) return;
age = value;
OnPropertyChanged(nameof(Age));
}
}
public string Address
{
get { return address; }
set
{
if (address == value) return;
address = value;
OnPropertyChanged(nameof(Address));
}
}
public bool Enabled
{
get { return enabled; }
set
{
if (enabled == value) return;
enabled = value;
OnPropertyChanged(nameof(Enabled));
}
}
public CellImage[] CellImages
{
get { return cellImages; }
set
{
if (cellImages == value) return;
cellImages = value;
OnPropertyChanged(nameof(CellImages));
}
}
public CellTag[] CellTags
{
get { return cellTags; }
set
{
if (cellTags == value) return;
cellTags = value;
OnPropertyChanged(nameof(CellTags));
}
}
public CellBadge CellBadge
{
get { return cellBadge; }
set
{
if (cellBadge == value) return;
cellBadge = value;
OnPropertyChanged(nameof(CellBadge));
}
}
public CellText CellText
{
get { return cellText; }
set
{
if (cellText == value) return;
cellText = value;
OnPropertyChanged(nameof(CellText));
}
}
public CellLink[] CellLinks
{
get { return cellLinks; }
set
{
if (cellLinks == value) return;
cellLinks = value;
OnPropertyChanged(nameof(CellLinks));
}
}
public CellProgress CellProgress
{
get { return cellProgress; }
set
{
if (cellProgress == value) return;
cellProgress = value;
OnPropertyChanged(nameof(CellProgress));
}
}
public CellDivider CellDivider
{
get { return cellDivider; }
set
{
if (cellDivider == value) return;
cellDivider = value;
OnPropertyChanged(nameof(CellDivider));
}
}
public User[] Users
{
get { return users; }
set
{
if (users == value) return;
users = value;
OnPropertyChanged(nameof(Users));
}
}
}
}