|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
@ -0,0 +1,320 @@ |
|||
# Using Vue components in a Razor Pages ABP Application |
|||
|
|||
In modern web development, integrating dynamic front-end frameworks with server-side technologies has become increasingly essential for creating responsive and interactive applications. This article explores how to effectively use Vue components within Razor Pages in an ABP Framework application. We will delve into the process of consuming endpoints through ABP Client Proxies, leveraging ABP's powerful localization features to enhance user experience, and implementing ABP permissions to ensure secure access control. By the end of this guide, you will have a comprehensive understanding of how to seamlessly blend Vue.js with Razor Pages, empowering you to build robust and user-friendly applications. |
|||
|
|||
This article won't use any SPA approach. The goal of this article is to use Razor Pages with simple Vue components to eliminate jQuery while developing MVC application. |
|||
|
|||
## Creating the Solution |
|||
|
|||
Let's create a simple TODO list application to demonstrate how to use Vue components in Razor Pages. I'll build a really simple backend without a connection to a database for demonstration purposes. We will focus on the frontend part. |
|||
|
|||
- Creating a solution with ABP CLI: |
|||
|
|||
```bash |
|||
abp new MyTodoApp -t app-nolayers -csf |
|||
``` |
|||
|
|||
## Configure Vue |
|||
|
|||
We need to add the `@abp/vue` package to the project to use Vue components. |
|||
|
|||
```bash |
|||
npm install @abp/vue |
|||
``` |
|||
|
|||
- Install client libraries by using ABP CLI: |
|||
|
|||
```bash |
|||
abp install-libs |
|||
``` |
|||
|
|||
As a last step, we need to configure our bundle in the `ConfigureBundles` method in the `MyTodoAppModule.cs` file: |
|||
|
|||
```csharp |
|||
private void ConfigureBundles() |
|||
{ |
|||
Configure<AbpBundlingOptions>(options => |
|||
{ |
|||
// ... |
|||
|
|||
options.ScriptBundles.Configure( |
|||
// Or BasicThemeBundles.Scripts.Global |
|||
// Or LeptonXLiteThemeBundles.Scripts.Global |
|||
// 👇 Depends on the theme you are using |
|||
LeptonXThemeBundles.Scripts.Global, |
|||
bundle => |
|||
{ |
|||
bundle.AddFiles("/global-scripts.js"); |
|||
// 👇 Make sure to add this line |
|||
bundle.AddContributors(typeof(VueScriptContributor)); |
|||
} |
|||
); |
|||
}); |
|||
} |
|||
``` |
|||
|
|||
> If your IDE doesn't recognize the namespace of the `VueScriptContributor`, you can add it manually: |
|||
> |
|||
> ```csharp |
|||
> using Volo.Abp.AspNetCore.Mvc.UI.Packages.Vue; |
|||
> ``` |
|||
|
|||
Now we're ready to use Vue components in our Razor Pages. |
|||
|
|||
## Creating a Vue Component |
|||
|
|||
Let's create a simple Vue component to display the TODO list. |
|||
|
|||
### Passing a simple message to the component |
|||
|
|||
- Remove existing HTML codes in `Index.cshtml` and replace with the following code: |
|||
|
|||
```html |
|||
<div id="vue-app"> |
|||
<todo-component :message="'Welcome, @CurrentUser.UserName !'"></todo-component> |
|||
</div> |
|||
``` |
|||
|
|||
- Navigate to the `Index.cshtml.js` file and add the following code: |
|||
```js |
|||
Vue.component('todo-component', { |
|||
template: '<div>Hello, {{ message }}</div>', |
|||
props: ['message'] |
|||
}); |
|||
|
|||
new Vue({ |
|||
el: '#vue-app' |
|||
}); |
|||
``` |
|||
|
|||
Run the application and you should see the following output: |
|||
|
|||
 |
|||
|
|||
> _Hard refresh might be required to see the component since we added a new vue js file to the bundle._ |
|||
> |
|||
> If still you can't see the component, please check the browser console for any errors. |
|||
|
|||
### Interacting with the component |
|||
|
|||
Let's add a button to the component to interact with the component. |
|||
|
|||
- Add another component in the `Index.cshtml` file: |
|||
|
|||
```html |
|||
<div id="vue-app"> |
|||
<message-component :message="'Welcome, @CurrentUser.UserName !'"></message-component> |
|||
<counter-component></counter-component> |
|||
</div> |
|||
``` |
|||
|
|||
```js |
|||
Vue.component('counter-component', { |
|||
template:` |
|||
<div class="card"> |
|||
<div class="card-body"> |
|||
<p>Count: {{ count }}</p> |
|||
<button class="btn btn-primary" @click="increment">Increment</button> |
|||
</div> |
|||
</div> |
|||
`, |
|||
data: function () { |
|||
return { |
|||
count: 0 |
|||
}; |
|||
}, |
|||
methods: { |
|||
increment: function () { |
|||
this.count++; |
|||
} |
|||
} |
|||
}); |
|||
``` |
|||
|
|||
> _Do not replicate `new Vue({})` code block in the file. It's already in the `Index.cshtml.js` file. Keep it at the bottom of the file as it is._ |
|||
|
|||
Run the application and you should see the following output: |
|||
|
|||
 |
|||
|
|||
|
|||
## Using ABP Client Proxy, Authorization and Localization |
|||
|
|||
|
|||
### Building the backend |
|||
Before we go, let's build our backend to use in the component. |
|||
|
|||
- Creating a simple Application Service: |
|||
|
|||
```csharp |
|||
public class TodoAppService : MyTodoAppAppService, ITodoAppService |
|||
{ |
|||
public static List<TodoItem> Items { get; } = new List<TodoItem>(); |
|||
|
|||
[Authorize("Todo.Create")] |
|||
public async Task<TodoItem> AddTodoItemAsync(TodoItem input) |
|||
{ |
|||
Items.Add(input); |
|||
return input; |
|||
} |
|||
|
|||
[Authorize("Todo")] |
|||
public async Task<List<TodoItem>> GetAllAsync() |
|||
{ |
|||
await Task.Delay(1500); |
|||
return Items; |
|||
} |
|||
} |
|||
``` |
|||
|
|||
- `TodoItem.cs` |
|||
|
|||
```csharp |
|||
public class TodoItem |
|||
{ |
|||
public string Description { get; set; } |
|||
public bool IsDone { get; set; } |
|||
} |
|||
``` |
|||
|
|||
- `ITodoAppService.cs` |
|||
|
|||
```csharp |
|||
public interface ITodoAppService |
|||
{ |
|||
Task<List<TodoItem>> GetAllAsync(); |
|||
Task<TodoItem> AddTodoItemAsync(TodoItem input); |
|||
} |
|||
``` |
|||
|
|||
- Run the application and if you can see the following client proxy in the browser console, you're ready to go: |
|||
|
|||
 |
|||
|
|||
> [!NOTE] |
|||
> If you can't see the client proxy in the browser console, please check the [Dynamic JavaScript Proxies](https://abp.io/docs/latest/framework/ui/mvc-razor-pages/dynamic-javascript-proxies) to learn how to enable it. |
|||
|
|||
- Add a new permission in the `MyTodoAppPermissionDefinitionProvider.cs` file: |
|||
```csharp |
|||
public override void Define(IPermissionDefinitionContext context) |
|||
{ |
|||
var myGroup = context.AddGroup(MyTodoAppPermissions.GroupName); |
|||
|
|||
var todo = myGroup.AddPermission("Todo"); |
|||
todo.AddChild("Todo.Create"); |
|||
} |
|||
``` |
|||
> _I go without localization or constants for simplicity._ |
|||
|
|||
- Add a localization key in the `en.json` file: |
|||
|
|||
```json |
|||
{ |
|||
"TodoItems": "Todo Items Localized" |
|||
} |
|||
``` |
|||
|
|||
### Building the Vue Component: Using ABP Localization, Authorization and Client Proxy |
|||
|
|||
Since the component it directly loaded into the page, we can access the `abp` object on the page. |
|||
|
|||
So we can use: |
|||
|
|||
- `abp.localization.localize()` to localize a string. |
|||
- `abp.auth.isGranted()` to check the authorization. |
|||
- `myTodoApp.todo.getAll()` and `myTodoApp.todo.addTodoItem` to call the Application Service. |
|||
|
|||
inside **Vue Component** code. |
|||
|
|||
- Let's add another component named `todo-component` and usee all the **ABP Features** in it. |
|||
|
|||
```html |
|||
<div id="vue-app"> |
|||
<!-- ... --> |
|||
<todo-component></todo-component> |
|||
</div> |
|||
``` |
|||
|
|||
- Implement the `todo-component` in `Index.cshtml.js` file: |
|||
|
|||
```js |
|||
Vue.component('todo-component', { |
|||
template: ` |
|||
<div class="card" v-if="abp.auth.isGranted('Todo')"> |
|||
<div class="card-header border-bottom"> |
|||
<h3>{{ abp.localization.localize('TodoItems') }}</h3> |
|||
</div> |
|||
<div class="card-body"> |
|||
<div v-if="isBusy" class="w-100 text-center"> |
|||
<div class="spinner-border" role="status"> |
|||
<span class="visually-hidden">Loading...</span> |
|||
</div> |
|||
</div> |
|||
<ul v-else-if="todos.length > 0" class="list-group"> |
|||
<li class="list-group-item" v-for="item in todos" :key="item.description"> |
|||
<input class="form-check-input" type="checkbox" v-model="item.isDone"> |
|||
<label class="form-check-label">{{ item.description }}</label> |
|||
</li> |
|||
</ul> |
|||
<p v-else>No todos yet</p> |
|||
</div> |
|||
<div v-if="abp.auth.isGranted('Todo.Create')" class="card-footer d-flex flex-column gap-2 border-top pt-2"> |
|||
<input class="form-control" type="text" v-model="newTodo.description" placeholder="Add a new todo"> |
|||
<div class="form-check"> |
|||
<input class="form-check-input" type="checkbox" v-model="newTodo.isDone" id="isDone"> |
|||
<label class="form-check-label" for="isDone">Is Done</label> |
|||
</div> |
|||
|
|||
<button class="btn btn-primary" @click="addTodo">Add</button> |
|||
</div> |
|||
</div> |
|||
`, |
|||
data: function () { |
|||
return { |
|||
newTodo: { |
|||
description: '', |
|||
isDone: false |
|||
}, |
|||
isBusy: false, |
|||
todos: [] |
|||
}; |
|||
}, |
|||
methods: { |
|||
addTodo() { |
|||
myTodoApp.todo.addTodoItem(this.newTodo); |
|||
this.newTodo = { description: '', isDone: false }; |
|||
this.todos.push(this.newTodo); |
|||
|
|||
// Preferrable, you can load entire list of todos again. |
|||
// this.loadTodos(); |
|||
}, |
|||
async loadTodos() { |
|||
if (!abp.auth.isGranted('Todo')) { |
|||
return; |
|||
} |
|||
this.isBusy = true; |
|||
this.todos = await myTodoApp.todo.getAll(); |
|||
this.isBusy = false; |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.loadTodos(); |
|||
} |
|||
}); |
|||
``` |
|||
|
|||
And see the result: |
|||
|
|||
 |
|||
|
|||
|
|||
Since we use `abp.auth.isGranted()` to check the authorization, we can see the component only if we have the permission. |
|||
|
|||
Whenever you remove `Todo.Create` permission, you can see the component is not rendered. |
|||
|
|||
 |
|||
|
|||
|
|||
You won't see the card footer: |
|||
|
|||
 |
|||
|
After Width: | Height: | Size: 143 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 45 KiB |
@ -0,0 +1,121 @@ |
|||
# Layered Solution: Health Check Configuration |
|||
|
|||
```json |
|||
//[doc-nav] |
|||
{ |
|||
"Previous": { |
|||
"Name": "CORS Configuration", |
|||
"Path": "solution-templates/single-layer-web-application/cors-configuration" |
|||
}, |
|||
"Next": { |
|||
"Name": "Helm Charts and Kubernetes", |
|||
"Path": "solution-templates/layered-web-application/helm-charts-and-kubernetes" |
|||
} |
|||
} |
|||
``` |
|||
|
|||
Health Check is a feature that allows applications to monitor their health and diagnose potential issues. The layered solution template comes with pre-configured Health Check system. |
|||
|
|||
In the layered solution template, Health Check configuration is applied in the following cases: |
|||
|
|||
- When [MVC](https://abp.io/docs/latest/solution-templates/single-layer-web-application/web-applications#mvc) is selected as the web application type. |
|||
- When [Blazor Server](https://abp.io/docs/latest/solution-templates/single-layer-web-application/web-applications#blazor-server) is selected as the web application type. |
|||
- When [Blazor WebAssembly](https://abp.io/docs/latest/solution-templates/single-layer-web-application/web-applications#blazor-webassembly) is selected as the web application type (configured at the backend). |
|||
- When [Blazor WebApp](https://abp.io/docs/latest/solution-templates/single-layer-web-application/web-applications#blazor-webapp) is selected as the web application type (configured at the backend). |
|||
- When [Angular](https://abp.io/docs/latest/solution-templates/single-layer-web-application/web-applications#angular) is selected as the web application type (configured at the backend). |
|||
- When [No UI](https://abp.io/docs/latest/solution-templates/single-layer-web-application/web-applications#no-ui) is selected as the web application type (configured at the backend). |
|||
|
|||
### Configuration in `HealthChecksBuilderExtensions.cs` |
|||
|
|||
Health Checks are configured in the `HealthChecksBuilderExtensions` class. This class extends `IServiceCollection` to register health check services and configure health check UI endpoints. |
|||
|
|||
#### Default Configuration |
|||
|
|||
The default setup is as follows: |
|||
|
|||
```csharp |
|||
using HealthChecks.UI.Client; |
|||
using Microsoft.AspNetCore.Diagnostics.HealthChecks; |
|||
|
|||
namespace MyCompanyName.MyProjectName.HealthChecks; |
|||
|
|||
public static class HealthChecksBuilderExtensions |
|||
{ |
|||
public static void AddMyProjectNameHealthChecks(this IServiceCollection services) |
|||
{ |
|||
// Add your health checks here |
|||
var healthChecksBuilder = services.AddHealthChecks(); |
|||
healthChecksBuilder.AddCheck<MyProjectNameDatabaseCheck>("MyProjectName DbContext Check", tags: new string[] { "database" }); |
|||
|
|||
// Read configuration for health check URL |
|||
var configuration = services.GetConfiguration(); |
|||
var healthCheckUrl = configuration["App:HealthCheckUrl"] ?? "/health-status"; |
|||
|
|||
services.ConfigureHealthCheckEndpoint(healthCheckUrl); |
|||
|
|||
// Configure HealthChecks UI |
|||
var healthChecksUiBuilder = services.AddHealthChecksUI(settings => |
|||
{ |
|||
settings.AddHealthCheckEndpoint("MyProjectName Health Status", healthCheckUrl); |
|||
}); |
|||
|
|||
// Set HealthCheck UI storage |
|||
healthChecksUiBuilder.AddInMemoryStorage(); |
|||
|
|||
services.MapHealthChecksUiEndpoints(options => |
|||
{ |
|||
options.UIPath = "/health-ui"; |
|||
options.ApiPath = "/health-api"; |
|||
}); |
|||
} |
|||
|
|||
private static IServiceCollection ConfigureHealthCheckEndpoint(this IServiceCollection services, string path) |
|||
{ |
|||
.... |
|||
} |
|||
|
|||
private static IServiceCollection MapHealthChecksUiEndpoints(this IServiceCollection services, Action<global::HealthChecks.UI.Configuration.Options>? setupOption = null) |
|||
{ |
|||
.... |
|||
} |
|||
} |
|||
``` |
|||
|
|||
### Database Health Check Implementation |
|||
|
|||
The `MyProjectNameDatabaseCheck` class is a custom implementation of a health check that verifies database connectivity using `IIdentityRoleRepository`. |
|||
|
|||
```csharp |
|||
using System; |
|||
using System.Threading; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Diagnostics.HealthChecks; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Identity; |
|||
|
|||
namespace MyCompanyName.MyProjectName.HealthChecks; |
|||
|
|||
public class MyProjectNameDatabaseCheck : IHealthCheck, ITransientDependency |
|||
{ |
|||
protected readonly IIdentityRoleRepository IdentityRoleRepository; |
|||
|
|||
public MyProjectNameDatabaseCheck(IIdentityRoleRepository identityRoleRepository) |
|||
{ |
|||
IdentityRoleRepository = identityRoleRepository; |
|||
} |
|||
|
|||
public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) |
|||
{ |
|||
try |
|||
{ |
|||
await IdentityRoleRepository.GetListAsync(sorting: nameof(IdentityRole.Id), maxResultCount: 1, cancellationToken: cancellationToken); |
|||
return HealthCheckResult.Healthy($"Could connect to database and get record."); |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
return HealthCheckResult.Unhealthy($"Error when trying to get database record. ", e); |
|||
} |
|||
} |
|||
} |
|||
``` |
|||
|
|||
@ -0,0 +1,110 @@ |
|||
# Microservice Solution: Health Check Configuration |
|||
|
|||
```json |
|||
//[doc-nav] |
|||
{ |
|||
"Next": { |
|||
"Name": "Communication in the Microservice solution", |
|||
"Path": "solution-templates/microservice/communication" |
|||
} |
|||
} |
|||
``` |
|||
|
|||
Health Check is a feature that allows applications to monitor their health and diagnose potential issues. The Microservice solution template comes with pre-configured Health Check system. |
|||
|
|||
In the Microservice solution template, Health Check configuration is applied in all the services, gateways and UI applications (except Blazor Wasm & Blazor WebApp applications UI applications). |
|||
|
|||
### Configuration in `HealthChecksBuilderExtensions.cs` |
|||
|
|||
Health Checks are configured in the `HealthChecksBuilderExtensions` class. This class extends `IServiceCollection` to register health check services and configure health check UI endpoints. |
|||
|
|||
#### Default Configuration |
|||
|
|||
The default setup is as follows: |
|||
|
|||
```csharp |
|||
using HealthChecks.UI.Client; |
|||
using Microsoft.AspNetCore.Diagnostics.HealthChecks; |
|||
|
|||
namespace MyCompanyName.MyProjectName.HealthChecks; |
|||
|
|||
public static class HealthChecksBuilderExtensions |
|||
{ |
|||
public static void AddMyProjectNameHealthChecks(this IServiceCollection services) |
|||
{ |
|||
// Add your health checks here |
|||
var healthChecksBuilder = services.AddHealthChecks(); |
|||
healthChecksBuilder.AddCheck<MyProjectNameDatabaseCheck>("MyProjectName DbContext Check", tags: new string[] { "database" }); |
|||
|
|||
// Read configuration for health check URL |
|||
var configuration = services.GetConfiguration(); |
|||
var healthCheckUrl = configuration["App:HealthCheckUrl"] ?? "/health-status"; |
|||
|
|||
services.ConfigureHealthCheckEndpoint(healthCheckUrl); |
|||
|
|||
// Configure HealthChecks UI |
|||
var healthChecksUiBuilder = services.AddHealthChecksUI(settings => |
|||
{ |
|||
settings.AddHealthCheckEndpoint("MyProjectName Health Status", healthCheckUrl); |
|||
}); |
|||
|
|||
// Set HealthCheck UI storage |
|||
healthChecksUiBuilder.AddInMemoryStorage(); |
|||
|
|||
services.MapHealthChecksUiEndpoints(options => |
|||
{ |
|||
options.UIPath = "/health-ui"; |
|||
options.ApiPath = "/health-api"; |
|||
}); |
|||
} |
|||
|
|||
private static IServiceCollection ConfigureHealthCheckEndpoint(this IServiceCollection services, string path) |
|||
{ |
|||
.... |
|||
} |
|||
|
|||
private static IServiceCollection MapHealthChecksUiEndpoints(this IServiceCollection services, Action<global::HealthChecks.UI.Configuration.Options>? setupOption = null) |
|||
{ |
|||
.... |
|||
} |
|||
} |
|||
``` |
|||
|
|||
### Database Health Check Implementation |
|||
|
|||
The `MyProjectNameDatabaseCheck` class is a custom implementation of a health check that verifies database connectivity in the applications with database connection. Example: |
|||
|
|||
```csharp |
|||
using System; |
|||
using System.Threading; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Diagnostics.HealthChecks; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Identity; |
|||
|
|||
namespace MyCompanyName.MyProjectName.HealthChecks; |
|||
|
|||
public class MyProjectNameDatabaseCheck : IHealthCheck, ITransientDependency |
|||
{ |
|||
protected readonly IIdentityRoleRepository IdentityRoleRepository; |
|||
|
|||
public MyProjectNameDatabaseCheck(IIdentityRoleRepository identityRoleRepository) |
|||
{ |
|||
IdentityRoleRepository = identityRoleRepository; |
|||
} |
|||
|
|||
public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) |
|||
{ |
|||
try |
|||
{ |
|||
await IdentityRoleRepository.GetListAsync(sorting: nameof(IdentityRole.Id), maxResultCount: 1, cancellationToken: cancellationToken); |
|||
return HealthCheckResult.Healthy($"Could connect to database and get record."); |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
return HealthCheckResult.Unhealthy($"Error when trying to get database record. ", e); |
|||
} |
|||
} |
|||
} |
|||
``` |
|||
|
|||
@ -0,0 +1,115 @@ |
|||
# Single Layer Solution: Health Check Configuration |
|||
|
|||
```json |
|||
//[doc-nav] |
|||
{ |
|||
"Previous": { |
|||
"Name": "CORS Configuration", |
|||
"Path": "solution-templates/single-layer-web-application/cors-configuration" |
|||
} |
|||
} |
|||
``` |
|||
|
|||
Health Check is a feature that allows applications to monitor their health and diagnose potential issues. The single-layer solution template comes with pre-configured Health Check system. |
|||
|
|||
In the single-layer solution template, Health Check configuration is applied in the following cases: |
|||
|
|||
- When [MVC](https://abp.io/docs/latest/solution-templates/single-layer-web-application/web-applications#mvc) is selected as the web application type. |
|||
- When [Blazor Server](https://abp.io/docs/latest/solution-templates/single-layer-web-application/web-applications#blazor-server) is selected as the web application type. |
|||
- When [Angular](https://abp.io/docs/latest/solution-templates/single-layer-web-application/web-applications#angular) is selected as the web application type (configured at the backend). |
|||
- When [No UI](https://abp.io/docs/latest/solution-templates/single-layer-web-application/web-applications#no-ui) is selected as the web application type (configured at the backend). |
|||
|
|||
### Configuration in `HealthChecksBuilderExtensions.cs` |
|||
|
|||
Health Checks are configured in the `HealthChecksBuilderExtensions` class. This class extends `IServiceCollection` to register health check services and configure health check UI endpoints. |
|||
|
|||
#### Default Configuration |
|||
|
|||
The default setup is as follows: |
|||
|
|||
```csharp |
|||
using HealthChecks.UI.Client; |
|||
using Microsoft.AspNetCore.Diagnostics.HealthChecks; |
|||
|
|||
namespace MyCompanyName.MyProjectName.HealthChecks; |
|||
|
|||
public static class HealthChecksBuilderExtensions |
|||
{ |
|||
public static void AddMyProjectNameHealthChecks(this IServiceCollection services) |
|||
{ |
|||
// Add your health checks here |
|||
var healthChecksBuilder = services.AddHealthChecks(); |
|||
healthChecksBuilder.AddCheck<MyProjectNameDatabaseCheck>("MyProjectName DbContext Check", tags: new string[] { "database" }); |
|||
|
|||
// Read configuration for health check URL |
|||
var configuration = services.GetConfiguration(); |
|||
var healthCheckUrl = configuration["App:HealthCheckUrl"] ?? "/health-status"; |
|||
|
|||
services.ConfigureHealthCheckEndpoint(healthCheckUrl); |
|||
|
|||
// Configure HealthChecks UI |
|||
var healthChecksUiBuilder = services.AddHealthChecksUI(settings => |
|||
{ |
|||
settings.AddHealthCheckEndpoint("MyProjectName Health Status", healthCheckUrl); |
|||
}); |
|||
|
|||
// Set HealthCheck UI storage |
|||
healthChecksUiBuilder.AddInMemoryStorage(); |
|||
|
|||
services.MapHealthChecksUiEndpoints(options => |
|||
{ |
|||
options.UIPath = "/health-ui"; |
|||
options.ApiPath = "/health-api"; |
|||
}); |
|||
} |
|||
|
|||
private static IServiceCollection ConfigureHealthCheckEndpoint(this IServiceCollection services, string path) |
|||
{ |
|||
.... |
|||
} |
|||
|
|||
private static IServiceCollection MapHealthChecksUiEndpoints(this IServiceCollection services, Action<global::HealthChecks.UI.Configuration.Options>? setupOption = null) |
|||
{ |
|||
.... |
|||
} |
|||
} |
|||
``` |
|||
|
|||
### Database Health Check Implementation |
|||
|
|||
The `MyProjectNameDatabaseCheck` class is a custom implementation of a health check that verifies database connectivity using `IIdentityRoleRepository`. |
|||
|
|||
```csharp |
|||
using System; |
|||
using System.Threading; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Diagnostics.HealthChecks; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Identity; |
|||
|
|||
namespace MyCompanyName.MyProjectName.HealthChecks; |
|||
|
|||
public class MyProjectNameDatabaseCheck : IHealthCheck, ITransientDependency |
|||
{ |
|||
protected readonly IIdentityRoleRepository IdentityRoleRepository; |
|||
|
|||
public MyProjectNameDatabaseCheck(IIdentityRoleRepository identityRoleRepository) |
|||
{ |
|||
IdentityRoleRepository = identityRoleRepository; |
|||
} |
|||
|
|||
public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) |
|||
{ |
|||
try |
|||
{ |
|||
await IdentityRoleRepository.GetListAsync(sorting: nameof(IdentityRole.Id), maxResultCount: 1, cancellationToken: cancellationToken); |
|||
return HealthCheckResult.Healthy($"Could connect to database and get record."); |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
return HealthCheckResult.Unhealthy($"Error when trying to get database record. ", e); |
|||
} |
|||
} |
|||
} |
|||
``` |
|||
|
|||
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 30 KiB |
@ -0,0 +1,6 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.Cli.Commands.Internal; |
|||
|
|||
public class HideFromCommandList : Attribute |
|||
{} |
|||
@ -0,0 +1,9 @@ |
|||
# Installation Notes for Account Module |
|||
|
|||
Account module implements the basic authentication features like login, register, forgot password and account management. |
|||
|
|||
This module is based on [Microsoft's Identity library](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-6.0&tabs=visual-studio) and the [Identity Module](https://docs.abp.io/en/abp/latest/modules/identity). It has [IdentityServer](https://docs.abp.io/en/abp/latest/modules/identity-server) integration (based on the [IdentityServer Module](https://docs.abp.io/en/abp/latest/modules/identity-server)) and [OpenIddict](https://github.com/openiddict) integration (based on the [Openiddict Module](https://docs.abp.io/en/abp/latest/modules/openiddict)) to provide single sign-on, access control and other advanced authentication features. |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Account Module documentation](https://abp.io/docs/latest/Modules/Account). |
|||
@ -0,0 +1,9 @@ |
|||
# Installation Notes for Audit Logging Module |
|||
|
|||
The ABP Audit Logging module provides automatic audit logging for web requests, service methods, and entity changes. It helps you track user activities and changes in your application. |
|||
|
|||
This module is part of the ABP Framework and provides comprehensive audit logging capabilities including entity history tracking, exception logging, and user activity monitoring. |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Audit Logging documentation](https://abp.io/docs/latest/framework/infrastructure/audit-logging). |
|||
@ -0,0 +1,12 @@ |
|||
# Installation Notes for Background Jobs Module |
|||
|
|||
Background jobs are used to queue some tasks to be executed in the background. You may need background jobs for several reasons. Here are some examples: |
|||
|
|||
- To perform **long-running tasks** without having the users wait. For example, a user presses a 'report' button to start a long-running reporting job. You add this job to the **queue** and send the report's result to your user via email when it's completed. |
|||
- To create **re-trying** and **persistent tasks** to **guarantee** that a code will be **successfully executed**. For example, you can send emails in a background job to overcome **temporary failures** and **guarantee** that it eventually will be sent. That way users do not wait while sending emails. |
|||
|
|||
Background jobs are **persistent** that means they will be **re-tried** and **executed** later even if your application crashes. |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Background Jobs documentation](https://abp.io/docs/latest/framework/infrastructure/background-jobs). |
|||
@ -0,0 +1,13 @@ |
|||
# Installation Notes for Basic Theme Module (MVC) |
|||
|
|||
The Basic Theme is a theme implementation for the ASP.NET Core MVC / Razor Pages UI. It is a minimalist theme that doesn't add any styling on top of the plain [Bootstrap](https://getbootstrap.com/). You can take the Basic Theme as the base theme and build your own theme or styling on top of it. See the Customization section. |
|||
|
|||
The Basic Theme has RTL (Right-to-Left language) support. |
|||
|
|||
If you are looking for a professional, enterprise ready theme, you can check the [Lepton Theme](https://abp.io/themes), which is a part of the ABP. |
|||
|
|||
See the [Theming document](https://github.com/abpframework/abp/blob/rel-9.1/docs/en/framework/ui/mvc-razor-pages/theming.md) to learn about themes. |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Basic Theme documentation](https://abp.io/docs/latest/framework/ui/mvc-razor-pages/basic-theme). |
|||
@ -0,0 +1,7 @@ |
|||
# Installation Notes for Basic Theme Module (Blazor) |
|||
|
|||
The Basic Theme is a theme implementation for the Blazor UI. It is a minimalist theme that doesn't add any styling on top of the plain [Bootstrap](https://getbootstrap.com/). You can take the Basic Theme as the base theme and build your own theme or styling on top of it. See the Customization section. |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Blazor UI Basic Theme documentation](https://abp.io/docs/latest/framework/ui/blazor/basic-theme?UI=BlazorServer). |
|||
@ -0,0 +1,16 @@ |
|||
# Installation Notes for Blob Storing Database Module |
|||
|
|||
It is typical to store file contents in an application and read these file contents on need. Not only files, but you may also need to save various types of large binary objects, a.k.a. [BLOBs](https://en.wikipedia.org/wiki/Binary_large_object), into a storage. For example, you may want to save user profile pictures. |
|||
|
|||
A BLOB is a typically byte array. There are various places to store a BLOB item; storing in the local file system, in a shared database or on the [Azure BLOB storage](https://azure.microsoft.com/en-us/products/storage/blobs/) can be options. |
|||
|
|||
The ABP provides an abstraction to work with BLOBs and provides some pre-built storage providers that you can easily integrate to. Having such an abstraction has some benefits; |
|||
|
|||
You can easily integrate to your favorite BLOB storage provides with a few lines of configuration. |
|||
You can then easily change your BLOB storage without changing your application code. |
|||
If you want to create reusable application modules, you don't need to make assumption about how the BLOBs are stored. |
|||
ABP BLOB Storage system is also compatible to other ABP features like multi-tenancy. |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [BLOB Storing documentation](https://abp.io/docs/latest/framework/infrastructure/blob-storing). |
|||
@ -0,0 +1,28 @@ |
|||
# Installation Notes for Blogging Module |
|||
|
|||
The ABP Blogging module provides a simple blogging system for ABP applications. It allows you to create and manage blogs, posts, tags, and comments. The module includes both a public interface for readers and an admin interface for content management. |
|||
|
|||
Key features of the Blogging module: |
|||
- Multiple blog support |
|||
- Post management with rich text editing |
|||
- Commenting functionality |
|||
- Social media sharing |
|||
- Admin interface for content management |
|||
|
|||
## Required Configurations |
|||
|
|||
The Blogging module requires **permission** settings to be configured after installation. Ensure that the necessary roles have the appropriate access rights for managing blogs, posts, comments and others. |
|||
|
|||
### Update Database |
|||
|
|||
The Blogging module requires database migrations to be applied. Following installation, you must update the database to create the necessary tables. |
|||
|
|||
### Permissions |
|||
|
|||
Enable the following permissions for the roles that require access to the Blogging module: |
|||
|
|||
 |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Blogging Module documentation](https://abp.io/docs/latest/Modules/Cms-Kit/Blogging). |
|||
|
After Width: | Height: | Size: 36 KiB |
@ -0,0 +1,48 @@ |
|||
# Installation Notes for CMS Kit Module |
|||
|
|||
The ABP CMS Kit module provides a set of reusable Content Management System (CMS) features for your ABP-based applications. It offers ready-to-use UI components and APIs for common content management requirements. |
|||
|
|||
This module is part of the ABP Framework and provides features like comments, ratings, tags, blogs, and more to help you build content-rich applications. |
|||
|
|||
## Required Configurations |
|||
|
|||
The CmsKit module requires **permission** settings to be configured after installation. Ensure that the necessary roles have the appropriate access rights for managing blogs, posts, comments and others. |
|||
|
|||
### Enable CmsKit |
|||
|
|||
To enable the CmsKit module, add the following line to the `GlobalFeatureConfigurator` class of your module: |
|||
|
|||
```csharp |
|||
public static void Configure() |
|||
{ |
|||
OneTimeRunner.Run(() => |
|||
{ |
|||
/* You can configure (enable/disable) global features of the used modules here. |
|||
* Please refer to the documentation to learn more about the Global Features System: |
|||
* https://docs.abp.io/en/abp/latest/Global-Features |
|||
*/ |
|||
|
|||
GlobalFeatureManager.Instance.Modules.CmsKit(cmsKit => |
|||
{ |
|||
cmsKit.EnableAll(); |
|||
// or |
|||
// cmsKit.Tags.Enable(); |
|||
// cmsKit.Comments.Enable(); |
|||
}); |
|||
}); |
|||
} |
|||
``` |
|||
|
|||
### Database Migrations |
|||
|
|||
The CmsKit module requires database migrations to be applied. After enable **CmsKit**, Add a new migration and update the database to create the necessary tables. |
|||
|
|||
### Permissions |
|||
|
|||
Enable the following permissions for the roles that require access to the CmsKit module: |
|||
|
|||
 |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [CMS Kit documentation](https://abp.io/docs/latest/modules/cms-kit). |
|||
|
After Width: | Height: | Size: 45 KiB |
@ -0,0 +1,31 @@ |
|||
# Installation Notes for Docs Module |
|||
|
|||
The ABP Docs module provides a complete documentation system for ABP applications. It allows you to create, manage, and publish documentation from various sources like GitHub, GitLab, or local file system. The module includes both a public interface for readers and an admin interface for documentation management. |
|||
|
|||
Key features of the Docs module: |
|||
- Multiple documentation projects support |
|||
- Version control integration |
|||
- Markdown support |
|||
- Navigation generation |
|||
- Full-text search |
|||
- Multi-language support |
|||
- Admin interface for documentation management |
|||
|
|||
|
|||
## Required Configurations |
|||
|
|||
The Docs module requires **permission** settings to be configured after installation and database update. |
|||
|
|||
### Update Database |
|||
|
|||
The Docs module requires database migrations to be applied. Following installation, you must update the database to create the necessary tables. |
|||
|
|||
### Permissions |
|||
|
|||
Enable the following permissions for the roles that require access to the Docs module: |
|||
|
|||
 |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Docs Module documentation](https://abp.io/docs/latest/Modules/Docs). |
|||
|
After Width: | Height: | Size: 36 KiB |
@ -0,0 +1,24 @@ |
|||
# Installation Notes for Feature Management Module |
|||
|
|||
The Feature Management module provides a way to define and manage features in an ABP application. Features are used to enable or disable specific functionalities of an application based on different conditions, such as tenant subscription levels or user preferences. |
|||
|
|||
Key capabilities of the Feature Management module: |
|||
- Define features with different value types (boolean, numeric, etc.) |
|||
- Group features by providers (tenant, edition, etc.) |
|||
- Manage feature values through a user interface |
|||
- Check feature status in your application code |
|||
|
|||
## NuGet Packages |
|||
|
|||
The following NuGet packages are required for the Feature Management module: |
|||
- `Volo.Abp.FeatureManagement.Application` |
|||
- `Volo.Abp.FeatureManagement.HttpApi` |
|||
- `Volo.Abp.FeatureManagement.EntityFrameworkCore` (for EF Core) |
|||
- `Volo.Abp.FeatureManagement.MongoDB` (for MongoDB) |
|||
- `Volo.Abp.FeatureManagement.Web` (for MVC UI) |
|||
- `Volo.Abp.FeatureManagement.Blazor.Server` (for Blazor Server UI) |
|||
- `Volo.Abp.FeatureManagement.Blazor.WebAssembly` (for Blazor WebAssembly UI) |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Feature Management Module documentation](https://abp.io/docs/latest/Modules/Feature-Management). |
|||
@ -0,0 +1,9 @@ |
|||
# Installation Notes for Identity Module |
|||
|
|||
The ABP Identity module provides user and role management functionality for your ABP-based applications. It is built on Microsoft's Identity library and extends it with additional features like organization units and claims management. |
|||
|
|||
This module is part of the ABP Framework and provides the core identity management capabilities needed by most business applications. |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Identity module documentation](https://abp.io/docs/latest/modules/identity). |
|||
@ -0,0 +1,9 @@ |
|||
# Installation Notes for Identity Server Module |
|||
|
|||
IdentityServer module provides a full integration with the [IdentityServer4](https://github.com/DuendeArchive/IdentityServer4) (IDS) framework, which provides advanced authentication features like single sign-on and API access control. This module persists clients, resources and other IDS-related objects to database. This module is replaced by [OpenIddict](https://abp.io/docs/latest/modules/openiddict) module after ABP v6.0 in the startup templates. |
|||
|
|||
> Note: You can not use IdentityServer and OpenIddict modules together. They are separate OpenID provider libraries for the same job. |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Identity Server Module documentation](https://abp.io/docs/latest/modules/identity-server). |
|||
@ -0,0 +1,16 @@ |
|||
# Installation Notes for OpenIddict Module |
|||
|
|||
The OpenIddict module is an authentication module for the ABP Framework that provides OAuth 2.0 and OpenID Connect server capabilities. It is built on the OpenIddict library and provides a complete solution for implementing authentication and authorization in your ABP applications. |
|||
|
|||
Key features of the OpenIddict module: |
|||
- OAuth 2.0 and OpenID Connect server implementation |
|||
- Token generation and validation |
|||
- Authorization code, implicit, client credentials, and resource owner password flows |
|||
- JWT and reference token support |
|||
- Client application management |
|||
- Scope management |
|||
- Integration with ABP's permission system |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [OpenIddict Module documentation](https://abp.io/docs/latest/Modules/OpenIddict). |
|||
@ -0,0 +1,9 @@ |
|||
# Installation Notes for Permission Management Module |
|||
|
|||
The ABP Permission Management module provides infrastructure to persist and manage permissions in your ABP-based applications. It allows you to grant permissions to users, roles, or other entities. |
|||
|
|||
This module is part of the ABP Framework and provides the core permission management functionality needed by most business applications. |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Permission Management module documentation](https://abp.io/docs/latest/modules/permission-management). |
|||
@ -0,0 +1,15 @@ |
|||
# Installation Notes for Setting Management Module |
|||
|
|||
The Setting Management module provides a way to store and manage settings in an ABP application. Settings are used to store application, tenant, or user-specific configuration values that can be changed at runtime. The module includes both a UI for setting management and an API for programmatic setting management. |
|||
|
|||
Key features of the Setting Management module: |
|||
- Store and retrieve settings |
|||
- Multi-level setting management (global, tenant, user) |
|||
- Setting management UI |
|||
- Extensible setting provider system |
|||
- Multi-tenancy support |
|||
- Integration with other ABP modules |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Setting Management Module documentation](https://abp.io/docs/latest/Modules/Setting-Management). |
|||
@ -0,0 +1,9 @@ |
|||
# Installation Notes for Tenant Management Module |
|||
|
|||
The ABP Tenant Management module provides multi-tenancy features for your ABP-based applications. It implements the `ITenantStore` interface and provides UI to manage tenants and their features. |
|||
|
|||
This module is part of the ABP Framework and provides the core functionality needed to build multi-tenant (SaaS) applications. |
|||
|
|||
## Documentation |
|||
|
|||
For detailed information and usage instructions, please visit the [Tenant Management module documentation](https://abp.io/docs/latest/modules/tenant-management). |
|||
@ -0,0 +1,11 @@ |
|||
{ |
|||
"selectedKubernetesProfile": null, |
|||
"solutionRunner": { |
|||
"selectedProfile": null, |
|||
"targetFrameworks": [], |
|||
"applicationsStartingWithoutBuild": [], |
|||
"applicationsWithoutAutoRefreshBrowserOnRestart": [], |
|||
"applicationBatchStartStates": [], |
|||
"folderBatchStartStates": [] |
|||
} |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.Identity.EntityFrameworkCore; |
|||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|||
|
|||
namespace DemoApp.Data; |
|||
|
|||
public class DemoAppDbContext : AbpDbContext<DemoAppDbContext> |
|||
{ |
|||
public DemoAppDbContext(DbContextOptions<DemoAppDbContext> options) |
|||
: base(options) |
|||
{ |
|||
} |
|||
|
|||
protected override void OnModelCreating(ModelBuilder builder) |
|||
{ |
|||
base.OnModelCreating(builder); |
|||
|
|||
builder.ConfigurePermissionManagement(); |
|||
builder.ConfigureIdentity(); |
|||
} |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Design; |
|||
|
|||
namespace DemoApp.Data; |
|||
|
|||
public class DemoAppDbContextFactory : IDesignTimeDbContextFactory<DemoAppDbContext> |
|||
{ |
|||
public DemoAppDbContext CreateDbContext(string[] args) |
|||
{ |
|||
var configuration = BuildConfiguration(); |
|||
|
|||
var builder = new DbContextOptionsBuilder<DemoAppDbContext>() |
|||
.UseSqlServer(configuration.GetConnectionString("Default")); |
|||
|
|||
return new DemoAppDbContext(builder.Options); |
|||
} |
|||
|
|||
private static IConfigurationRoot BuildConfiguration() |
|||
{ |
|||
var builder = new ConfigurationBuilder() |
|||
.SetBasePath(Directory.GetCurrentDirectory()) |
|||
.AddJsonFile("appsettings.json", optional: false); |
|||
|
|||
return builder.Build(); |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
{ |
|||
"role": "host.mvc" |
|||
} |
|||
@ -0,0 +1,64 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk.Web"> |
|||
<PropertyGroup> |
|||
<TargetFramework>net9.0</TargetFramework> |
|||
<ImplicitUsings>enable</ImplicitUsings> |
|||
<Nullable>enable</Nullable> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" /> |
|||
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="../../../framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj" /> |
|||
<ProjectReference Include="../../../framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj" /> |
|||
<ProjectReference Include="../../../framework/src/Volo.Abp.AutoMapper/Volo.Abp.AutoMapper.csproj" /> |
|||
<ProjectReference Include="../../../framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj" /> |
|||
<ProjectReference Include="../../../framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj" /> |
|||
<ProjectReference Include="..\src\Volo.Abp.VirtualFileExplorer.Web\Volo.Abp.VirtualFileExplorer.Web.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="../../account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj" /> |
|||
<ProjectReference Include="../../account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj" /> |
|||
<ProjectReference Include="../../account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="../../identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo.Abp.PermissionManagement.Domain.Identity.csproj" /> |
|||
<ProjectReference Include="../../identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj" /> |
|||
<ProjectReference Include="../../identity/src/Volo.Abp.Identity.HttpApi/Volo.Abp.Identity.HttpApi.csproj" /> |
|||
<ProjectReference Include="../../identity/src/Volo.Abp.Identity.Application/Volo.Abp.Identity.Application.csproj" /> |
|||
<ProjectReference Include="../../identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo.Abp.Identity.EntityFrameworkCore.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="../../permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj" /> |
|||
<ProjectReference Include="../../permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo.Abp.PermissionManagement.HttpApi.csproj" /> |
|||
<ProjectReference Include="../../permission-management/src/Volo.Abp.PermissionManagement.Application/Volo.Abp.PermissionManagement.Application.csproj" /> |
|||
<ProjectReference Include="../../permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="../../basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" /> |
|||
<ProjectReference Include="../../../framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0"> |
|||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
|||
<PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets> |
|||
</PackageReference> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<None Update="Pages\**\*.js"> |
|||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|||
</None> |
|||
<None Update="Pages\**\*.css"> |
|||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|||
</None> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,134 @@ |
|||
using DemoApp.Data; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Account; |
|||
using Volo.Abp.Account.Web; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; |
|||
using Volo.Abp.AspNetCore.Serilog; |
|||
using Volo.Abp.Autofac; |
|||
using Volo.Abp.AutoMapper; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.SqlServer; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Identity.EntityFrameworkCore; |
|||
using Volo.Abp.Identity.Web; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.MultiTenancy; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|||
using Volo.Abp.PermissionManagement.HttpApi; |
|||
using Volo.Abp.PermissionManagement.Identity; |
|||
using Volo.Abp.PermissionManagement.Web; |
|||
using Volo.Abp.Swashbuckle; |
|||
using Volo.Abp.VirtualFileExplorer.Web; |
|||
|
|||
namespace DemoApp; |
|||
|
|||
[DependsOn( |
|||
// ABP Framework packages
|
|||
typeof(AbpAspNetCoreMvcModule), |
|||
typeof(AbpAutofacModule), |
|||
typeof(AbpAutoMapperModule), |
|||
typeof(AbpSwashbuckleModule), |
|||
typeof(AbpAspNetCoreSerilogModule), |
|||
|
|||
// basic-theme
|
|||
typeof(AbpAspNetCoreMvcUiBasicThemeModule), |
|||
|
|||
// VirtualFileExplorer module packages
|
|||
typeof(AbpVirtualFileExplorerWebModule), |
|||
|
|||
// Account module packages
|
|||
typeof(AbpAccountWebModule), |
|||
typeof(AbpAccountHttpApiModule), |
|||
typeof(AbpAccountApplicationModule), |
|||
|
|||
// Identity module packages
|
|||
typeof(AbpPermissionManagementDomainIdentityModule), |
|||
typeof(AbpIdentityWebModule), |
|||
typeof(AbpIdentityHttpApiModule), |
|||
typeof(AbpIdentityApplicationModule), |
|||
typeof(AbpIdentityEntityFrameworkCoreModule), |
|||
|
|||
// Permission Management module packages
|
|||
typeof(AbpPermissionManagementWebModule), |
|||
typeof(AbpPermissionManagementApplicationModule), |
|||
typeof(AbpPermissionManagementHttpApiModule), |
|||
typeof(AbpPermissionManagementEntityFrameworkCoreModule), |
|||
typeof(AbpEntityFrameworkCoreSqlServerModule) |
|||
)] |
|||
public class DemoAppModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<PermissionManagementOptions>(options => |
|||
{ |
|||
options.SaveStaticPermissionsToDatabase = false; |
|||
}); |
|||
|
|||
Configure<AbpMultiTenancyOptions>(options => |
|||
{ |
|||
options.IsEnabled = true; |
|||
}); |
|||
|
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Languages.Add(new LanguageInfo("en", "en", "English")); |
|||
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); |
|||
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); |
|||
}); |
|||
|
|||
context.Services.AddAbpDbContext<DemoAppDbContext>(options => |
|||
{ |
|||
options.AddDefaultRepositories(includeAllEntities: true); |
|||
}); |
|||
|
|||
Configure<AbpDbContextOptions>(options => |
|||
{ |
|||
options.Configure(configurationContext => |
|||
{ |
|||
configurationContext.UseSqlServer(); |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) |
|||
{ |
|||
await context.ServiceProvider |
|||
.GetRequiredService<DemoAppDbContext>() |
|||
.Database |
|||
.MigrateAsync(); |
|||
|
|||
await context.ServiceProvider |
|||
.GetRequiredService<IDataSeeder>() |
|||
.SeedAsync(); |
|||
|
|||
var app = context.GetApplicationBuilder(); |
|||
var env = context.GetEnvironment(); |
|||
|
|||
if (env.IsDevelopment()) |
|||
{ |
|||
app.UseDeveloperExceptionPage(); |
|||
} |
|||
|
|||
app.UseAbpRequestLocalization(); |
|||
|
|||
if (!env.IsDevelopment()) |
|||
{ |
|||
app.UseErrorPage(); |
|||
} |
|||
|
|||
app.MapAbpStaticAssets(); |
|||
|
|||
app.UseRouting(); |
|||
app.UseUnitOfWork(); |
|||
app.UseAuthentication(); |
|||
app.UseMultiTenancy(); |
|||
app.UseAuthorization(); |
|||
app.UseConfiguredEndpoints(); |
|||
} |
|||
} |
|||
@ -0,0 +1,5 @@ |
|||
<Project> |
|||
<PropertyGroup> |
|||
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally> |
|||
</PropertyGroup> |
|||
</Project> |
|||
@ -0,0 +1,985 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using DemoApp.Data; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace DemoApp.Migrations |
|||
{ |
|||
[DbContext(typeof(DemoAppDbContext))] |
|||
[Migration("20250315060727_Initial")] |
|||
partial class Initial |
|||
{ |
|||
/// <inheritdoc />
|
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
|||
.HasAnnotation("ProductVersion", "9.0.2") |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128); |
|||
|
|||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<string>("Description") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.IsRequired() |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsStatic") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("Regex") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)"); |
|||
|
|||
b.Property<string>("RegexDescription") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<bool>("Required") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<int>("ValueType") |
|||
.HasColumnType("int"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("AbpClaimTypes", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("SourceTenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("SourceUserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TargetTenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("TargetUserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") |
|||
.IsUnique() |
|||
.HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); |
|||
|
|||
b.ToTable("AbpLinkUsers", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<int>("EntityVersion") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.IsRequired() |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDefault") |
|||
.HasColumnType("bit") |
|||
.HasColumnName("IsDefault"); |
|||
|
|||
b.Property<bool>("IsPublic") |
|||
.HasColumnType("bit") |
|||
.HasColumnName("IsPublic"); |
|||
|
|||
b.Property<bool>("IsStatic") |
|||
.HasColumnType("bit") |
|||
.HasColumnName("IsStatic"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("NormalizedName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("NormalizedName"); |
|||
|
|||
b.ToTable("AbpRoles", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ClaimType") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("ClaimValue") |
|||
.HasMaxLength(1024) |
|||
.HasColumnType("nvarchar(1024)"); |
|||
|
|||
b.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("RoleId"); |
|||
|
|||
b.ToTable("AbpRoleClaims", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Action") |
|||
.HasMaxLength(96) |
|||
.HasColumnType("nvarchar(96)"); |
|||
|
|||
b.Property<string>("ApplicationName") |
|||
.HasMaxLength(96) |
|||
.HasColumnType("nvarchar(96)"); |
|||
|
|||
b.Property<string>("BrowserInfo") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)"); |
|||
|
|||
b.Property<string>("ClientId") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ClientIpAddress") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("CorrelationId") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.IsRequired() |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Identity") |
|||
.HasMaxLength(96) |
|||
.HasColumnType("nvarchar(96)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("TenantName") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<Guid?>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("UserName") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Action"); |
|||
|
|||
b.HasIndex("TenantId", "ApplicationName"); |
|||
|
|||
b.HasIndex("TenantId", "Identity"); |
|||
|
|||
b.HasIndex("TenantId", "UserId"); |
|||
|
|||
b.ToTable("AbpSecurityLogs", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ClientId") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("Device") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("DeviceInfo") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("IpAddresses") |
|||
.HasMaxLength(2048) |
|||
.HasColumnType("nvarchar(2048)"); |
|||
|
|||
b.Property<DateTime?>("LastAccessed") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("SessionId") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<DateTime>("SignedIn") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Device"); |
|||
|
|||
b.HasIndex("SessionId"); |
|||
|
|||
b.HasIndex("TenantId", "UserId"); |
|||
|
|||
b.ToTable("AbpSessions", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<int>("AccessFailedCount") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("int") |
|||
.HasDefaultValue(0) |
|||
.HasColumnName("AccessFailedCount"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("Email") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("Email"); |
|||
|
|||
b.Property<bool>("EmailConfirmed") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("EmailConfirmed"); |
|||
|
|||
b.Property<int>("EntityVersion") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.IsRequired() |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsActive") |
|||
.HasColumnType("bit") |
|||
.HasColumnName("IsActive"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<bool>("IsExternal") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsExternal"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<DateTimeOffset?>("LastPasswordChangeTime") |
|||
.HasColumnType("datetimeoffset"); |
|||
|
|||
b.Property<bool>("LockoutEnabled") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("LockoutEnabled"); |
|||
|
|||
b.Property<DateTimeOffset?>("LockoutEnd") |
|||
.HasColumnType("datetimeoffset"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("Name"); |
|||
|
|||
b.Property<string>("NormalizedEmail") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("NormalizedEmail"); |
|||
|
|||
b.Property<string>("NormalizedUserName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("NormalizedUserName"); |
|||
|
|||
b.Property<string>("PasswordHash") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("PasswordHash"); |
|||
|
|||
b.Property<string>("PhoneNumber") |
|||
.HasMaxLength(16) |
|||
.HasColumnType("nvarchar(16)") |
|||
.HasColumnName("PhoneNumber"); |
|||
|
|||
b.Property<bool>("PhoneNumberConfirmed") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("PhoneNumberConfirmed"); |
|||
|
|||
b.Property<string>("SecurityStamp") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("SecurityStamp"); |
|||
|
|||
b.Property<bool>("ShouldChangePasswordOnNextLogin") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("Surname") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("Surname"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<bool>("TwoFactorEnabled") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("TwoFactorEnabled"); |
|||
|
|||
b.Property<string>("UserName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("UserName"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Email"); |
|||
|
|||
b.HasIndex("NormalizedEmail"); |
|||
|
|||
b.HasIndex("NormalizedUserName"); |
|||
|
|||
b.HasIndex("UserName"); |
|||
|
|||
b.ToTable("AbpUsers", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ClaimType") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("ClaimValue") |
|||
.HasMaxLength(1024) |
|||
.HasColumnType("nvarchar(1024)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("UserId"); |
|||
|
|||
b.ToTable("AbpUserClaims", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("EndTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<Guid>("SourceUserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("StartTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<Guid>("TargetUserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("AbpUserDelegations", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => |
|||
{ |
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("LoginProvider") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ProviderDisplayName") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.IsRequired() |
|||
.HasMaxLength(196) |
|||
.HasColumnType("nvarchar(196)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("UserId", "LoginProvider"); |
|||
|
|||
b.HasIndex("LoginProvider", "ProviderKey"); |
|||
|
|||
b.ToTable("AbpUserLogins", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => |
|||
{ |
|||
b.Property<Guid>("OrganizationUnitId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("OrganizationUnitId", "UserId"); |
|||
|
|||
b.HasIndex("UserId", "OrganizationUnitId"); |
|||
|
|||
b.ToTable("AbpUserOrganizationUnits", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|||
{ |
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("UserId", "RoleId"); |
|||
|
|||
b.HasIndex("RoleId", "UserId"); |
|||
|
|||
b.ToTable("AbpUserRoles", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => |
|||
{ |
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("LoginProvider") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Value") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.HasKey("UserId", "LoginProvider", "Name"); |
|||
|
|||
b.ToTable("AbpUserTokens", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Code") |
|||
.IsRequired() |
|||
.HasMaxLength(95) |
|||
.HasColumnType("nvarchar(95)") |
|||
.HasColumnName("Code"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("DisplayName") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("DisplayName"); |
|||
|
|||
b.Property<int>("EntityVersion") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.IsRequired() |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<Guid?>("ParentId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Code"); |
|||
|
|||
b.HasIndex("ParentId"); |
|||
|
|||
b.ToTable("AbpOrganizationUnits", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => |
|||
{ |
|||
b.Property<Guid>("OrganizationUnitId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("OrganizationUnitId", "RoleId"); |
|||
|
|||
b.HasIndex("RoleId", "OrganizationUnitId"); |
|||
|
|||
b.ToTable("AbpOrganizationUnitRoles", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("DisplayName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("GroupName") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<bool>("IsEnabled") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<byte>("MultiTenancySide") |
|||
.HasColumnType("tinyint"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ParentName") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("Providers") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("StateCheckers") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("GroupName"); |
|||
|
|||
b.HasIndex("Name") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("AbpPermissions", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ProviderName") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") |
|||
.IsUnique() |
|||
.HasFilter("[TenantId] IS NOT NULL"); |
|||
|
|||
b.ToTable("AbpPermissionGrants", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("DisplayName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("AbpPermissionGroups", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityRole", null) |
|||
.WithMany("Claims") |
|||
.HasForeignKey("RoleId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityUser", null) |
|||
.WithMany("Claims") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityUser", null) |
|||
.WithMany("Logins") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) |
|||
.WithMany() |
|||
.HasForeignKey("OrganizationUnitId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
|
|||
b.HasOne("Volo.Abp.Identity.IdentityUser", null) |
|||
.WithMany("OrganizationUnits") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityRole", null) |
|||
.WithMany() |
|||
.HasForeignKey("RoleId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
|
|||
b.HasOne("Volo.Abp.Identity.IdentityUser", null) |
|||
.WithMany("Roles") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityUser", null) |
|||
.WithMany("Tokens") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) |
|||
.WithMany() |
|||
.HasForeignKey("ParentId"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) |
|||
.WithMany("Roles") |
|||
.HasForeignKey("OrganizationUnitId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
|
|||
b.HasOne("Volo.Abp.Identity.IdentityRole", null) |
|||
.WithMany() |
|||
.HasForeignKey("RoleId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => |
|||
{ |
|||
b.Navigation("Claims"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => |
|||
{ |
|||
b.Navigation("Claims"); |
|||
|
|||
b.Navigation("Logins"); |
|||
|
|||
b.Navigation("OrganizationUnits"); |
|||
|
|||
b.Navigation("Roles"); |
|||
|
|||
b.Navigation("Tokens"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => |
|||
{ |
|||
b.Navigation("Roles"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,606 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace DemoApp.Migrations |
|||
{ |
|||
/// <inheritdoc />
|
|||
public partial class Initial : Migration |
|||
{ |
|||
/// <inheritdoc />
|
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "AbpClaimTypes", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Required = table.Column<bool>(type: "bit", nullable: false), |
|||
IsStatic = table.Column<bool>(type: "bit", nullable: false), |
|||
Regex = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
|||
RegexDescription = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), |
|||
Description = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|||
ValueType = table.Column<int>(type: "int", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpLinkUsers", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
SourceUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
SourceTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
TargetUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TargetTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpOrganizationUnits", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Code = table.Column<string>(type: "nvarchar(95)", maxLength: 95, nullable: false), |
|||
DisplayName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
EntityVersion = table.Column<int>(type: "int", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", |
|||
column: x => x.ParentId, |
|||
principalTable: "AbpOrganizationUnits", |
|||
principalColumn: "Id"); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpPermissionGrants", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpPermissionGroups", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
DisplayName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpPermissionGroups", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpPermissions", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
GroupName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
ParentName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), |
|||
DisplayName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
IsEnabled = table.Column<bool>(type: "bit", nullable: false), |
|||
MultiTenancySide = table.Column<byte>(type: "tinyint", nullable: false), |
|||
Providers = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), |
|||
StateCheckers = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpPermissions", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpRoles", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
IsDefault = table.Column<bool>(type: "bit", nullable: false), |
|||
IsStatic = table.Column<bool>(type: "bit", nullable: false), |
|||
IsPublic = table.Column<bool>(type: "bit", nullable: false), |
|||
EntityVersion = table.Column<int>(type: "int", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpRoles", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpSecurityLogs", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ApplicationName = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true), |
|||
Identity = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true), |
|||
Action = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true), |
|||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|||
TenantName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
CorrelationId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpSessions", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
SessionId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
Device = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
DeviceInfo = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
IpAddresses = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: true), |
|||
SignedIn = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
LastAccessed = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpSessions", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUserDelegations", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
SourceUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TargetUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
StartTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
EndTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUserDelegations", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUsers", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
Surname = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
EmailConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
PasswordHash = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|||
SecurityStamp = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
IsExternal = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
PhoneNumber = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true), |
|||
PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
IsActive = table.Column<bool>(type: "bit", nullable: false), |
|||
TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true), |
|||
LockoutEnabled = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
AccessFailedCount = table.Column<int>(type: "int", nullable: false, defaultValue: 0), |
|||
ShouldChangePasswordOnNextLogin = table.Column<bool>(type: "bit", nullable: false), |
|||
EntityVersion = table.Column<int>(type: "int", nullable: false), |
|||
LastPasswordChangeTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUsers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpOrganizationUnitRoles", |
|||
columns: table => new |
|||
{ |
|||
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
OrganizationUnitId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); |
|||
table.ForeignKey( |
|||
name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", |
|||
column: x => x.OrganizationUnitId, |
|||
principalTable: "AbpOrganizationUnits", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
table.ForeignKey( |
|||
name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", |
|||
column: x => x.RoleId, |
|||
principalTable: "AbpRoles", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpRoleClaims", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ClaimType = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
ClaimValue = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpRoleClaims_AbpRoles_RoleId", |
|||
column: x => x.RoleId, |
|||
principalTable: "AbpRoles", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUserClaims", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ClaimType = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
ClaimValue = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUserClaims", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserClaims_AbpUsers_UserId", |
|||
column: x => x.UserId, |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUserLogins", |
|||
columns: table => new |
|||
{ |
|||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
LoginProvider = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ProviderKey = table.Column<string>(type: "nvarchar(196)", maxLength: 196, nullable: false), |
|||
ProviderDisplayName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserLogins_AbpUsers_UserId", |
|||
column: x => x.UserId, |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUserOrganizationUnits", |
|||
columns: table => new |
|||
{ |
|||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
OrganizationUnitId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", |
|||
column: x => x.OrganizationUnitId, |
|||
principalTable: "AbpOrganizationUnits", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", |
|||
column: x => x.UserId, |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUserRoles", |
|||
columns: table => new |
|||
{ |
|||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserRoles_AbpRoles_RoleId", |
|||
column: x => x.RoleId, |
|||
principalTable: "AbpRoles", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserRoles_AbpUsers_UserId", |
|||
column: x => x.UserId, |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUserTokens", |
|||
columns: table => new |
|||
{ |
|||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
LoginProvider = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Value = table.Column<string>(type: "nvarchar(max)", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserTokens_AbpUsers_UserId", |
|||
column: x => x.UserId, |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", |
|||
table: "AbpLinkUsers", |
|||
columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, |
|||
unique: true, |
|||
filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", |
|||
table: "AbpOrganizationUnitRoles", |
|||
columns: new[] { "RoleId", "OrganizationUnitId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpOrganizationUnits_Code", |
|||
table: "AbpOrganizationUnits", |
|||
column: "Code"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpOrganizationUnits_ParentId", |
|||
table: "AbpOrganizationUnits", |
|||
column: "ParentId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", |
|||
table: "AbpPermissionGrants", |
|||
columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, |
|||
unique: true, |
|||
filter: "[TenantId] IS NOT NULL"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpPermissionGroups_Name", |
|||
table: "AbpPermissionGroups", |
|||
column: "Name", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpPermissions_GroupName", |
|||
table: "AbpPermissions", |
|||
column: "GroupName"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpPermissions_Name", |
|||
table: "AbpPermissions", |
|||
column: "Name", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpRoleClaims_RoleId", |
|||
table: "AbpRoleClaims", |
|||
column: "RoleId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpRoles_NormalizedName", |
|||
table: "AbpRoles", |
|||
column: "NormalizedName"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSecurityLogs_TenantId_Action", |
|||
table: "AbpSecurityLogs", |
|||
columns: new[] { "TenantId", "Action" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSecurityLogs_TenantId_ApplicationName", |
|||
table: "AbpSecurityLogs", |
|||
columns: new[] { "TenantId", "ApplicationName" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSecurityLogs_TenantId_Identity", |
|||
table: "AbpSecurityLogs", |
|||
columns: new[] { "TenantId", "Identity" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSecurityLogs_TenantId_UserId", |
|||
table: "AbpSecurityLogs", |
|||
columns: new[] { "TenantId", "UserId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSessions_Device", |
|||
table: "AbpSessions", |
|||
column: "Device"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSessions_SessionId", |
|||
table: "AbpSessions", |
|||
column: "SessionId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSessions_TenantId_UserId", |
|||
table: "AbpSessions", |
|||
columns: new[] { "TenantId", "UserId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUserClaims_UserId", |
|||
table: "AbpUserClaims", |
|||
column: "UserId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUserLogins_LoginProvider_ProviderKey", |
|||
table: "AbpUserLogins", |
|||
columns: new[] { "LoginProvider", "ProviderKey" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", |
|||
table: "AbpUserOrganizationUnits", |
|||
columns: new[] { "UserId", "OrganizationUnitId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUserRoles_RoleId_UserId", |
|||
table: "AbpUserRoles", |
|||
columns: new[] { "RoleId", "UserId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUsers_Email", |
|||
table: "AbpUsers", |
|||
column: "Email"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUsers_NormalizedEmail", |
|||
table: "AbpUsers", |
|||
column: "NormalizedEmail"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUsers_NormalizedUserName", |
|||
table: "AbpUsers", |
|||
column: "NormalizedUserName"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUsers_UserName", |
|||
table: "AbpUsers", |
|||
column: "UserName"); |
|||
} |
|||
|
|||
/// <inheritdoc />
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "AbpClaimTypes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpLinkUsers"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpOrganizationUnitRoles"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpPermissionGrants"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpPermissionGroups"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpPermissions"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpRoleClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpSecurityLogs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpSessions"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserDelegations"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserLogins"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserOrganizationUnits"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserRoles"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserTokens"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpOrganizationUnits"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpRoles"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUsers"); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,982 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using DemoApp.Data; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace DemoApp.Migrations |
|||
{ |
|||
[DbContext(typeof(DemoAppDbContext))] |
|||
partial class DemoAppDbContextModelSnapshot : ModelSnapshot |
|||
{ |
|||
protected override void BuildModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
|||
.HasAnnotation("ProductVersion", "9.0.2") |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128); |
|||
|
|||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<string>("Description") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.IsRequired() |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsStatic") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("Regex") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)"); |
|||
|
|||
b.Property<string>("RegexDescription") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<bool>("Required") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<int>("ValueType") |
|||
.HasColumnType("int"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("AbpClaimTypes", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("SourceTenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("SourceUserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TargetTenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("TargetUserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") |
|||
.IsUnique() |
|||
.HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); |
|||
|
|||
b.ToTable("AbpLinkUsers", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<int>("EntityVersion") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.IsRequired() |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDefault") |
|||
.HasColumnType("bit") |
|||
.HasColumnName("IsDefault"); |
|||
|
|||
b.Property<bool>("IsPublic") |
|||
.HasColumnType("bit") |
|||
.HasColumnName("IsPublic"); |
|||
|
|||
b.Property<bool>("IsStatic") |
|||
.HasColumnType("bit") |
|||
.HasColumnName("IsStatic"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("NormalizedName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("NormalizedName"); |
|||
|
|||
b.ToTable("AbpRoles", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ClaimType") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("ClaimValue") |
|||
.HasMaxLength(1024) |
|||
.HasColumnType("nvarchar(1024)"); |
|||
|
|||
b.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("RoleId"); |
|||
|
|||
b.ToTable("AbpRoleClaims", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Action") |
|||
.HasMaxLength(96) |
|||
.HasColumnType("nvarchar(96)"); |
|||
|
|||
b.Property<string>("ApplicationName") |
|||
.HasMaxLength(96) |
|||
.HasColumnType("nvarchar(96)"); |
|||
|
|||
b.Property<string>("BrowserInfo") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)"); |
|||
|
|||
b.Property<string>("ClientId") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ClientIpAddress") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("CorrelationId") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.IsRequired() |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Identity") |
|||
.HasMaxLength(96) |
|||
.HasColumnType("nvarchar(96)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("TenantName") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<Guid?>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("UserName") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Action"); |
|||
|
|||
b.HasIndex("TenantId", "ApplicationName"); |
|||
|
|||
b.HasIndex("TenantId", "Identity"); |
|||
|
|||
b.HasIndex("TenantId", "UserId"); |
|||
|
|||
b.ToTable("AbpSecurityLogs", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ClientId") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("Device") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("DeviceInfo") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("IpAddresses") |
|||
.HasMaxLength(2048) |
|||
.HasColumnType("nvarchar(2048)"); |
|||
|
|||
b.Property<DateTime?>("LastAccessed") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<string>("SessionId") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<DateTime>("SignedIn") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Device"); |
|||
|
|||
b.HasIndex("SessionId"); |
|||
|
|||
b.HasIndex("TenantId", "UserId"); |
|||
|
|||
b.ToTable("AbpSessions", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<int>("AccessFailedCount") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("int") |
|||
.HasDefaultValue(0) |
|||
.HasColumnName("AccessFailedCount"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("Email") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("Email"); |
|||
|
|||
b.Property<bool>("EmailConfirmed") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("EmailConfirmed"); |
|||
|
|||
b.Property<int>("EntityVersion") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.IsRequired() |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsActive") |
|||
.HasColumnType("bit") |
|||
.HasColumnName("IsActive"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<bool>("IsExternal") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsExternal"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<DateTimeOffset?>("LastPasswordChangeTime") |
|||
.HasColumnType("datetimeoffset"); |
|||
|
|||
b.Property<bool>("LockoutEnabled") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("LockoutEnabled"); |
|||
|
|||
b.Property<DateTimeOffset?>("LockoutEnd") |
|||
.HasColumnType("datetimeoffset"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("Name"); |
|||
|
|||
b.Property<string>("NormalizedEmail") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("NormalizedEmail"); |
|||
|
|||
b.Property<string>("NormalizedUserName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("NormalizedUserName"); |
|||
|
|||
b.Property<string>("PasswordHash") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("PasswordHash"); |
|||
|
|||
b.Property<string>("PhoneNumber") |
|||
.HasMaxLength(16) |
|||
.HasColumnType("nvarchar(16)") |
|||
.HasColumnName("PhoneNumber"); |
|||
|
|||
b.Property<bool>("PhoneNumberConfirmed") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("PhoneNumberConfirmed"); |
|||
|
|||
b.Property<string>("SecurityStamp") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("SecurityStamp"); |
|||
|
|||
b.Property<bool>("ShouldChangePasswordOnNextLogin") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("Surname") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("Surname"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<bool>("TwoFactorEnabled") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("TwoFactorEnabled"); |
|||
|
|||
b.Property<string>("UserName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("UserName"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Email"); |
|||
|
|||
b.HasIndex("NormalizedEmail"); |
|||
|
|||
b.HasIndex("NormalizedUserName"); |
|||
|
|||
b.HasIndex("UserName"); |
|||
|
|||
b.ToTable("AbpUsers", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ClaimType") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("ClaimValue") |
|||
.HasMaxLength(1024) |
|||
.HasColumnType("nvarchar(1024)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("UserId"); |
|||
|
|||
b.ToTable("AbpUserClaims", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("EndTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<Guid>("SourceUserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("StartTime") |
|||
.HasColumnType("datetime2"); |
|||
|
|||
b.Property<Guid>("TargetUserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("AbpUserDelegations", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => |
|||
{ |
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("LoginProvider") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ProviderDisplayName") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.IsRequired() |
|||
.HasMaxLength(196) |
|||
.HasColumnType("nvarchar(196)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("UserId", "LoginProvider"); |
|||
|
|||
b.HasIndex("LoginProvider", "ProviderKey"); |
|||
|
|||
b.ToTable("AbpUserLogins", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => |
|||
{ |
|||
b.Property<Guid>("OrganizationUnitId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("OrganizationUnitId", "UserId"); |
|||
|
|||
b.HasIndex("UserId", "OrganizationUnitId"); |
|||
|
|||
b.ToTable("AbpUserOrganizationUnits", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|||
{ |
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("UserId", "RoleId"); |
|||
|
|||
b.HasIndex("RoleId", "UserId"); |
|||
|
|||
b.ToTable("AbpUserRoles", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => |
|||
{ |
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("LoginProvider") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Value") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.HasKey("UserId", "LoginProvider", "Name"); |
|||
|
|||
b.ToTable("AbpUserTokens", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Code") |
|||
.IsRequired() |
|||
.HasMaxLength(95) |
|||
.HasColumnType("nvarchar(95)") |
|||
.HasColumnName("Code"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("DisplayName") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)") |
|||
.HasColumnName("DisplayName"); |
|||
|
|||
b.Property<int>("EntityVersion") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.IsRequired() |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<Guid?>("ParentId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Code"); |
|||
|
|||
b.HasIndex("ParentId"); |
|||
|
|||
b.ToTable("AbpOrganizationUnits", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => |
|||
{ |
|||
b.Property<Guid>("OrganizationUnitId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("OrganizationUnitId", "RoleId"); |
|||
|
|||
b.HasIndex("RoleId", "OrganizationUnitId"); |
|||
|
|||
b.ToTable("AbpOrganizationUnitRoles", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("DisplayName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("GroupName") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<bool>("IsEnabled") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<byte>("MultiTenancySide") |
|||
.HasColumnType("tinyint"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ParentName") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("Providers") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("StateCheckers") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("GroupName"); |
|||
|
|||
b.HasIndex("Name") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("AbpPermissions", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ProviderName") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") |
|||
.IsUnique() |
|||
.HasFilter("[TenantId] IS NOT NULL"); |
|||
|
|||
b.ToTable("AbpPermissionGrants", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("DisplayName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("AbpPermissionGroups", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityRole", null) |
|||
.WithMany("Claims") |
|||
.HasForeignKey("RoleId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityUser", null) |
|||
.WithMany("Claims") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityUser", null) |
|||
.WithMany("Logins") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) |
|||
.WithMany() |
|||
.HasForeignKey("OrganizationUnitId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
|
|||
b.HasOne("Volo.Abp.Identity.IdentityUser", null) |
|||
.WithMany("OrganizationUnits") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityRole", null) |
|||
.WithMany() |
|||
.HasForeignKey("RoleId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
|
|||
b.HasOne("Volo.Abp.Identity.IdentityUser", null) |
|||
.WithMany("Roles") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityUser", null) |
|||
.WithMany("Tokens") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) |
|||
.WithMany() |
|||
.HasForeignKey("ParentId"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) |
|||
.WithMany("Roles") |
|||
.HasForeignKey("OrganizationUnitId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
|
|||
b.HasOne("Volo.Abp.Identity.IdentityRole", null) |
|||
.WithMany() |
|||
.HasForeignKey("RoleId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => |
|||
{ |
|||
b.Navigation("Claims"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => |
|||
{ |
|||
b.Navigation("Claims"); |
|||
|
|||
b.Navigation("Logins"); |
|||
|
|||
b.Navigation("OrganizationUnits"); |
|||
|
|||
b.Navigation("Roles"); |
|||
|
|||
b.Navigation("Tokens"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => |
|||
{ |
|||
b.Navigation("Roles"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
@page |
|||
@using Volo.Abp.Users |
|||
@model DemoApp.Pages.IndexModel |
|||
@inject ICurrentUser CurrentUser |
|||
@ -0,0 +1,8 @@ |
|||
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; |
|||
|
|||
namespace DemoApp.Pages; |
|||
|
|||
public class IndexModel : AbpPageModel |
|||
{ |
|||
|
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers |
|||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI |
|||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap |
|||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling |
|||
@ -1,47 +1,46 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Hosting; |
|||
using Serilog; |
|||
using Serilog.Events; |
|||
|
|||
namespace Volo.Abp.VirtualFileExplorer.DemoApp; |
|||
|
|||
public class Program |
|||
{ |
|||
public static async Task<int> Main(string[] args) |
|||
{ |
|||
Log.Logger = new LoggerConfiguration() |
|||
.MinimumLevel.Debug() |
|||
.MinimumLevel.Override("Microsoft", LogEventLevel.Information) |
|||
.Enrich.FromLogContext() |
|||
.WriteTo.File("Logs/logs.txt") |
|||
.CreateLogger(); |
|||
|
|||
try |
|||
{ |
|||
Log.Information("Starting web host."); |
|||
using Serilog; |
|||
using Serilog.Events; |
|||
|
|||
namespace DemoApp; |
|||
|
|||
public class Program |
|||
{ |
|||
public async static Task<int> Main(string[] args) |
|||
{ |
|||
Log.Logger = new LoggerConfiguration() |
|||
.MinimumLevel.Debug() |
|||
.MinimumLevel.Override("Microsoft", LogEventLevel.Information) |
|||
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning) |
|||
.WriteTo.Async(c => c.Console()) |
|||
.CreateLogger(); |
|||
|
|||
try |
|||
{ |
|||
var builder = WebApplication.CreateBuilder(args); |
|||
builder.Host |
|||
.AddAppSettingsSecretsJson() |
|||
.UseSerilog() |
|||
builder.Host.AddAppSettingsSecretsJson() |
|||
.UseAutofac() |
|||
; |
|||
await builder.AddApplicationAsync<AbpVirtualFileExplorerDemoAppModule>(); |
|||
.UseSerilog(); |
|||
|
|||
await builder.AddApplicationAsync<DemoAppModule>(); |
|||
var app = builder.Build(); |
|||
await app.InitializeApplicationAsync(); |
|||
await app.RunAsync(); |
|||
return 0; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
Log.Fatal(ex, "Host terminated unexpectedly!"); |
|||
return 1; |
|||
} |
|||
finally |
|||
{ |
|||
Log.CloseAndFlush(); |
|||
} |
|||
} |
|||
} |
|||
Log.Information("Starting DemoApp."); |
|||
await app.RunAsync(); |
|||
return 0; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
if (ex is HostAbortedException) |
|||
{ |
|||
throw; |
|||
} |
|||
|
|||
Log.Fatal(ex, "DemoApp terminated unexpectedly!"); |
|||
return 1; |
|||
} |
|||
finally |
|||
{ |
|||
Log.CloseAndFlush(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,46 +0,0 @@ |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; |
|||
using Volo.Abp.Autofac; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.VirtualFileExplorer.Web; |
|||
|
|||
namespace Volo.Abp.VirtualFileExplorer.DemoApp; |
|||
|
|||
[DependsOn( |
|||
typeof(AbpAutofacModule), |
|||
typeof(AbpAspNetCoreMvcUiBasicThemeModule), |
|||
typeof(AbpVirtualFileExplorerWebModule) |
|||
)] |
|||
public class AbpVirtualFileExplorerDemoAppModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); |
|||
options.Languages.Add(new LanguageInfo("en", "en", "English")); |
|||
options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish")); |
|||
options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); |
|||
options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi")); |
|||
options.Languages.Add(new LanguageInfo("is", "is", "Icelandic")); |
|||
options.Languages.Add(new LanguageInfo("it", "it", "Italiano")); |
|||
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); |
|||
options.Languages.Add(new LanguageInfo("ro-RO", "ro-RO", "Română")); |
|||
options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak")); |
|||
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); |
|||
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); |
|||
options.Languages.Add(new LanguageInfo("el", "el", "Ελληνικά")); |
|||
}); |
|||
} |
|||
|
|||
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
|||
{ |
|||
var app = context.GetApplicationBuilder(); |
|||
|
|||
app.MapAbpStaticAssets(); |
|||
app.UseRouting(); |
|||
app.UseAbpRequestLocalization(); |
|||
app.UseConfiguredEndpoints(); |
|||
} |
|||
} |
|||
@ -1,19 +0,0 @@ |
|||
using Volo.Abp.Ui.Branding; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.VirtualFileExplorer.DemoApp.Branding; |
|||
|
|||
[Dependency(ReplaceServices = true)] |
|||
public class AbpVirtualFileExplorerDemoAppBrandingProvider : DefaultBrandingProvider |
|||
{ |
|||
public AbpVirtualFileExplorerDemoAppBrandingProvider() |
|||
{ |
|||
AppName = "Virtual file explorer demo app"; |
|||
|
|||
|
|||
} |
|||
|
|||
public override string AppName { get; } |
|||
|
|||
public override string LogoUrl { get; } |
|||
} |
|||
@ -1,14 +0,0 @@ |
|||
@page |
|||
|
|||
@model Volo.Abp.VirtualFileExplorer.DemoApp.Pages.IndexModel |
|||
|
|||
<div class="jumbotron text-center"> |
|||
<div class="row"> |
|||
<div class="col-md-6 mx-auto"> |
|||
<p>Virtual file explprer demo application</p> |
|||
<hr class="my-4"/> |
|||
</div> |
|||
</div> |
|||
<a href="https://abp.io?ref=tmpl" target="_blank" class="btn btn-primary px-4">abp.io</a> |
|||
|
|||
</div> |
|||
@ -1,23 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.AspNetCore.Mvc.RazorPages; |
|||
using Microsoft.Extensions.Logging; |
|||
|
|||
namespace Volo.Abp.VirtualFileExplorer.DemoApp.Pages; |
|||
|
|||
public class IndexModel : PageModel |
|||
{ |
|||
private readonly ILogger<IndexModel> _logger; |
|||
|
|||
public IndexModel(ILogger<IndexModel> logger) |
|||
{ |
|||
_logger = logger; |
|||
} |
|||
|
|||
public void OnGet() |
|||
{ |
|||
} |
|||
} |
|||