RuoVea.ExDto 6.0.12.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package RuoVea.ExDto --version 6.0.12.2
                    
NuGet\Install-Package RuoVea.ExDto -Version 6.0.12.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RuoVea.ExDto" Version="6.0.12.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RuoVea.ExDto" Version="6.0.12.2" />
                    
Directory.Packages.props
<PackageReference Include="RuoVea.ExDto" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RuoVea.ExDto --version 6.0.12.2
                    
#r "nuget: RuoVea.ExDto, 6.0.12.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RuoVea.ExDto@6.0.12.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RuoVea.ExDto&version=6.0.12.2
                    
Install as a Cake Addin
#tool nuget:?package=RuoVea.ExDto&version=6.0.12.2
                    
Install as a Cake Tool

RuoVea.ExDto

介绍

常用常量、接口、实体模型、枚举类库。

1.快速入门

通过Nuget安装组件

Install-Package RuoVea.ExDto

2.组成

2.1、常量

用户登录基本信息
ClaimConst:

  用户Id:CLAINM_USERID 
   
  账号:CLAINM_ACCOUNT
  
  名称:CLAINM_NAME 
  
  角色Id:CLAINM_ROLEIDS  
  
  是否管理:CLAINM_ISADMIN  
  
  是否超级管理:CLAINM_SUPERADMIN 
  
  租户Id:TENANT_ID
  
  真实姓名:RealName
  
  昵称:NickName
  
  账号类型:AccountType
  
  组织机构Id:OrgId
  
  组织机构名称:rgName 
  
  微信OpenId:OpenId 
  
  登录模式PC、APP:LoginMode

2.2、接口基类

/// <summary>
/// 自定义实体基类
/// </summary>
public interface IAuditableEntity
{
    /// <summary>
    /// Desc:创建时间
    /// Default:
    /// Nullable:false
    /// </summary>
    DateTime? CreateTime { get; set; }
    /// <summary>
    /// Desc:创建人
    /// Default:
    /// Nullable:True
    /// </summary>
    long? Creator { get; set; }
    /// <summary>
    /// Desc:修改时间
    /// Default:
    /// Nullable:True
    /// </summary>
    DateTime? ModifyTime { get; set; }
    /// <summary>
    /// Desc:修改人
    /// Default:
    /// Nullable:True
    /// </summary>
    long? Modifier { get; set; }
}
/// <summary>
/// 自定义实体基类
/// </summary>
public interface IDataEntity : IAuditableEntity, IDeletedEntity, IPrimaryKeyEntity
{
}
public interface IDeletedEntity
{
    /// <summary>
    /// Desc:逻辑删除:0=未删除,1=已删除
    /// Default:0
    /// Nullable:True
    /// </summary>
    IsDelete? IsDelete { get; set; }
}
public interface IPrimaryKeyEntity
{
    /// <summary>
    /// 主键Id
    /// </summary>
    long Id { get; set; }
}
/// <summary>
/// 自定义租户基类实体
/// </summary>
public interface ITenantEntity
{
    /// <summary>
    /// 租户id
    /// </summary>
    long? TenantId { get; set; }
}

2.2、枚举

账号类型:AdminType

业务枚举:BusinessType

账号类别:CategoryEnum

HTTP状态码:CodeStatus

数据操作类型:DataOpType

数据范围:DataScopeType

系统错误码:ErrorEnum

性别:Gender

是/否删除:IsDelete

登陆类型:LoginType

系统菜单类型:MenuType

查询类型的枚举:QueryTypeEnum

http请求类型:RequestTypeEnum

排序枚举:SordEnum

公共状态:StatusEnum

租户:TenantTypeEnum

是/否:YesOrNot

2.3、接口

上下文用户:ICurrentUser
    
上下文用户:ICurrentUser<TT>    
统一返回结果:IRESTfulResult

2.4、实体模型

分页参数:PageParam、PageParam<T>
分页返回:PageResult<T>
分页参数:Pagination
RESTful风格 接口响应数据:RestfulResult、RestfulResult<T>

3、使用示例

注入实现 ICurrentUser 接口 实现获取用户上下文

注入实现 IRESTfulResult 接口 实现统一返回结果

IAuditableEntity类

创建时间: CreateTime
创建人: Creator
修改时间:ModifyTime
修改人: Modifier

IDeletedEntity类

逻辑删除: IsDelete 

IPrimaryKeyEntity类

主键Id: Id 

租户基类实体 ITenantEntity 类

租户id: TenantId 

IDataEntity 继承了 IAuditableEntity, IDeletedEntity, IPrimaryKeyEntity

用户登录基本信息
ClaimConst

PageParam
PageResult 

分页参数
Pagination

RESTful风格 接口响应数据
RestfulResult
 

 系统错误码
public enum ErrorEnum

业务枚举
public enum BusinessType

用户登录基本信息
public partial class ClaimConst

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on RuoVea.ExDto:

Package Downloads
RuoVea.ExSugar

Sqlsugar扩展 快速注入,支持简体中文、繁体中文、粤语、日语、法语、英语.使用方式:service.AddSqlsugar();继承RestFulLog 重写异常日志,操作日志,差异日志

RuoVea.ExFilter

注入 进行全局的异常日志收集、执行操作日志、参数验证,支持简体中文、繁体中文、粤语、日语、法语、英语. services.ExceptionSetup();// 注入 全局错误日志处 services.ExceptionSetup(ExceptionLog actionOptions);// 注入 全局错误日志处 services.ExceptionSetup(builder.Configuration.GetSection("AopOption:ExceptionLog"));// 注入 全局错误日志处 services.RequestActionSetup();// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.RequestActionSetup(RequestLog actionOptions);// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.RequestActionSetup(builder.Configuration.GetSection("AopOption:RequestLog"));// 注入 请求日志拦截 [执行操作日志、参数验证 ] services.ResourceSetup();//对资源型信息进行过滤 services.ResultSetup();//对结果进行统一 services.ApISafeSetup(AppSign actionOptions);//接口安全校验 services.ApISafeSetup(builder.Configuration.GetSection("AopOption:AppSign"));//接口安全校验 services.ApISignSetup(AppSign actionOptions);//签名验证 ( appKey + signKey + timeStamp + data ); services.ApISignSetup(builder.Configuration.GetSection("AopOption:AppSign"));//签名验证 ( appKey + signKey + timeStamp + data ); services.AddValidateSetup();//模型校验 services.AddUiFilesZipSetup();//将前端UI压缩文件进行解压 不进行接口安全校验 -> NonAplSafeAttribute 不签名验证 -> NonAplSignAttribute 不进行全局的异常日志收集 -> NonExceptionAttribute 不对资源型信息进行过滤 -> NonResourceAttribute 不对结果进行统一 -> NonRestfulResultAttribute

RuoVea.ExJwtBearer

Jwt 授权验证拓展插件。声名:IJwtHelper _jwtHelper,支持简体中文、繁体中文、粤语、日语、法语、英语. 添加验权:services.AddAuthenticationSetup(enableGlobalAuthorize: true); 添加鉴权:services.AddAuthorizationSetup.MyPermission.(enableGlobalAuthorize: true); 添加Jwt加密:services.AddJwtSetup();

RuoVea.ExWeb

CorsUrls、IPLimit、SafeIps、Jwt 配置

RuoVea.ExGlobal

web 注入 全局错误日志、操作日志记录

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.0.0.3 23 10/23/2025
9.0.0.2 18 10/23/2025
9.0.0.1 296 9/16/2025
9.0.0 504 7/25/2025
8.0.1.4 21 10/23/2025
8.0.1.3 16 10/23/2025
8.0.1.2 1,072 9/16/2025
8.0.1.1 3,871 9/22/2024
8.0.1 301 8/28/2024
8.0.0.2 205 8/25/2024
8.0.0.1 424 3/11/2024
8.0.0 286 11/24/2023
7.0.1.4 21 10/23/2025
7.0.1.3 16 10/23/2025
7.0.1.2 1,252 9/16/2025
7.0.1.1 4,583 9/22/2024
7.0.1 385 8/28/2024
7.0.0.1 205 8/25/2024
7.0.0 270 3/11/2024
6.0.12.4 20 10/23/2025
6.0.12.3 26 10/23/2025
6.0.12.2 1,515 9/16/2025
6.0.12.1 12,033 9/22/2024
6.0.12 414 8/28/2024
6.0.11.2 233 8/25/2024
6.0.11.1 904 3/11/2024
6.0.11 2,280 3/15/2023
6.0.10 453 3/12/2023
6.0.9 2,118 9/16/2022
6.0.8 531 9/16/2022
6.0.7 539 9/8/2022
6.0.6 539 8/18/2022
6.0.5 973 8/15/2022
6.0.4 1,237 3/10/2022
6.0.3 569 2/18/2022
6.0.2 570 2/16/2022
6.0.1 570 2/16/2022
6.0.0 2,341 2/9/2022
5.0.16.4 16 10/23/2025
5.0.16.3 17 10/23/2025
5.0.16.2 369 9/16/2025
5.0.16.1 552 9/22/2024
5.0.16 412 8/28/2024
5.0.15.2 200 8/25/2024
5.0.15.1 274 8/8/2024
5.0.15 2,599 11/26/2021
5.0.14 2,467 11/26/2021
5.0.13 545 11/22/2021
5.0.12 420 11/22/2021
5.0.11 761 11/19/2021
5.0.10 454 11/8/2021
5.0.9 1,221 11/5/2021
5.0.8 595 11/3/2021
5.0.7 449 11/3/2021
5.0.6 458 11/2/2021
5.0.5 451 11/2/2021
5.0.4 501 11/1/2021
5.0.3 471 10/12/2021
5.0.2 868 9/30/2021
5.0.1 446 9/29/2021
5.0.0 695 9/27/2021
2.1.1.4 12 10/23/2025
2.1.1.3 18 10/23/2025
2.1.1.2 288 9/16/2025
2.1.1.1 176 9/22/2024
2.1.1 176 8/28/2024
2.0.0.4 12 10/23/2025
2.0.0.2 15 10/23/2025
2.0.0.1 290 9/16/2025
2.0.0 182 9/22/2024