添加用户实体
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Data.Auditing
|
||||
{
|
||||
public interface IAuditedObject : ICreationAuditedObject, IModificationAuditedObject
|
||||
{
|
||||
}
|
||||
|
||||
public interface IAuditedObject<TUser> : IAuditedObject, ICreationAuditedObject<TUser>, IModificationAuditedObject<TUser>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Data.Auditing
|
||||
{
|
||||
public interface ICreationAuditedObject : IHasCreationTime, IMayHaveCreator
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public interface ICreationAuditedObject<TCreator> : ICreationAuditedObject, IMayHaveCreator<TCreator>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Data.Auditing
|
||||
{
|
||||
public interface IDeletionAuditedObject : IHasDeletionTime
|
||||
{
|
||||
long? DeleterId { get; }
|
||||
}
|
||||
|
||||
public interface IDeletionAuditedObject<TUser> : IDeletionAuditedObject
|
||||
{
|
||||
|
||||
TUser Deleter { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Data.Auditing
|
||||
{
|
||||
public interface IFullAuditedObject : IAuditedObject, IDeletionAuditedObject
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public interface IFullAuditedObject<TUser> : IAuditedObject<TUser>, IFullAuditedObject, IDeletionAuditedObject<TUser>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Yi.Framework.Data.Auditing;
|
||||
|
||||
|
||||
public interface IHasCreationTime
|
||||
{
|
||||
|
||||
DateTime CreationTime { get; }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.Entities;
|
||||
|
||||
namespace Yi.Framework.Data.Auditing
|
||||
{
|
||||
public interface IHasDeletionTime : ISoftDelete
|
||||
{
|
||||
DateTime? DeletionTime { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Data.Auditing
|
||||
{
|
||||
public interface IHasEntityVersion
|
||||
{
|
||||
int EntityVersion { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
namespace Yi.Framework.Data.Auditing;
|
||||
|
||||
|
||||
public interface IHasModificationTime
|
||||
{
|
||||
|
||||
DateTime? LastModificationTime { get; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace Yi.Framework.Data.Auditing;
|
||||
|
||||
public interface IMayHaveCreator<TCreator>
|
||||
{
|
||||
TCreator Creator { get; }
|
||||
}
|
||||
|
||||
public interface IMayHaveCreator
|
||||
{
|
||||
long? CreatorId { get; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Data.Auditing
|
||||
{
|
||||
public interface IModificationAuditedObject : IHasModificationTime
|
||||
{
|
||||
long? LastModifierId { get; }
|
||||
}
|
||||
|
||||
public interface IModificationAuditedObject<TUser> : IModificationAuditedObject
|
||||
{
|
||||
TUser LastModifier { get; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace Yi.Framework.Data.Auditing;
|
||||
|
||||
public interface IMustHaveCreator<TCreator> : IMustHaveCreator
|
||||
{
|
||||
TCreator Creator { get; }
|
||||
}
|
||||
|
||||
public interface IMustHaveCreator
|
||||
{
|
||||
long CreatorId { get; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Data.Entities
|
||||
{
|
||||
public interface IOrderNum
|
||||
{
|
||||
int OrderNum { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace Yi.Framework.Template.Abstract
|
||||
|
||||
public ModelTemplateProvider(string modelName, string entityName, string nameSpaces) : base(modelName, entityName, nameSpaces)
|
||||
{
|
||||
AddIgnoreEntityField(/*"Id", */"TenantId", "IsDeleted");
|
||||
AddIgnoreEntityField(/*"Id", */"TenantId", "IsDeleted", "LastModifierId", "LastModificationTime","OrderNum");
|
||||
}
|
||||
|
||||
private string entityPath=string.Empty;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Yi.Framework.Template.ConstClasses
|
||||
|
||||
public const string NameSpaces = "#NameSpaces#";
|
||||
|
||||
public const string BuildRootPath = "../../../../../project/BBS";
|
||||
public const string BuildEntityPath = "../../../../../project/BBS";
|
||||
public const string BuildRootPath = "../../../../../project/rbac";
|
||||
public const string BuildEntityPath = "../../../../../project/rbac";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,38 +14,38 @@ TemplateFactory templateFactory = new();
|
||||
//string modelName = "Exhibition";
|
||||
//string nameSpaces = "Yi.BBS";
|
||||
//List<string> entityNames = new() { "Banner" };
|
||||
//string modelName = "Forum";
|
||||
//string nameSpaces = "Yi.BBS";
|
||||
//List<string> entityNames = new() { "_" };
|
||||
string modelName = "Identity";
|
||||
string nameSpaces = "Yi.RBAC";
|
||||
List<string> entityNames = new() { "User" };
|
||||
|
||||
|
||||
|
||||
|
||||
//foreach (var entityName in entityNames)
|
||||
//{
|
||||
// templateFactory.CreateTemplateProviders((option) =>
|
||||
// {
|
||||
// option.Add(new ServiceTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new IServiceTemplateProvider(modelName, entityName, nameSpaces));
|
||||
foreach (var entityName in entityNames)
|
||||
{
|
||||
templateFactory.CreateTemplateProviders((option) =>
|
||||
{
|
||||
option.Add(new ServiceTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new IServiceTemplateProvider(modelName, entityName, nameSpaces));
|
||||
|
||||
// option.Add(new CreateInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new UpdateInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new GetListInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new GetListOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new GetOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new CreateInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new UpdateInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new GetListInputVoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new GetListOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new GetOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
|
||||
|
||||
// option.Add(new ConstTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// option.Add(new ProfileTemplateProvider(modelName, entityName, nameSpaces));
|
||||
// //option.Add(new ApiTemplateProvider(modelName, entityName));
|
||||
// });
|
||||
// //开始构建模板
|
||||
// templateFactory.BuildTemplate();
|
||||
// Console.WriteLine($"Yi.Framework.Template:{entityName}构建完成!");
|
||||
//}
|
||||
option.Add(new ConstTemplateProvider(modelName, entityName, nameSpaces));
|
||||
option.Add(new ProfileTemplateProvider(modelName, entityName, nameSpaces));
|
||||
//option.Add(new ApiTemplateProvider(modelName, entityName));
|
||||
});
|
||||
//开始构建模板
|
||||
templateFactory.BuildTemplate();
|
||||
Console.WriteLine($"Yi.Framework.Template:{entityName}构建完成!");
|
||||
}
|
||||
|
||||
//Console.WriteLine("Yi.Framework.Template:模板全部生成完成!");
|
||||
//Console.ReadKey();
|
||||
Console.WriteLine("Yi.Framework.Template:模板全部生成完成!");
|
||||
Console.ReadKey();
|
||||
|
||||
//根据模板文件生成项目文件
|
||||
var template = "D:\\C#\\Yi\\Yi.Framework.Net6\\src\\project\\rbac";
|
||||
FileHelper.AllInfoReplace(template, "Template", "RBAC");
|
||||
//var template = "D:\\C#\\Yi\\Yi.Framework.Net6\\src\\project\\rbac";
|
||||
//FileHelper.AllInfoReplace(template, "Template", "RBAC");
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Identity
|
||||
{
|
||||
/// <summary>
|
||||
/// User服务抽象
|
||||
/// </summary>
|
||||
public interface IUserService : ICrudAppService<UserGetOutputDto, UserGetListOutputDto, long, UserGetListInputVo, UserCreateInputVo, UserUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using Yi.RBAC.Application.Contracts.Identity;
|
||||
using NET.AutoWebApi.Setting;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos;
|
||||
using Yi.RBAC.Domain.Identity.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
|
||||
namespace Yi.RBAC.Application.Identity
|
||||
{
|
||||
/// <summary>
|
||||
/// User服务实现
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class UserService : CrudAppService<UserEntity, UserGetOutputDto, UserGetListOutputDto, long, UserGetListInputVo, UserCreateInputVo, UserUpdateInputVo>,
|
||||
IUserService, IAutoApiService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Identity.Dtos
|
||||
{
|
||||
/// <summary>
|
||||
/// User输入创建对象
|
||||
/// </summary>
|
||||
public class UserCreateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public int? Age { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public string Salt { get; set; } = string.Empty;
|
||||
public string? Icon { get; set; }
|
||||
public string? Nick { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Ip { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public SexEnum Sex { get; set; } = SexEnum.Unknown;
|
||||
public long? DeptId { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Identity.Dtos
|
||||
{
|
||||
public class UserGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public int? Age { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public string Salt { get; set; } = string.Empty;
|
||||
public string? Icon { get; set; }
|
||||
public string? Nick { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Ip { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public SexEnum Sex { get; set; } = SexEnum.Unknown;
|
||||
public long? DeptId { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Identity.Dtos
|
||||
{
|
||||
public class UserGetListOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public int? Age { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public string Salt { get; set; } = string.Empty;
|
||||
public string? Icon { get; set; }
|
||||
public string? Nick { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Ip { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public SexEnum Sex { get; set; } = SexEnum.Unknown;
|
||||
public long? DeptId { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Dtos;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Identity.Dtos
|
||||
{
|
||||
public class UserGetOutputDto : IEntityDto<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public int? Age { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public string Salt { get; set; } = string.Empty;
|
||||
public string? Icon { get; set; }
|
||||
public string? Nick { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Ip { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public SexEnum Sex { get; set; } = SexEnum.Unknown;
|
||||
public long? DeptId { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Identity.Dtos
|
||||
{
|
||||
public class UserUpdateInputVo
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public int? Age { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public string Salt { get; set; } = string.Empty;
|
||||
public string? Icon { get; set; }
|
||||
public string? Nick { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Ip { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public SexEnum Sex { get; set; } = SexEnum.Unknown;
|
||||
public long? DeptId { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos;
|
||||
using Yi.Framework.Ddd.Services.Abstract;
|
||||
|
||||
namespace Yi.RBAC.Application.Contracts.Identity
|
||||
{
|
||||
/// <summary>
|
||||
/// User服务抽象
|
||||
/// </summary>
|
||||
public interface IUserService : ICrudAppService<UserGetOutputDto, UserGetListOutputDto, long, UserGetListInputVo, UserCreateInputVo, UserUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos;
|
||||
using Yi.RBAC.Domain.Identity.Entities;
|
||||
|
||||
namespace Yi.RBAC.Application.Identity.MapperConfig
|
||||
{
|
||||
public class UserProfile: Profile
|
||||
{
|
||||
public UserProfile()
|
||||
{
|
||||
CreateMap<UserGetListInputVo, UserEntity>();
|
||||
CreateMap<UserCreateInputVo, UserEntity>();
|
||||
CreateMap<UserUpdateInputVo, UserEntity>();
|
||||
CreateMap<UserEntity, UserGetListOutputDto>();
|
||||
CreateMap<UserEntity, UserGetOutputDto>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using Yi.RBAC.Application.Contracts.Identity;
|
||||
using NET.AutoWebApi.Setting;
|
||||
using Yi.RBAC.Application.Contracts.Identity.Dtos;
|
||||
using Yi.RBAC.Domain.Identity.Entities;
|
||||
using Yi.Framework.Ddd.Services;
|
||||
|
||||
namespace Yi.RBAC.Application.Identity
|
||||
{
|
||||
/// <summary>
|
||||
/// User服务实现
|
||||
/// </summary>
|
||||
[AppService]
|
||||
public class UserService : CrudAppService<UserEntity, UserGetOutputDto, UserGetListOutputDto, long, UserGetListInputVo, UserCreateInputVo, UserUpdateInputVo>,
|
||||
IUserService, IAutoApiService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.RBAC.Domain.Shared.Identity.ConstClasses
|
||||
{
|
||||
/// <summary>
|
||||
/// 常量定义
|
||||
/// </summary>
|
||||
|
||||
public class UserConst
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -4,5 +4,140 @@
|
||||
<name>Yi.RBAC.Domain</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Yi.RBAC.Domain.Identity.Entities.UserEntity">
|
||||
<summary>
|
||||
用户表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Id">
|
||||
<summary>
|
||||
主键
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.IsDeleted">
|
||||
<summary>
|
||||
逻辑删除
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Name">
|
||||
<summary>
|
||||
姓名
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Age">
|
||||
<summary>
|
||||
年龄
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.UserName">
|
||||
<summary>
|
||||
用户名
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Password">
|
||||
<summary>
|
||||
密码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Salt">
|
||||
<summary>
|
||||
加密盐值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Icon">
|
||||
<summary>
|
||||
头像
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Nick">
|
||||
<summary>
|
||||
昵称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Email">
|
||||
<summary>
|
||||
邮箱
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Ip">
|
||||
<summary>
|
||||
Ip
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Address">
|
||||
<summary>
|
||||
地址
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Phone">
|
||||
<summary>
|
||||
电话
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Introduction">
|
||||
<summary>
|
||||
简介
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Remark">
|
||||
<summary>
|
||||
备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.Sex">
|
||||
<summary>
|
||||
性别
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.DeptId">
|
||||
<summary>
|
||||
部门id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.CreationTime">
|
||||
<summary>
|
||||
创建时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.CreatorId">
|
||||
<summary>
|
||||
创建者
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.LastModifierId">
|
||||
<summary>
|
||||
最后修改者
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.LastModificationTime">
|
||||
<summary>
|
||||
最后修改时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.RBAC.Domain.Identity.Entities.UserEntity.OrderNum">
|
||||
<summary>
|
||||
排序
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.RBAC.Domain.Identity.Entities.SexEnum">
|
||||
<summary>
|
||||
性别
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Yi.RBAC.Domain.Identity.Entities.SexEnum.Male">
|
||||
<summary>
|
||||
男性
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Yi.RBAC.Domain.Identity.Entities.SexEnum.Woman">
|
||||
<summary>
|
||||
女性
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Yi.RBAC.Domain.Identity.Entities.SexEnum.Unknown">
|
||||
<summary>
|
||||
未知
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Data.Auditing;
|
||||
using Yi.Framework.Data.Entities;
|
||||
using Yi.Framework.Ddd.Entities;
|
||||
|
||||
namespace Yi.RBAC.Domain.Identity.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户表
|
||||
/// </summary>
|
||||
[SugarTable("User")]
|
||||
public class UserEntity : IEntity<long>, ISoftDelete, IAuditedObject, IOrderNum
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 逻辑删除
|
||||
/// </summary>
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 姓名
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 年龄
|
||||
/// </summary>
|
||||
public int? Age { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 加密盐值
|
||||
/// </summary>
|
||||
public string Salt { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 头像
|
||||
/// </summary>
|
||||
public string? Icon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 昵称
|
||||
/// </summary>
|
||||
public string? Nick { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 邮箱
|
||||
/// </summary>
|
||||
public string? Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ip
|
||||
/// </summary>
|
||||
public string? Ip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
|
||||
public string? Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电话
|
||||
/// </summary>
|
||||
public long? Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 简介
|
||||
/// </summary>
|
||||
public string? Introduction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 性别
|
||||
/// </summary>
|
||||
public SexEnum Sex { get; set; } = SexEnum.Unknown;
|
||||
|
||||
/// <summary>
|
||||
/// 部门id
|
||||
/// </summary>
|
||||
public long? DeptId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// 创建者
|
||||
/// </summary>
|
||||
public long? CreatorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最后修改者
|
||||
/// </summary>
|
||||
public long? LastModifierId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最后修改时间
|
||||
/// </summary>
|
||||
public DateTime? LastModificationTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int OrderNum { get; set; } = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 性别
|
||||
/// </summary>
|
||||
public enum SexEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// 男性
|
||||
/// </summary>
|
||||
Male = 0,
|
||||
/// <summary>
|
||||
/// 女性
|
||||
/// </summary>
|
||||
Woman = 1,
|
||||
/// <summary>
|
||||
/// 未知
|
||||
/// </summary>
|
||||
Unknown = 2
|
||||
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:19001",
|
||||
"applicationUrl": "http://localhost:19002",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user