6 changed files with 236 additions and 0 deletions
@ -0,0 +1,42 @@ |
|||
# LINGYUN.Abp.EntityChange.Application.Contracts |
|||
|
|||
Application contracts module for entity change tracking and restoration. |
|||
|
|||
## Features |
|||
|
|||
* Provides entity change query interface |
|||
* Provides entity restoration interface |
|||
* Provides entity change related DTOs |
|||
* Provides multilingual localization resources |
|||
|
|||
## Basic Usage |
|||
|
|||
```csharp |
|||
[DependsOn(typeof(AbpEntityChangeApplicationContractsModule))] |
|||
public class YouProjectModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
// ... |
|||
} |
|||
} |
|||
``` |
|||
|
|||
## API |
|||
|
|||
* `IEntityChangeAppService`: Entity change query service interface |
|||
* `GetListAsync`: Get list of entity change history records |
|||
|
|||
* `IEntityRestoreAppService`: Entity restoration service interface |
|||
* `RestoreEntityAsync`: Restore a single entity to specified version |
|||
* `RestoreEntitesAsync`: Batch restore entities to specified versions |
|||
|
|||
## Localization |
|||
|
|||
The module provides localization resources in the following languages: |
|||
* en |
|||
* zh-Hans |
|||
|
|||
Localization resources are located in the `/LINGYUN/Abp/EntityChange/Localization/Resources` directory. |
|||
|
|||
[简体中文](./README.md) |
|||
@ -0,0 +1,42 @@ |
|||
# LINGYUN.Abp.EntityChange.Application.Contracts |
|||
|
|||
实体变更追踪与恢复的应用层契约模块。 |
|||
|
|||
## 功能 |
|||
|
|||
* 提供实体变更查询接口 |
|||
* 提供实体恢复接口 |
|||
* 提供实体变更相关DTO对象 |
|||
* 提供多语言本地化资源 |
|||
|
|||
## 基本用法 |
|||
|
|||
```csharp |
|||
[DependsOn(typeof(AbpEntityChangeApplicationContractsModule))] |
|||
public class YouProjectModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
// ... |
|||
} |
|||
} |
|||
``` |
|||
|
|||
## API |
|||
|
|||
* `IEntityChangeAppService`: 实体变更查询服务接口 |
|||
* `GetListAsync`: 获取实体变更历史记录列表 |
|||
|
|||
* `IEntityRestoreAppService`: 实体恢复服务接口 |
|||
* `RestoreEntityAsync`: 恢复单个实体到指定版本 |
|||
* `RestoreEntitesAsync`: 批量恢复实体到指定版本 |
|||
|
|||
## 本地化 |
|||
|
|||
模块提供了以下语言的本地化资源: |
|||
* en |
|||
* zh-Hans |
|||
|
|||
本地化资源位于 `/LINGYUN/Abp/EntityChange/Localization/Resources` 目录下。 |
|||
|
|||
[English](./README.EN.md) |
|||
@ -0,0 +1,37 @@ |
|||
# LINGYUN.Abp.EntityChange.Application |
|||
|
|||
Application layer implementation module for entity change tracking and restoration. |
|||
|
|||
## Features |
|||
|
|||
* Implements entity change query service |
|||
* Implements entity restoration service |
|||
* Provides auto mapping configuration for entity changes |
|||
|
|||
## Basic Usage |
|||
|
|||
```csharp |
|||
[DependsOn(typeof(AbpEntityChangeApplicationModule))] |
|||
public class YouProjectModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
// ... |
|||
} |
|||
} |
|||
``` |
|||
|
|||
## Service Implementation |
|||
|
|||
* `EntityRestoreAppService<TEntity, TKey>`: Entity restoration service implementation |
|||
* `RestoreEntityAsync`: Restore a single entity to specified version through audit log |
|||
* `RestoreEntitesAsync`: Batch restore entities to specified versions through audit log |
|||
* Supports restoration permission policy configuration via `RestorePolicy` |
|||
|
|||
## Object Mapping |
|||
|
|||
The module uses AutoMapper to implement automatic mapping for the following objects: |
|||
* `EntityPropertyChange` -> `EntityPropertyChangeDto` |
|||
* `EntityChange` -> `EntityChangeDto` |
|||
|
|||
[简体中文](./README.md) |
|||
@ -0,0 +1,37 @@ |
|||
# LINGYUN.Abp.EntityChange.Application |
|||
|
|||
实体变更追踪与恢复的应用层实现模块。 |
|||
|
|||
## 功能 |
|||
|
|||
* 实现实体变更查询服务 |
|||
* 实现实体恢复服务 |
|||
* 提供实体变更的自动映射配置 |
|||
|
|||
## 基本用法 |
|||
|
|||
```csharp |
|||
[DependsOn(typeof(AbpEntityChangeApplicationModule))] |
|||
public class YouProjectModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
// ... |
|||
} |
|||
} |
|||
``` |
|||
|
|||
## 服务实现 |
|||
|
|||
* `EntityRestoreAppService<TEntity, TKey>`: 实体恢复服务实现 |
|||
* `RestoreEntityAsync`: 通过审计日志恢复单个实体到指定版本 |
|||
* `RestoreEntitesAsync`: 通过审计日志批量恢复实体到指定版本 |
|||
* 支持通过 `RestorePolicy` 配置恢复权限策略 |
|||
|
|||
## 对象映射 |
|||
|
|||
模块使用AutoMapper实现以下对象的自动映射: |
|||
* `EntityPropertyChange` -> `EntityPropertyChangeDto` |
|||
* `EntityChange` -> `EntityChangeDto` |
|||
|
|||
[English](./README.EN.md) |
|||
@ -0,0 +1,39 @@ |
|||
# LINGYUN.Abp.EntityChange.HttpApi |
|||
|
|||
HTTP API module for entity change tracking and restoration. |
|||
|
|||
## Features |
|||
|
|||
* Provides HTTP API for entity change queries |
|||
* Provides HTTP API for entity restoration |
|||
* Supports multilingual localization |
|||
|
|||
## Basic Usage |
|||
|
|||
```csharp |
|||
[DependsOn(typeof(AbpEntityChangeHttpApiModule))] |
|||
public class YouProjectModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
// ... |
|||
} |
|||
} |
|||
``` |
|||
|
|||
## API Endpoints |
|||
|
|||
* `EntityChangeController`: Entity change controller |
|||
* GET `/api/entity-changes`: Get list of entity change history records |
|||
|
|||
* `EntityRestoreController`: Entity restoration controller |
|||
* PUT `/api/entity-restore`: Restore a single entity to specified version |
|||
* PUT `/api/{EntityId}/entity-restore`: Restore entity with specified ID |
|||
* PUT `/api/{EntityId}/v/{EntityChangeId}/entity-restore`: Restore entity with specified ID to specified version |
|||
* PUT `/api/entites-restore`: Batch restore entities to specified versions |
|||
|
|||
## Localization |
|||
|
|||
The module uses `AbpEntityChangeResource` as localization resource, supporting multilingual display. |
|||
|
|||
[简体中文](./README.md) |
|||
@ -0,0 +1,39 @@ |
|||
# LINGYUN.Abp.EntityChange.HttpApi |
|||
|
|||
实体变更追踪与恢复的HTTP API模块。 |
|||
|
|||
## 功能 |
|||
|
|||
* 提供实体变更查询的HTTP API |
|||
* 提供实体恢复的HTTP API |
|||
* 支持多语言本地化 |
|||
|
|||
## 基本用法 |
|||
|
|||
```csharp |
|||
[DependsOn(typeof(AbpEntityChangeHttpApiModule))] |
|||
public class YouProjectModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
// ... |
|||
} |
|||
} |
|||
``` |
|||
|
|||
## API端点 |
|||
|
|||
* `EntityChangeController`: 实体变更控制器 |
|||
* GET `/api/entity-changes`: 获取实体变更历史记录列表 |
|||
|
|||
* `EntityRestoreController`: 实体恢复控制器 |
|||
* PUT `/api/entity-restore`: 恢复单个实体到指定版本 |
|||
* PUT `/api/{EntityId}/entity-restore`: 恢复指定ID的实体 |
|||
* PUT `/api/{EntityId}/v/{EntityChangeId}/entity-restore`: 恢复指定ID的实体到指定版本 |
|||
* PUT `/api/entites-restore`: 批量恢复实体到指定版本 |
|||
|
|||
## 本地化 |
|||
|
|||
模块使用 `AbpEntityChangeResource` 作为本地化资源,支持多语言显示。 |
|||
|
|||
[English](./README.EN.md) |
|||
Loading…
Reference in new issue