first commit

This commit is contained in:
izory
2021-08-23 16:57:25 +08:00
commit 1845017b67
480 changed files with 37611 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
/// <summary>
/// 文章表
/// </summary>
[SqlSugar.SugarTable("article")]
public class Article
{
[SqlSugar.SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
public int Cid { get; set; }
public string Title { get; set; }
public DateTime? CreateTime { get; set; }
[SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true)]
public DateTime UpdateTime { get; set; }
/// <summary>
/// 文章内容
/// </summary>
public string Content { get; set; }
/// <summary>
/// 作者名
/// </summary>
public string AuthorName { get; set; }
public long UserId { get; set; }
/// <summary>
///
/// </summary>
//public string Type { get; set; }
/// <summary>
/// 文章状态 1、发布 2、草稿
/// </summary>
public string Status { get; set; }
/// <summary>
/// 编辑器类型 markdown,html
/// </summary>
public string Fmt_type { get; set; }
/// <summary>
/// 文章标签eg:Net5,java
/// </summary>
public string Tags { get; set; }
public int Hits { get; set; }
public int Category_id { get; set; }
}
}
+22
View File
@@ -0,0 +1,22 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
/// <summary>
/// 文章目录
/// </summary>
[SqlSugar.SugarTable("articleCategory")]
public class ArticleCategory
{
public int Category_Id { get; set; }
public string Name { get; set; }
public int ParentId { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
[SqlSugar.SugarColumn(IsIgnore = true)]
public List<ArticleCategory> Children { get; set; }
}
}
+40
View File
@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
/// <summary>
/// 登录用户信息存储
/// </summary>
public class LoginUser
{
public long UserId { get; set; }
public string UserName { get; set; }
public string NickName { get; set; }
/// <summary>
/// 角色集合
/// </summary>
public List<string> RoleIds { get; set; }
/// <summary>
/// 权限集合
/// </summary>
public List<string> Permissions{ get; set; }
public LoginUser()
{
}
public LoginUser(long userId, string userName)
{
UserId = userId;
UserName = userName;
}
public LoginUser(long userId, string userName, List<string> roleIds, List<string> permissions)
{
UserId = userId;
UserName = userName;
RoleIds = roleIds;
Permissions = permissions;
}
}
}
+54
View File
@@ -0,0 +1,54 @@
//using Dapper.Contrib.Extensions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
using SqlSugar;
namespace ZR.Model.System
{
public class SysBase
{
[SugarColumn(IsOnlyIgnoreUpdate = true)]//设置后修改不会有此字段
[JsonProperty(propertyName: "CreateBy")]
public string Create_by { get; set; }
[SugarColumn(IsOnlyIgnoreUpdate = true)]//设置后修改不会有此字段
[JsonProperty(propertyName: "CreateTime")]
public DateTime Create_time { get; set; } = DateTime.Now;
[JsonIgnore]
[JsonProperty(propertyName: "UpdateBy")]
[SugarColumn(IsOnlyIgnoreInsert = true)]
public string Update_by { get; set; }
[SugarColumn(IsOnlyIgnoreInsert = true)]//设置后插入数据不会有此字段
[JsonIgnore]
[JsonProperty(propertyName: "UpdateTime")]
public DateTime Update_time { get; set; } = DateTime.Now;
public string Remark { get; set; }
/// <summary>
/// 搜素时间起始时间
/// </summary>
/// <summary>
/// Write:需穿一个bool值,false时insert,update等操作会忽略此列(和Computed的作用差不多,看了源码也没发现与Computed有什么不一样的地方,有了解的朋友可以赐教下哈)
/// ExplicitKey:指定此列为主键(不自动增长类型例如guid,ExplicitKey与Key地区别下面会详细讲)
/// Key:指定此列为主键(自动增长主键),可忽略,忽略后默认查找
/// [Computed]计算属性,打上此标签,对象地insert,update等操作会忽略此列
/// </summary>
[SugarColumn(IsIgnore = true)]
//[Computed]
[JsonIgnore]
public DateTime? BeginTime { get; set; }
/// <summary>
/// 用于搜索使用
/// </summary>
[SugarColumn(IsIgnore = true)]
//[Computed]
[JsonIgnore]
public DateTime? EndTime { get; set; }
}
}
+57
View File
@@ -0,0 +1,57 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
/// <summary>
/// 部门表
/// </summary>
[SqlSugar.SugarTable("sys_dept")]
public class SysDept: SysBase
{
/** 部门ID */
[SqlSugar.SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
public long DeptId { get; set; }
/** 父部门ID */
public long ParentId { get; set; }
/** 祖级列表 */
public string Ancestors { get; set; }
/** 部门名称 */
public string DeptName { get; set; }
/** 显示顺序 */
public int OrderNum { get; set; }
/** 负责人 */
public string Leader { get; set; }
/** 联系电话 */
public string Phone { get; set; }
/** 邮箱 */
public string Email { get; set; }
/** 部门状态:0正常,1停用 */
public string Status { get; set; }
/// <summary>
/// 删除标志(0代表存在 2代表删除)
/// </summary>
[SugarColumn(IsOnlyIgnoreInsert = true)]
public string DelFlag { get; set; }
/** 父部门名称 */
//[SugarColumn(IsIgnore = true)]
//public string ParentName { get; set; }
/// <summary>
/// 子菜单
/// </summary>
public List<SysDept> children = new List<SysDept>();
}
}
+31
View File
@@ -0,0 +1,31 @@
//using Dapper.Contrib.Extensions;
using System;
using System.Collections.Generic;
using System.Text;
using SqlSugar;
namespace ZR.Model.System
{
/// <summary>
/// 字典数据表
/// </summary>
//[Table("sys_dict_data")]
[SugarTable("sys_dict_data")]
public class SysDictData: SysBase
{
//[Key]
/// <summary>
/// 字典主键
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//主键并且自增 (string不能设置自增)
public long DictCode{ get; set; }
public int DictSort { get; set; }
public string DictLabel { get; set; }
public string DictValue { get; set; }
public string DictType { get; set; }
public string CssClass { get; set; }
public string ListClass { get; set; }
public string IsDefault { get; set; }
public string Status { get; set; }
}
}
+35
View File
@@ -0,0 +1,35 @@
//using Dapper.Contrib.Extensions;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
/// <summary>
/// 字典类型表
/// </summary>
[SugarTable("sys_dict_type")]//当和数据库名称不一样可以设置别名
//[Table("sys_dict_type")]
public class SysDictType : SysBase
{
/// <summary>
/// 字典主键
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//主键并且自增 (string不能设置自增)
//[Key]
public long DictId { get; set; }
/// <summary>
/// 字典名称
/// </summary>
public string DictName { get; set; }
/// <summary>
/// 字典类型
/// </summary>
public string DictType { get; set; }
/// <summary>
/// 状态 0、正常 1、停用
/// </summary>
public string Status { get; set; }
}
}
+20
View File
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
[SqlSugar.SugarTable("sys_file")]
public class SysFile
{
public int Id { get; set; }
public string FilePath { get; set; }
public string FileName { get; set; }
public string StorePath { get; set; }
public string AccessPat { get; set; }
public int FileSize { get; set; }
public string FileExt { get; set; }
public DateTime? AddTime { get; set; }
}
}
+56
View File
@@ -0,0 +1,56 @@
//using Dapper.Contrib.Extensions;
using SqlSugar;
using System;
namespace ZR.Model.System
{
/// <summary>
/// sys_logininfor 表
/// </summary>
[SugarTable("sys_logininfor")]
public class SysLogininfor: SysBase
{
//[Key]
[SugarColumn(IsPrimaryKey = true)]
public long infoId { get; set; }
/// <summary>
/// 用户账号
/// </summary>
public string userName { get; set; }
/// <summary>
/// 登录状态 0成功 1失败
/// </summary>
public string status { get; set; }
/// <summary>
/// 登录IP地址
/// </summary>
public string ipaddr { get; set; }
/// <summary>
/// 登录地点
/// </summary>
public string loginLocation { get; set; }
/// <summary>
/// 浏览器类型
/// </summary>
public string browser { get; set; }
/** 操作系统 */
//@Excel(name = "操作系统")
public string os { get; set; }
/// <summary>
/// 提示消息
/// </summary>
public string msg { get; set; }
/// <summary>
/// 访问时间
/// </summary>
public DateTime loginTime { get; set; } = DateTime.Now;
}
}
+88
View File
@@ -0,0 +1,88 @@
using System.Collections.Generic;
namespace ZR.Model.System
{
/// <summary>
/// Sys_menu表
/// </summary>
//[Table("sys_menu")]
[SqlSugar.SugarTable("sys_menu")]
public class SysMenu: SysBase
{
/// <summary>
/// 菜单ID
/// </summary>
//[Key]//非自动增长主键时使用ExplicitKey
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
public long menuId { get; set; }
/// <summary>
/// 菜单名称
/// </summary>
public string menuName { get; set; }
/// <summary>
/// 父菜单名称
/// </summary>
[SqlSugar.SugarColumn(IsIgnore = true)]
public string parentName { get; set; }
/// <summary>
/// 父菜单ID
/// </summary>
public long parentId { get; set; }
/// <summary>
/// 显示顺序
/// </summary>
public int orderNum { get; set; }
/// <summary>
/// 路由地址
/// </summary>
public string path { get; set; } = "#";
/// <summary>
/// 组件路径
/// </summary>
public string component { get; set; }
/// <summary>
/// 是否缓存(1缓存 0不缓存)
/// </summary>
public string isCache { get; set; }
/// <summary>
/// 是否外链 1、是 0、否
/// </summary>
public string isFrame { get; set; }
/// <summary>
/// 类型(M目录 C菜单 F按钮 L链接)
/// </summary>
public string menuType { get; set; }
/// <summary>
/// 显示状态(0显示 1隐藏)
/// </summary>
public string visible { get; set; }
/// <summary>
/// 菜单状态(0正常 1停用)
/// </summary>
public string status { get; set; }
/// <summary>
/// 权限字符串
/// </summary>
public string perms { get; set; }
/// <summary>
/// 菜单图标
/// </summary>
public string icon { get; set; } = string.Empty;
/// <summary>
/// 子菜单
/// </summary>
public List<SysMenu> children = new List<SysMenu>();
}
}
+84
View File
@@ -0,0 +1,84 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
[SqlSugar.SugarTable("sys_oper_log")]
public class SysOperLog
{
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
public long OperId { get; set; }
/** 操作模块 */
//@Excel(name = "操作模块")
public String title { get; set; }
/** 业务类型(0其它 1新增 2修改 3删除) */
//@Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据")
public int businessType { get; set; }
/** 业务类型数组 */
[SqlSugar.SugarColumn(IsIgnore = true)]
public int[] businessTypes { get; set; }
/** 请求方法 */
//@Excel(name = "请求方法")
public String method { get; set; }
/** 请求方式 */
//@Excel(name = "请求方式")
public String requestMethod { get; set; }
/** 操作类别(0其它 1后台用户 2手机端用户) */
//@Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户")
public int operatorType { get; set; }
/** 操作人员 */
//@Excel(name = "操作人员")
public String operName { get; set; }
/** 部门名称 */
//@Excel(name = "部门名称")
public String deptName { get; set; }
/** 请求url */
//@Excel(name = "请求地址")
public String operUrl { get; set; }
/** 操作地址 */
//@Excel(name = "操作地址")
public String operIp { get; set; }
/** 操作地点 */
//@Excel(name = "操作地点")
public String operLocation { get; set; }
/** 请求参数 */
//@Excel(name = "请求参数")
public String operParam { get; set; }
/** 返回参数 */
//@Excel(name = "返回参数")
public String jsonResult { get; set; }
/** 操作状态(0正常 1异常) */
//@Excel(name = "状态", readConverterExp = "0=正常,1=异常")
public int status { get; set; }
/** 错误消息 */
//@Excel(name = "错误消息")
public String errorMsg { get; set; }
/** 操作时间 */
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
//@Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
//[DataType]
[JsonConverter(typeof(JsonDateConverter))]
public DateTime? operTime { get; set; }
/// <summary>
/// 操作用时
/// </summary>
public long Elapsed { get; set; }
}
}
+16
View File
@@ -0,0 +1,16 @@
namespace ZR.Model.System
{
[SqlSugar.SugarTable("sys_post")]
public class SysPost: SysBase
{
/// <summary>
/// 岗位Id
/// </summary>
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public long PostId { get; set; }
public string PostCode { get; set; }
public string PostName { get; set; }
public int PostSort { get; set; }
public string Status { get; set; }
}
}
+74
View File
@@ -0,0 +1,74 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
/// <summary>
/// 角色表 sys_role
/// </summary>
[SqlSugar.SugarTable("sys_role")]
public class SysRole : SysBase
{
/// <summary>
/// 角色ID
/// </summary>
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public long RoleId { get; set; }
/// <summary>
/// 角色名称
/// </summary>
public string RoleName { get; set; }
/// <summary>
/// 角色权限
/// </summary>
public string RoleKey { get; set; }
/// <summary>
/// 角色排序
/// </summary>
public int RoleSort { get; set; }
/// <summary>
/// 帐号状态(0正常 1停用)
/// </summary>
public string Status { get; set; }
/// <summary>
/// 删除标志(0代表存在 2代表删除)
/// </summary>
[SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)]
public string DelFlag { get; set; }
/// <summary>
/// 菜单组
/// </summary>
[SqlSugar.SugarColumn(IsIgnore = true)]
public long[] MenuIds { get; set; }
/// <summary>
/// 部门组(数据权限)
/// </summary>
[SqlSugar.SugarColumn(IsIgnore = true)]
public long[] DeptIds { get; set; }
public SysRole() { }
public SysRole(long roleId)
{
RoleId = roleId;
}
public bool IsAdmin()
{
return IsAdmin(RoleId);
}
public static bool IsAdmin(long roleId)
{
return 1 == roleId;
}
}
}
+23
View File
@@ -0,0 +1,23 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
/// <summary>
/// 角色菜单
/// </summary>
[SqlSugar.SugarTable("sys_role_menu")]
public class SysRoleMenu
{
[JsonProperty("roleId")]
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
public long Role_id { get; set; }
[JsonProperty("menuId")]
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
public long Menu_id { get; set; }
public DateTime Create_time { get; set; }
public string Create_by { get; set; }
}
}
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;
using SqlSugar;
namespace ZR.Model.System
{
/// <summary>
/// 角色部门
/// </summary>
[SugarTable("sys_role_post")]
public class SysRolePost
{
public long RoleId { get; set; }
public long DeptId { get; set; }
}
}
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
/// <summary>
/// 任务日志
/// </summary>
[SqlSugar.SugarTable("sys_Tasks_log")]
public class SysTasksLog
{
/// <summary>
/// 日志Id
/// </summary>
[SqlSugar.SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
public long JobLogId { get; set; }
/// <summary>
/// 任务Id
/// </summary>
public string JobId { get; set; }
public string JobName { get; set; }
public string JobGroup { get; set; }
/// <summary>
/// 执行状态(0正常 1失败)
/// </summary>
public string Status { get; set; }
/// <summary>
/// 异常
/// </summary>
public string Exception { get; set; }
/// <summary>
///
/// </summary>
public string JobMessage { get; set; }
/// <summary>
/// 调用目标字符串
/// </summary>
public string InvokeTarget { get; set; }
public DateTime CreateTime { get; set; }
/// <summary>
/// 执行用时,毫秒
/// </summary>
//[SqlSugar.SugarColumn(IsIgnore = true)]
public double Elapsed { get; set; }
}
}
+156
View File
@@ -0,0 +1,156 @@
using Newtonsoft.Json;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace ZR.Model.System
{
///<summary>
///计划任务
///</summary>
[SugarTable("Sys_TasksQz")]
public class SysTasksQz
{
public SysTasksQz()
{
}
/// <summary>
/// 描述 : UID
/// 空值 : False
/// 默认 :
/// </summary>
[Display(Name = "UID")]
[SugarColumn(IsPrimaryKey = true)]
public string ID { get; set; }
/// <summary>
/// 描述 : 任务名称
/// 空值 : False
/// 默认 :
/// </summary>
[Display(Name = "任务名称")]
public string Name { get; set; }
/// <summary>
/// 描述 : 任务分组
/// 空值 : False
/// 默认 :
/// </summary>
[Display(Name = "任务分组")]
public string JobGroup { get; set; }
/// <summary>
/// 描述 : 运行时间表达式
/// 空值 : False
/// 默认 :
/// </summary>
[Display(Name = "运行时间表达式")]
public string Cron { get; set; }
/// <summary>
/// 描述 : 程序集名称
/// 空值 : False
/// 默认 :
/// </summary>
[Display(Name = "程序集名称")]
public string AssemblyName { get; set; }
/// <summary>
/// 描述 : 任务所在类
/// 空值 : False
/// 默认 :
/// </summary>
[Display(Name = "任务所在类")]
public string ClassName { get; set; }
/// <summary>
/// 描述 : 任务描述
/// 空值 : True
/// 默认 :
/// </summary>
[Display(Name = "任务描述")]
public string Remark { get; set; }
/// <summary>
/// 描述 : 执行次数
/// 空值 : False
/// 默认 : 0
/// </summary>
[Display(Name = "执行次数")]
public int RunTimes { get; set; }
/// <summary>
/// 描述 : 开始时间
/// 空值 : True
/// 默认 :
/// </summary>
[Display(Name = "开始时间")]
public DateTime? BeginTime { get; set; }
/// <summary>
/// 描述 : 结束时间
/// 空值 : True
/// 默认 :
/// </summary>
[Display(Name = "结束时间")]
public DateTime? EndTime { get; set; }
/// <summary>
/// 描述 : 触发器类型(0、simple 1、cron)
/// 空值 : False
/// 默认 : 1
/// </summary>
[Display(Name = "触发器类型(0、simple 1、cron)")]
public int TriggerType { get; set; }
/// <summary>
/// 描述 : 执行间隔时间(单位:秒)
/// 空值 : False
/// 默认 : 0
/// </summary>
[Display(Name = "执行间隔时间(单位:秒)")]
public int IntervalSecond { get; set; }
/// <summary>
/// 描述 : 是否启动
/// 空值 : False
/// 默认 : 0
/// </summary>
[Display(Name = "是否启动")]
public bool IsStart { get; set; }
/// <summary>
/// 描述 : 传入参数
/// 空值 : True
/// 默认 :
/// </summary>
[Display(Name = "传入参数")]
public string JobParams { get; set; }
[SugarColumn(IsOnlyIgnoreUpdate = true)]//设置后修改不会有此字段
[JsonProperty(propertyName: "CreateBy")]
public string Create_by { get; set; }
/// <summary>
/// 描述 : 创建时间
/// 空值 : False
/// 默认 :
/// </summary>
//[Display(Name = "创建时间")]
[SugarColumn(IsOnlyIgnoreUpdate = true)]//设置后修改不会有此字段
[JsonProperty(propertyName: "CreateTime")]
public DateTime Create_time { get; set; } = DateTime.Now;
[JsonIgnore]
[JsonProperty(propertyName: "UpdateBy")]
[SugarColumn(IsOnlyIgnoreInsert = true)]
public string Update_by { get; set; }
[SugarColumn(IsOnlyIgnoreInsert = true)]//设置后插入数据不会有此字段
[JsonProperty(propertyName: "UpdateTime")]
public DateTime Update_time { get; set; } = DateTime.Now;
}
}
+113
View File
@@ -0,0 +1,113 @@
using Newtonsoft.Json;
using Npoi.Mapper.Attributes;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
/// <summary>
/// 用户表
/// </summary>
[SugarTable("sys_user")]
public class SysUser : SysBase
{
/// <summary>
/// 用户id
/// </summary>
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
public long UserId { get; set; }
[Column("用户名")]//对应Excel列名
//[Required]//校验必填
//[Duplication]//校验模板类该列数据是否重复
public string UserName { get; set; }
[Column("用户昵称")]
//[Required]
public string NickName { get; set; }
/// <summary>
/// '用户类型(00系统用户)',
/// </summary>
//[JsonProperty(propertyName: "userType")]
//public string User_type { get; set; } = "";
[SugarColumn(IsOnlyIgnoreInsert = true)]
public string Avatar { get; set; }
public string Email { get; set; }
[JsonIgnore]
//[ColName("用户密码")]
public string Password { get; set; }
//[ColName("手机号")]
public string Phonenumber { get; set; }
/// <summary>
/// 用户性别(0男 1女 2未知)
/// </summary>
public string Sex { get; set; }
/// <summary>
/// 帐号状态(0正常 1停用)
/// </summary>
public string Status { get; set; }
/// <summary>
/// 删除标志(0代表存在 2代表删除)
/// </summary>
[SugarColumn(IsOnlyIgnoreInsert = true)]
public string DelFlag { get; set; }
/// <summary>
/// 最后登录IP
/// </summary>
[SugarColumn(IsOnlyIgnoreInsert = true)]
public string LoginIP { get; set; }
/// <summary>
/// 最后登录时间
/// </summary>
[SugarColumn(IsOnlyIgnoreInsert = true)]
public DateTime LoginDate { get; set; }
/// <summary>
/// 部门Id
/// </summary>
public long DeptId { get; set; }
#region 表额外字段
public bool IsAdmin()
{
return IsAdmin(UserId);
}
public static bool IsAdmin(long userId)
{
return 1 == userId;
}
/// <summary>
/// 拥有角色个数
/// </summary>
//[SugarColumn(IsIgnore = true)]
//public int RoleNum { get; set; }
[SugarColumn(IsIgnore = true)]
public string DeptName { get; set; }
/// <summary>
/// 角色id集合
/// </summary>
[SugarColumn(IsIgnore = true)]
public int[] RoleIds { get; set; }
/// <summary>
/// 岗位集合
/// </summary>
[SugarColumn(IsIgnore = true)]
public int[] PostIds { get; set; }
[SugarColumn(IsIgnore = true)]
public List<SysRole> Roles { get; set; }
#endregion
}
}
+18
View File
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
using SqlSugar;
namespace ZR.Model.System
{
/// <summary>
/// 用户岗位
/// </summary>
[SugarTable("sys_user_post")]
public class SysUserPost
{
public long UserId { get; set; }
public long PostId { get; set; }
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
/// <summary>
/// 用户角色关联表 用户N-1 角色
/// </summary>
[SqlSugar.SugarTable("sys_user_role")]
public class SysUserRole
{
[SqlSugar.SugarColumn(ColumnName = "user_id", IsPrimaryKey = true)]
public long UserId { get; set; }
[SqlSugar.SugarColumn(ColumnName = "role_id", IsPrimaryKey = true)]
public long RoleId { get; set; }
}
}
+64
View File
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
public class UserConstants
{
/**
* 平台内系统用户的唯一标志
*/
public static string SYS_USER = "SYS_USER";
/** 正常状态 */
public static string NORMAL = "0";
/** 异常状态 */
public static string EXCEPTION = "1";
/** 用户封禁状态 */
public static string USER_DISABLE = "1";
/** 角色封禁状态 */
public static string ROLE_DISABLE = "1";
/** 部门正常状态 */
public static string DEPT_NORMAL = "0";
/** 部门停用状态 */
public static string DEPT_DISABLE = "1";
/** 字典正常状态 */
public static string DICT_NORMAL = "0";
/** 是否为系统默认(是) */
public static string YES = "Y";
/** 是否菜单外链(是) */
public static string YES_FRAME = "1";
/** 是否菜单外链(否) */
public static string NO_FRAME = "0";
/** 菜单类型(目录) */
public static string TYPE_DIR = "M";
/** 菜单类型(菜单) */
public static string TYPE_MENU = "C";
/** 菜单类型(按钮) */
public static string TYPE_BUTTON = "F";
/** 菜单类型(链接) */
//public static string TYPE_LINK = "L";
/** Layout组件标识 */
public static string LAYOUT = "Layout";
/** ParentView组件标识 */
public static string PARENT_VIEW = "ParentView";
/** 校验返回结果码 */
public static string UNIQUE = "0";
public static string NOT_UNIQUE = "1";
}
}