codeFirst实体建表

This commit is contained in:
不做码农
2023-06-07 22:28:06 +08:00
parent 628df80df7
commit b96edfdac7
47 changed files with 688 additions and 194 deletions

View File

@@ -0,0 +1,40 @@
using System.Collections.Generic;
using System.Linq;
namespace ZR.Model.System.Dto
{
/// <summary>
/// 登录用户信息存储
/// </summary>
public class LoginUser
{
public long UserId { get; set; }
public long DeptId { get; set; }
public string UserName { get; set; }
/// <summary>
/// 角色集合
/// </summary>
public List<string> RoleIds { get; set; }
/// <summary>
/// 角色集合(数据权限过滤使用)
/// </summary>
public List<SysRole> Roles { get; set; }
/// <summary>
/// 权限集合
/// </summary>
public List<string> Permissions { get; set; } = new List<string>();
public LoginUser()
{
}
public LoginUser(SysUser user, List<SysRole> roles, List<string> permissions)
{
UserId = user.UserId;
UserName = user.UserName;
DeptId = user.DeptId;
Roles = roles;
RoleIds = roles.Select(f => f.RoleKey).ToList();
Permissions = permissions;
}
}
}

View File

@@ -33,11 +33,11 @@ namespace ZR.Model.System.Dto
/// 是否缓存1缓存 0不缓存
/// </summary>
[Required(ErrorMessage = "是否缓存不能为空")]
public string IsCache { get; set; }
public int IsCache { get; set; }
/// <summary>
/// 是否外链 1、是 0、否
/// </summary>
public string IsFrame { get; set; }
public int IsFrame { get; set; }
/// <summary>
/// 类型M目录 C菜单 F按钮 L链接

View File

@@ -12,10 +12,15 @@ namespace ZR.Model.System.Dto
public string RoleName { get; set; }
public string RoleKey { get; set; }
public int RoleSort { get; set; }
public string Status { get; set; }
public int Status { get; set; }
public int DataScope { get; set; }
public int[] DeptIds { get; set; }
/// <summary>
/// 减少菜单集合
/// </summary>
public List<long> DelMenuIds { get; set; } = new List<long>();
public bool MenuCheckStrictly { get; set; }
public bool DeptCheckStrictly { get; set; }
}
}

View File

@@ -1,4 +1,6 @@
namespace ZR.Model.System.Dto
using System;
namespace ZR.Model.System.Dto
{
public class SysUserDto
{
@@ -13,4 +15,22 @@
/// </summary>
public int Sex { get; set; }
}
public class SysUserQueryDto
{
public long UserId { get; set; }
public string UserName { get; set; }
public string NickName { get; set; }
public string Email { get; set; }
public string Remark { get; set; }
public string Phonenumber { get; set; }
/// <summary>
/// 用户性别0男 1女 2未知
/// </summary>
public int Sex { get; set; }
public DateTime? BeginTime { get; set; }
public DateTime? EndTime { get; set; }
public int Status { get; set; }
public long DeptId { get; set; }
}
}