优化实体统一首字母大写

This commit is contained in:
不做码农
2022-09-01 21:54:53 +08:00
parent 401338eadb
commit c372c9a9e2
17 changed files with 184 additions and 185 deletions

View File

@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace ZR.Model.System.Dto
{
@@ -14,60 +12,60 @@ namespace ZR.Model.System.Dto
/// <summary>
/// 父菜单ID
/// </summary>
public long? parentId { get; set; }
public long? ParentId { get; set; }
/// <summary>
/// 显示顺序
/// </summary>
public int orderNum { get; set; }
public int OrderNum { get; set; }
/// <summary>
/// 路由地址
/// </summary>
public string path { get; set; } = "#";
public string Path { get; set; } = "#";
/// <summary>
/// 组件路径
/// </summary>
public string component { get; set; }
public string Component { get; set; }
/// <summary>
/// 是否缓存1缓存 0不缓存
/// </summary>
[Required(ErrorMessage = "是否缓存不能为空")]
public string isCache { get; set; }
public string IsCache { get; set; }
/// <summary>
/// 是否外链 1、是 0、否
/// </summary>
public string isFrame { get; set; }
public string IsFrame { get; set; }
/// <summary>
/// 类型M目录 C菜单 F按钮 L链接
/// </summary>
[Required(ErrorMessage = "菜单类型不能为空")]
public string menuType { get; set; }
public string MenuType { get; set; }
/// <summary>
/// 显示状态0显示 1隐藏
/// </summary>
[Required(ErrorMessage = "显示状态不能为空")]
public string visible { get; set; }
public string Visible { get; set; }
/// <summary>
/// 菜单状态0正常 1停用
/// </summary>
[Required(ErrorMessage = "菜单状态不能为空")]
public string status { get; set; }
public string Status { get; set; }
/// <summary>
/// 权限字符串
/// </summary>
public string perms { get; set; }
public string Perms { get; set; }
/// <summary>
/// 菜单图标
/// </summary>
public string icon { get; set; } = string.Empty;
public string Icon { get; set; } = string.Empty;
/// <summary>
/// 翻译key
/// </summary>

View File

@@ -14,47 +14,47 @@ namespace ZR.Model.System
{
//[Key]
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public long infoId { get; set; }
public long InfoId { get; set; }
/// <summary>
/// 用户账号
/// </summary>
public string userName { get; set; }
public string UserName { get; set; }
/// <summary>
/// 登录状态 0成功 1失败
/// </summary>
public string status { get; set; }
public string Status { get; set; }
/// <summary>
/// 登录IP地址
/// </summary>
public string ipaddr { get; set; }
public string Ipaddr { get; set; }
/// <summary>
/// 登录地点
/// </summary>
public string loginLocation { get; set; }
public string LoginLocation { get; set; }
/// <summary>
/// 浏览器类型
/// </summary>
public string browser { get; set; }
public string Browser { get; set; }
/** 操作系统 */
//@Excel(name = "操作系统")
public string os { get; set; }
public string Os { get; set; }
/// <summary>
/// 提示消息
/// </summary>
public string msg { get; set; }
public string Msg { get; set; }
/// <summary>
/// 访问时间
/// </summary>
[EpplusTableColumn(NumberFormat = "yyyy-MM-dd HH:mm:ss")]
public DateTime loginTime { get; set; } = DateTime.Now;
public DateTime LoginTime { get; set; } = DateTime.Now;
[SugarColumn(IsIgnore = true)]
public DateTime? BeginTime { get; set; }
[SugarColumn(IsIgnore = true)]

View File

@@ -24,56 +24,56 @@ namespace ZR.Model.System
/// <summary>
/// 父菜单ID
/// </summary>
public long parentId { get; set; }
public long ParentId { get; set; }
/// <summary>
/// 显示顺序
/// </summary>
public int orderNum { get; set; }
public int OrderNum { get; set; }
/// <summary>
/// 路由地址
/// </summary>
public string path { get; set; } = "#";
public string Path { get; set; } = "#";
/// <summary>
/// 组件路径
/// </summary>
public string component { get; set; }
public string Component { get; set; }
/// <summary>
/// 是否缓存1缓存 0不缓存
/// </summary>
public string isCache { get; set; }
public string IsCache { get; set; }
/// <summary>
/// 是否外链 1、是 0、否
/// </summary>
public string isFrame { get; set; }
public string IsFrame { get; set; }
/// <summary>
/// 类型M目录 C菜单 F按钮 L链接
/// </summary>
public string menuType { get; set; }
public string MenuType { get; set; }
/// <summary>
/// 显示状态0显示 1隐藏
/// </summary>
public string visible { get; set; }
public string Visible { get; set; }
/// <summary>
/// 菜单状态0正常 1停用
/// </summary>
public string status { get; set; }
public string Status { get; set; }
/// <summary>
/// 权限字符串
/// </summary>
public string perms { get; set; }
public string Perms { get; set; }
/// <summary>
/// 菜单图标
/// </summary>
public string icon { get; set; } = string.Empty;
public string Icon { get; set; } = string.Empty;
/// <summary>
/// 菜单名key
/// </summary>
@@ -83,7 +83,7 @@ namespace ZR.Model.System
/// 子菜单
/// </summary>
[SugarColumn(IsIgnore = true)]
public List<SysMenu> children { get; set; } = new List<SysMenu>();
public List<SysMenu> Children { get; set; } = new List<SysMenu>();
/// <summary>
/// 子菜单个数
/// </summary>
@@ -97,7 +97,7 @@ namespace ZR.Model.System
{
get
{
return SubNum > 0 || children.Count > 0;
return SubNum > 0 || Children.Count > 0;
}
}
}

View File

@@ -1,9 +1,6 @@
using Newtonsoft.Json;
using OfficeOpenXml.Attributes;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
using OfficeOpenXml.Attributes;
namespace ZR.Model.System
{
@@ -14,72 +11,75 @@ namespace ZR.Model.System
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public long OperId { get; set; }
/** 操作模块 */
//@Excel(name = "操作模块")
public string title { get; set; }
[EpplusTableColumn(Header = "操作模块")]
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; }
[EpplusTableColumn(Header = "业务类型")]
public int BusinessType { get; set; }
/** 业务类型数组 */
[SugarColumn(IsIgnore = true)]
public int[] businessTypes { get; set; }
[EpplusIgnore]
public int[] BusinessTypes { get; set; }
/** 请求方法 */
//@Excel(name = "请求方法")
public string method { get; set; }
[EpplusTableColumn(Header = "请求方法")]
public string Method { get; set; }
/** 请求方式 */
//@Excel(name = "请求方式")
public string requestMethod { get; set; }
[EpplusTableColumn(Header = "请求方式")]
public string RequestMethod { get; set; }
/** 操作类别0其它 1后台用户 2手机端用户 */
//@Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户")
public int operatorType { get; set; }
[EpplusTableColumn(Header = "操作类别")]
public int OperatorType { get; set; }
/** 操作人员 */
//@Excel(name = "操作人员")
public string operName { get; set; }
[EpplusTableColumn(Header = "操作人员")]
public string OperName { get; set; }
/** 部门名称 */
//@Excel(name = "部门名称")
public string deptName { get; set; }
[EpplusTableColumn(Header = "部门名称")]
public string DeptName { get; set; }
/** 请求url */
//@Excel(name = "请求地址")
public string operUrl { get; set; }
[EpplusTableColumn(Header = "请求地址")]
public string OperUrl { get; set; }
/** 操作地址 */
//@Excel(name = "操作地址")
public string operIp { get; set; }
[EpplusTableColumn(Header = "操作地址")]
public string OperIp { get; set; }
/** 操作地点 */
//@Excel(name = "操作地点")
public string operLocation { get; set; }
[EpplusTableColumn(Header = "操作地点")]
public string OperLocation { get; set; }
/** 请求参数 */
//@Excel(name = "请求参数")
public string operParam { get; set; }
[EpplusTableColumn(Header = "请求参数")]
public string OperParam { get; set; }
/** 返回参数 */
//@Excel(name = "返回参数")
public string jsonResult { get; set; }
[EpplusTableColumn(Header = "返回结果")]
public string JsonResult { get; set; }
/** 操作状态0正常 1异常 */
//@Excel(name = "状态", readConverterExp = "0=正常,1=异常")
public int status { get; set; }
[EpplusTableColumn(Header = "状态")]
public int Status { get; set; }
/// <summary>
/// 错误消息
/// </summary>
[EpplusTableColumn(Header = "错误消息")]
public string errorMsg { get; set; }
public string ErrorMsg { get; set; }
/// <summary>
/// 操作时间
/// </summary>
[EpplusTableColumn(Header = "操作时间", NumberFormat = "yyyy-MM-dd HH:mm:ss")]
public DateTime? operTime { get; set; }
public DateTime? OperTime { get; set; }
/// <summary>
/// 操作用时
/// </summary>

View File

@@ -29,7 +29,7 @@ namespace ZR.Model.System.Vo
//menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); java写法
List<TreeSelectVo> child = new List<TreeSelectVo>();
foreach (var item in menu.children)
foreach (var item in menu.Children)
{
child.Add(new TreeSelectVo(item));
}