优化数据类型

This commit is contained in:
不做码农
2023-05-15 19:52:54 +08:00
parent caf7d707c3
commit efcb5128c3
13 changed files with 176 additions and 163 deletions

View File

@@ -8,7 +8,7 @@ namespace ZR.Model.System
//[EpplusTable(PrintHeaders = true, AutofitColumns = true, AutoCalculate = true, ShowTotal = true)]
public class SysBase
{
[SugarColumn(IsOnlyIgnoreUpdate = true)]
[SugarColumn(IsOnlyIgnoreUpdate = true, Length = 64)]
[JsonProperty(propertyName: "CreateBy")]
[ExcelIgnore]
public string Create_by { get; set; }
@@ -20,7 +20,7 @@ namespace ZR.Model.System
[JsonIgnore]
[JsonProperty(propertyName: "UpdateBy")]
[SugarColumn(IsOnlyIgnoreInsert = true)]
[SugarColumn(IsOnlyIgnoreInsert = true, Length = 64)]
[ExcelIgnore]
public string Update_by { get; set; }

View File

@@ -33,17 +33,17 @@ namespace ZR.Model.System
/// <summary>
/// 帐号状态0正常 1停用
/// </summary>
public string Status { get; set; }
public int Status { get; set; }
/// <summary>
/// 删除标志0代表存在 2代表删除
/// </summary>
[SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)]
public string DelFlag { get; set; }
public int DelFlag { get; set; }
/// <summary>
/// 数据范围1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限
/// </summary>
public string DataScope { get; set; }
public int DataScope { get; set; }
/// <summary>
/// 菜单树选择项是否关联显示
/// </summary>

View File

@@ -21,21 +21,26 @@ namespace ZR.Model.System
/// <summary>
/// 登录用户名
/// </summary>
[SugarColumn(Length = 30, ColumnDescription = "用户账号", ColumnDataType = "varchar")]
public string UserName { get; set; }
/// <summary>
/// 用户昵称
/// </summary>
[SugarColumn(Length = 30, ColumnDescription = "用户昵称", ColumnDataType = "varchar")]
public string NickName { get; set; }
/// <summary>
/// 用户类型00系统用户
/// </summary>
public string UserType { get; set; } = "";
[SugarColumn(Length = 2, ColumnDescription = "用户类型00系统用户", ColumnDataType = "varchar", DefaultValue = "00")]
public string UserType { get; set; } = "00";
//[SugarColumn(IsOnlyIgnoreInsert = true)]
public string Avatar { get; set; }
[SugarColumn(Length = 50, ColumnDescription = "用户邮箱", ColumnDataType = "varchar")]
public string Email { get; set; }
[JsonIgnore]
[ExcelIgnore]
[SugarColumn(Length = 100, ColumnDescription = "密码", ColumnDataType = "varchar")]
public string Password { get; set; }
/// <summary>
/// 手机号
@@ -44,19 +49,19 @@ namespace ZR.Model.System
/// <summary>
/// 用户性别0男 1女 2未知
/// </summary>
public string Sex { get; set; }
public int Sex { get; set; }
/// <summary>
/// 帐号状态0正常 1停用
/// </summary>
[ExcelIgnore]
public string Status { get; set; }
public int Status { get; set; }
/// <summary>
/// 删除标志0代表存在 2代表删除
/// </summary>
[SugarColumn(IsOnlyIgnoreInsert = true)]
public string DelFlag { get; set; }
public int DelFlag { get; set; }
/// <summary>
/// 最后登录IP