mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 18:22:11 +08:00
调整User为SysUser、Resource为SysResource
This commit is contained in:
@@ -1,111 +1,102 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using OpenAuth.Repository.Core;
|
||||
|
||||
namespace OpenAuth.Repository.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源表
|
||||
/// </summary>
|
||||
[Table("Resource")]
|
||||
public partial class Resource : TreeEntity
|
||||
{
|
||||
public Resource()
|
||||
{
|
||||
this.Name= string.Empty;
|
||||
this.SortNo= 0;
|
||||
this.Description= string.Empty;
|
||||
this.AppId= string.Empty;
|
||||
this.AppName= string.Empty;
|
||||
this.TypeName= string.Empty;
|
||||
this.TypeId= string.Empty;
|
||||
this.CreateTime= DateTime.Now;
|
||||
this.CreateUserId= string.Empty;
|
||||
this.CreateUserName= string.Empty;
|
||||
this.UpdateTime= DateTime.Now;
|
||||
this.UpdateUserId= string.Empty;
|
||||
this.UpdateUserName= string.Empty;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序号
|
||||
/// </summary>
|
||||
[Description("排序号")]
|
||||
public int SortNo { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
[Description("描述")]
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// 资源所属应用ID
|
||||
/// </summary>
|
||||
[Description("资源所属应用ID")]
|
||||
[Browsable(false)]
|
||||
public string AppId { get; set; }
|
||||
/// <summary>
|
||||
/// 所属应用名称
|
||||
/// </summary>
|
||||
[Description("所属应用名称")]
|
||||
public string AppName { get; set; }
|
||||
/// <summary>
|
||||
/// 分类名称
|
||||
/// </summary>
|
||||
[Description("分类名称")]
|
||||
public string TypeName { get; set; }
|
||||
/// <summary>
|
||||
/// 分类ID
|
||||
/// </summary>
|
||||
[Description("分类ID")]
|
||||
[Browsable(false)]
|
||||
public string TypeId { get; set; }
|
||||
/// <summary>
|
||||
/// 是否可用
|
||||
/// </summary>
|
||||
[Description("是否可用")]
|
||||
public bool Disable { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Description("创建时间")]
|
||||
public System.DateTime CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人ID
|
||||
/// </summary>
|
||||
[Description("创建人ID")]
|
||||
[Browsable(false)]
|
||||
public string CreateUserId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[Description("创建人")]
|
||||
public string CreateUserName { get; set; }
|
||||
/// <summary>
|
||||
/// 最后更新时间
|
||||
/// </summary>
|
||||
[Description("最后更新时间")]
|
||||
public System.DateTime? UpdateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 最后更新人ID
|
||||
/// </summary>
|
||||
[Description("最后更新人ID")]
|
||||
[Browsable(false)]
|
||||
public string UpdateUserId { get; set; }
|
||||
/// <summary>
|
||||
/// 最后更新人
|
||||
/// </summary>
|
||||
[Description("最后更新人")]
|
||||
public string UpdateUserName { get; set; }
|
||||
}
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using OpenAuth.Repository.Core;
|
||||
|
||||
namespace OpenAuth.Repository.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源表
|
||||
/// </summary>
|
||||
[Table("SysResource")]
|
||||
public partial class SysResource : TreeEntity
|
||||
{
|
||||
public SysResource()
|
||||
{
|
||||
this.Name= string.Empty;
|
||||
this.SortNo= 0;
|
||||
this.Description= string.Empty;
|
||||
this.AppId= string.Empty;
|
||||
this.AppName= string.Empty;
|
||||
this.TypeName= string.Empty;
|
||||
this.TypeId= string.Empty;
|
||||
this.CreateTime= DateTime.Now;
|
||||
this.CreateUserId= string.Empty;
|
||||
this.CreateUserName= string.Empty;
|
||||
this.UpdateTime= DateTime.Now;
|
||||
this.UpdateUserId= string.Empty;
|
||||
this.UpdateUserName= string.Empty;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序号
|
||||
/// </summary>
|
||||
[Description("排序号")]
|
||||
public int SortNo { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
[Description("描述")]
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// 资源所属应用ID
|
||||
/// </summary>
|
||||
[Description("资源所属应用ID")]
|
||||
[Browsable(false)]
|
||||
public string AppId { get; set; }
|
||||
/// <summary>
|
||||
/// 所属应用名称
|
||||
/// </summary>
|
||||
[Description("所属应用名称")]
|
||||
public string AppName { get; set; }
|
||||
/// <summary>
|
||||
/// 分类名称
|
||||
/// </summary>
|
||||
[Description("分类名称")]
|
||||
public string TypeName { get; set; }
|
||||
/// <summary>
|
||||
/// 分类ID
|
||||
/// </summary>
|
||||
[Description("分类ID")]
|
||||
[Browsable(false)]
|
||||
public string TypeId { get; set; }
|
||||
/// <summary>
|
||||
/// 是否可用
|
||||
/// </summary>
|
||||
[Description("是否可用")]
|
||||
public bool Disable { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Description("创建时间")]
|
||||
public System.DateTime CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人ID
|
||||
/// </summary>
|
||||
[Description("创建人ID")]
|
||||
[Browsable(false)]
|
||||
public string CreateUserId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[Description("创建人")]
|
||||
public string CreateUserName { get; set; }
|
||||
/// <summary>
|
||||
/// 最后更新时间
|
||||
/// </summary>
|
||||
[Description("最后更新时间")]
|
||||
public System.DateTime? UpdateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 最后更新人ID
|
||||
/// </summary>
|
||||
[Description("最后更新人ID")]
|
||||
[Browsable(false)]
|
||||
public string UpdateUserId { get; set; }
|
||||
/// <summary>
|
||||
/// 最后更新人
|
||||
/// </summary>
|
||||
[Description("最后更新人")]
|
||||
public string UpdateUserName { get; set; }
|
||||
}
|
||||
}
|
@@ -1,95 +1,95 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using OpenAuth.Repository.Core;
|
||||
|
||||
namespace OpenAuth.Repository.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户基本信息表
|
||||
/// </summary>
|
||||
[Table("User")]
|
||||
public partial class User : StringEntity
|
||||
{
|
||||
public User()
|
||||
{
|
||||
this.Account= string.Empty;
|
||||
this.Password= string.Empty;
|
||||
this.Name= string.Empty;
|
||||
this.Sex= 0;
|
||||
this.Status= 0;
|
||||
this.BizCode= string.Empty;
|
||||
this.CreateTime= DateTime.Now;
|
||||
this.CreateId= string.Empty;
|
||||
this.TypeName= string.Empty;
|
||||
this.TypeId= string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户登录帐号
|
||||
/// </summary>
|
||||
[Description("用户登录帐号")]
|
||||
public string Account { get; set; }
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[Description("密码")]
|
||||
public string Password { get; set; }
|
||||
/// <summary>
|
||||
/// 用户姓名
|
||||
/// </summary>
|
||||
[Description("用户姓名")]
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 性别
|
||||
/// </summary>
|
||||
[Description("性别")]
|
||||
public int Sex { get; set; }
|
||||
/// <summary>
|
||||
/// 用户状态
|
||||
/// </summary>
|
||||
[Description("用户状态")]
|
||||
public int Status { get; set; }
|
||||
/// <summary>
|
||||
/// 业务对照码
|
||||
/// </summary>
|
||||
[Description("业务对照码")]
|
||||
public string BizCode { get; set; }
|
||||
/// <summary>
|
||||
/// 经办时间
|
||||
/// </summary>
|
||||
[Description("经办时间")]
|
||||
public System.DateTime CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[Description("创建人")]
|
||||
public string CreateId { get; set; }
|
||||
/// <summary>
|
||||
/// 分类名称
|
||||
/// </summary>
|
||||
[Description("分类名称")]
|
||||
public string TypeName { get; set; }
|
||||
/// <summary>
|
||||
/// 分类ID
|
||||
/// </summary>
|
||||
[Description("分类ID")]
|
||||
public string TypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 直接上级
|
||||
/// </summary>
|
||||
[Description("直接上级")]
|
||||
public string ParentId { get; set; }
|
||||
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a CodeSmith Template.
|
||||
//
|
||||
// DO NOT MODIFY contents of this file. Changes to this
|
||||
// file will be lost if the code is regenerated.
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using OpenAuth.Repository.Core;
|
||||
|
||||
namespace OpenAuth.Repository.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户基本信息表
|
||||
/// </summary>
|
||||
[Table("SysUser")]
|
||||
public partial class SysUser : StringEntity
|
||||
{
|
||||
public SysUser()
|
||||
{
|
||||
this.Account= string.Empty;
|
||||
this.Password= string.Empty;
|
||||
this.Name= string.Empty;
|
||||
this.Sex= 0;
|
||||
this.Status= 0;
|
||||
this.BizCode= string.Empty;
|
||||
this.CreateTime= DateTime.Now;
|
||||
this.CreateId= string.Empty;
|
||||
this.TypeName= string.Empty;
|
||||
this.TypeId= string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户登录帐号
|
||||
/// </summary>
|
||||
[Description("用户登录帐号")]
|
||||
public string Account { get; set; }
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[Description("密码")]
|
||||
public string Password { get; set; }
|
||||
/// <summary>
|
||||
/// 用户姓名
|
||||
/// </summary>
|
||||
[Description("用户姓名")]
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 性别
|
||||
/// </summary>
|
||||
[Description("性别")]
|
||||
public int Sex { get; set; }
|
||||
/// <summary>
|
||||
/// 用户状态
|
||||
/// </summary>
|
||||
[Description("用户状态")]
|
||||
public int Status { get; set; }
|
||||
/// <summary>
|
||||
/// 业务对照码
|
||||
/// </summary>
|
||||
[Description("业务对照码")]
|
||||
public string BizCode { get; set; }
|
||||
/// <summary>
|
||||
/// 经办时间
|
||||
/// </summary>
|
||||
[Description("经办时间")]
|
||||
public System.DateTime CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[Description("创建人")]
|
||||
public string CreateId { get; set; }
|
||||
/// <summary>
|
||||
/// 分类名称
|
||||
/// </summary>
|
||||
[Description("分类名称")]
|
||||
public string TypeName { get; set; }
|
||||
/// <summary>
|
||||
/// 分类ID
|
||||
/// </summary>
|
||||
[Description("分类ID")]
|
||||
public string TypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 直接上级
|
||||
/// </summary>
|
||||
[Description("直接上级")]
|
||||
public string ParentId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -7,9 +7,9 @@ namespace OpenAuth.Repository.Domain
|
||||
/// </summary>
|
||||
public static class UserExt
|
||||
{
|
||||
public static void CheckPassword(this User user, string password)
|
||||
public static void CheckPassword(this SysUser sysUser, string password)
|
||||
{
|
||||
if (user.Password != password)
|
||||
if (sysUser.Password != password)
|
||||
{
|
||||
throw new Exception("密码错误");
|
||||
}
|
||||
|
Reference in New Issue
Block a user