mirror of https://github.com/abpframework/abp.git
258 changed files with 7354 additions and 2816 deletions
@ -0,0 +1,225 @@ |
|||
# ABP Framework 4.2 RC Has Been Published |
|||
|
|||
Today, we have released the [ABP Framework](https://abp.io/) and the [ABP Commercial](https://commercial.abp.io/) 4.2.0 RC (Release Candidate). This blog post introduces the new features and important changes in this new version. |
|||
|
|||
> **The planned release date for the [4.2.0 final](https://github.com/abpframework/abp/milestone/48) version is January 28, 2021**. |
|||
|
|||
## Get Started with the 4.2 RC |
|||
|
|||
If you want to try the version `4.2.0` today, follow the steps below; |
|||
|
|||
1) **Upgrade** the ABP CLI to the version `4.2.0-rc.1` using a command line terminal: |
|||
|
|||
````bash |
|||
dotnet tool update Volo.Abp.Cli -g --version 4.2.0-rc.1 |
|||
```` |
|||
|
|||
**or install** if you haven't installed before: |
|||
|
|||
````bash |
|||
dotnet tool install Volo.Abp.Cli -g --version 4.2.0-rc.1 |
|||
```` |
|||
|
|||
2) Create a **new application** with the `--preview` option: |
|||
|
|||
````bash |
|||
abp new BookStore --preview |
|||
```` |
|||
|
|||
See the [ABP CLI documentation](https://docs.abp.io/en/abp/latest/CLI) for all the available options. |
|||
|
|||
> You can also use the *Direct Download* tab on the [Get Started](https://abp.io/get-started) page by selecting the **Preview checkbox**. |
|||
|
|||
## What's new with the ABP Framework 4.2 |
|||
|
|||
## IRepository.GetQueryableAsync() |
|||
|
|||
> **This version comes with an important change about using `IQueryable` features over the [repositories](https://docs.abp.io/en/abp/4.2/Repositories). It is suggested to read this section carefully and apply in your applications.** |
|||
|
|||
`IRepository` interface inherits `IQueryable`, so you can directly use the standard LINQ extension methods, like `Where`, `OrderBy`, `First`, `Sum`... etc. |
|||
|
|||
**Example: Using LINQ directly over the repository object** |
|||
|
|||
````csharp |
|||
public class BookAppService : ApplicationService, IBookAppService |
|||
{ |
|||
private readonly IRepository<Book, Guid> _bookRepository; |
|||
|
|||
public BookAppService(IRepository<Book, Guid> bookRepository) |
|||
{ |
|||
_bookRepository = bookRepository; |
|||
} |
|||
|
|||
public async Task DoItInOldWayAsync() |
|||
{ |
|||
//Apply any standard LINQ extension method |
|||
var query = _bookRepository |
|||
.Where(x => x.Price > 10) |
|||
.OrderBy(x => x.Name); |
|||
|
|||
//Execute the query asynchronously |
|||
var books = await AsyncExecuter.ToListAsync(query); |
|||
} |
|||
} |
|||
```` |
|||
|
|||
*See [the documentation](https://docs.abp.io/en/abp/4.2/Repositories#iqueryable-async-operations) if you wonder what is the `AsyncExecuter`.* |
|||
|
|||
Beginning from the version 4.2, the recommended way is using `IRepository.GetQueryableAsync()` to obtain an `IQueryable`, then use the LINQ extension methods over it. |
|||
|
|||
**Example: Using the new GetQueryableAsync method** |
|||
|
|||
````csharp |
|||
public async Task DoItInNewWayAsync() |
|||
{ |
|||
//Use GetQueryableAsync to obtain the IQueryable<Book> first |
|||
var queryable = await _bookRepository.GetQueryableAsync(); |
|||
|
|||
//Then apply any standard LINQ extension method |
|||
var query = queryable |
|||
.Where(x => x.Price > 10) |
|||
.OrderBy(x => x.Name); |
|||
|
|||
//Finally, execute the query asynchronously |
|||
var books = await AsyncExecuter.ToListAsync(query); |
|||
} |
|||
```` |
|||
|
|||
ABP may start a database transaction when you get an `IQueryable` (If current [Unit Of Work](https://docs.abp.io/en/abp/latest/Unit-Of-Work) is transactional). In this new way, it is possible to **start the database transaction in an asynchronous way**. Previously, we could not get the advantage of asynchronous while starting the transactions. |
|||
|
|||
> **The new way has a significant performance and scalability gain. The old usage (directly using LINQ over the repositories) will be removed in the next major version.** You have a lot of time for the change, but we recommend to immediately take the action since the old usage has a big scalability problem. |
|||
|
|||
#### About IRepository Async Extension Methods |
|||
|
|||
Using IRepository Async Extension Methods has no such a problem. The examples below are pretty fine: |
|||
|
|||
````csharp |
|||
var countAll = await _personRepository |
|||
.CountAsync(); |
|||
|
|||
var count = await _personRepository |
|||
.CountAsync(x => x.Name.StartsWith("A")); |
|||
|
|||
var book1984 = await _bookRepository |
|||
.FirstOrDefaultAsync(x => x.Name == "John"); |
|||
```` |
|||
|
|||
See the [repository documentation](https://docs.abp.io/en/abp/4.2/Repositories#iqueryable-async-operations) to understand the relation between `IQueryable` and asynchronous operations. |
|||
|
|||
### Repository Bulk Operations |
|||
|
|||
This version adds the following methods to the repositories: |
|||
|
|||
* `InsertManyAsync` |
|||
* `UpdateManyAsync` |
|||
* `DeleteManyAsync` |
|||
|
|||
The purpose of these methods to insert, update or delete many entities in one call with a better performance. |
|||
|
|||
Currently, **MongoDB** provider implements these methods as a single bulk operation since MongoDB API natively supports. But current **Entity Framework Core** implementation is not a real bulk operation. Instead, it does its best with the native API of the EF Core. If you want to implement in a more performant way, you can [customize the bulk operations](https://docs.abp.io/en/abp/4.2/Entity-Framework-Core#customize-bulk-operations) with your own implementation or by using a library. We could find a good open source library for EF Core 5.0 to implement it. |
|||
|
|||
### Selecting DBMS on Template Creation |
|||
|
|||
[ABP CLI](https://docs.abp.io/en/abp/4.2/CLI#new) now has an option to specify the DBMS when you use EF Core as the database provider. |
|||
|
|||
**Example: Select MySQL as the DBMS** |
|||
|
|||
````bash |
|||
abp new BookStore -dbms mysql --preview |
|||
```` |
|||
|
|||
Available options: `SqlServer` (default), `MySQL`, `SQLite`, `Oracle-Devart`, `PostgreSQL`. See the [documentation](https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Other-DBMS) to use any other DBMS or switch the DBMS later. |
|||
|
|||
> If you select a DBMS other than the SQL Server, then the database migrations are also created when you first run the `DbMigrator` application. |
|||
|
|||
### Swagger Login |
|||
|
|||
TODO |
|||
|
|||
### Angular Unit Testing |
|||
|
|||
We've improved the modules and the startup template to setup and write unit tests easier with the Angular UI. See the [Angular Unit Testing document](https://docs.abp.io/en/abp/4.2/UI/Angular/Testing) for details. |
|||
|
|||
### Other News |
|||
|
|||
* Improved HTTP **request-response performance** by resolving dependencies in a deferred way in the action/page filters, interceptors and some other services. |
|||
* Removed `MultipleActiveResultSets` from connection strings for new templates for SQL Server, since the new EF Core gives a warning when using it. If you want to use it, you need to change the connection string yourself. |
|||
* Added `HardDeleteAsync` extension method that takes a predicate to delete multiple entities. This extension method is available if the entity [Soft Delete](https://docs.abp.io/en/abp/latest/Data-Filtering). |
|||
* Implemented the [Page Alerts](https://docs.abp.io/en/abp/4.2/UI/Angular/Page-Alerts) for the **Angular UI**. |
|||
* Implemented [Page Progress](https://docs.abp.io/en/abp/4.2/UI/Blazor/Page-Progress) for the **Blazor UI**. It automatically shows an undetermined progress bar on top of the page while performing an AJAX request. It also proves an API to you if you need to show/hide the progress bar in your code. |
|||
|
|||
## What's new with the ABP Commercial 4.2 |
|||
|
|||
### Microservice Startup Template |
|||
|
|||
The new [Microservice Startup Template](https://docs.abp.io/en/commercial/4.2/startup-templates/microservice/index) is a generic solution to start a new microservice solution. |
|||
|
|||
While we accept that every microservice solution will be different and every system has its own design requirements and trade-offs, we believe such a startup solution is a very useful starting point for most of the solutions, and a useful example for others. |
|||
|
|||
 |
|||
|
|||
*Figure: A simplified overall diagram of the microservice solution.* |
|||
|
|||
You can [follow the documentation](https://docs.abp.io/en/commercial/4.2/startup-templates/microservice/index) to get started with this startup template. **This template should be considered as an early release**. We will improve it and write a lot of guides. |
|||
|
|||
If you want to use the ABP Suite to create your solution, then you need to first upgrade it: |
|||
|
|||
````bash |
|||
abp suite update |
|||
```` |
|||
|
|||
If you want, you can directly create a new solution from the command line: |
|||
|
|||
````bash |
|||
abp new Volosoft.MyMicroserviceSystem -t microservice-pro --preview |
|||
```` |
|||
|
|||
Company Name is optional. Solution name could be *MyMicroserviceSystem* for this example. |
|||
|
|||
### Public Website in the Startup Templates |
|||
|
|||
As mentioned in the previous release post, we've added a *Public Website* application to the startup templates. It is configured to authenticate through the IdentityServer with a single sign-on system. |
|||
|
|||
You can use this application to create a landing page for your actual application or a corporate website for your business. An example screenshot: |
|||
|
|||
 |
|||
|
|||
It uses the same *Lepton Theme*, so you can apply [all the styles](https://commercial.abp.io/themes). The Public Website has a different layout and also has a different setting for the styling (that can be configured in the *Settings / Lepton Theme* page of the main web application). |
|||
|
|||
> *Public Website* is optional and you need to select the "Public Website" option while creating a new solution using the ABP Suite, or use the `--with-public-website` option while using the `abp new` CLI command. |
|||
|
|||
### Easy CRM Blazor UI |
|||
|
|||
Easy CRM is an example application built with the ABP Commercial. MVC (Razor Pages) and Angular UI implementations were already provided. With the version 4.2, we are providing the Blazor UI implementation for this application. |
|||
|
|||
 |
|||
|
|||
### Other News |
|||
|
|||
* Implemented Iyzico as a payment gateway provider for the [payment module](https://commercial.abp.io/modules/Volo.Payment) in addition to Paypal, Stripe, 2Checkout and Payu providers. |
|||
|
|||
## ABP Community News |
|||
|
|||
### Sharing Video Contents |
|||
|
|||
[community.abp.io](https://community.abp.io/) is a place to share ABP related contents. It started with publishing articles. Now, it supports to publish video contents. [See this example](https://community.abp.io/articles/be-a-superhero-on-day-1-with-abp.io-wvifcy9s). All you need to do is to create a video and upload to YouTube. Then you can [submit](https://community.abp.io/articles/submit) the YouTube link to the ABP Community website. |
|||
|
|||
### Multi-language support |
|||
|
|||
We planned ABP Community to publish English-only contents. However, we see that people want to share contents in other languages too. Now, **it is possible to submit a content in any language**. Just select the Language option while submitting your content. |
|||
|
|||
**When you submit a non-English content, it is not visible to all the visitors by default**. Visitors can see a non-English content only if their browser language or the selected language matches to the content language (there is a language selection at the end of the website). |
|||
|
|||
### External Contents |
|||
|
|||
If you want to publish your content anywhere else, but want to post a link of your content, you can select *External Content* option while submitting the post. For example, [this article](https://community.abp.io/articles/aspnet-boilerplate-to-abp-framework-xml-to-json-localization-conversion-0mxyjrzj) is an external article and also written in Chinese language. |
|||
|
|||
## About the Next Release |
|||
|
|||
The next feature version will be 4.3.0. It is planned to release the 4.3 RC (Release Candidate) on March 11 and the final version on March 25, 2021. |
|||
|
|||
We decided to slow down the feature development for the [next milestone](https://github.com/abpframework/abp/milestone/49). We will continue to improve the existing features and introduce new ones, sure, but wanted to have more time for the planning, documentation, creating guides and improving the development experience. |
|||
|
|||
## Feedback |
|||
|
|||
Please check out the ABP Framework 4.2.0 RC and [provide feedback](https://github.com/abpframework/abp/issues/new) to help us to release a more stable version. **The planned release date for the [4.2.0 final](https://github.com/abpframework/abp/milestone/48) version is January 28, 2021**. |
|||
|
After Width: | Height: | Size: 256 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 284 KiB |
@ -0,0 +1,28 @@ |
|||
# Authorization in Angular UI |
|||
|
|||
OAuth is preconfigured in Angular application templates. So, when you start a project using the CLI (or Suite, for that matter), authorization already works. You can find **OAuth configuration** in the _environment.ts_ files. |
|||
|
|||
```js |
|||
import { Config } from '@abp/ng.core'; |
|||
|
|||
const baseUrl = 'http://localhost:4200'; |
|||
|
|||
export const environment = { |
|||
// other options removed for sake of brevity |
|||
|
|||
oAuthConfig: { |
|||
issuer: 'https://localhost:44305', |
|||
redirectUri: baseUrl, |
|||
clientId: 'MyProjectName_App', |
|||
responseType: 'code', |
|||
scope: 'offline_access MyProjectName', |
|||
}, |
|||
|
|||
// other options removed for sake of brevity |
|||
} as Config.Environment; |
|||
|
|||
``` |
|||
|
|||
This configuration results in an [OAuth authorization code flow with PKCE](https://tools.ietf.org/html/rfc7636) and we are using [angular-oauth2-oidc library](https://github.com/manfredsteyer/angular-oauth2-oidc#logging-in) for managing OAuth in the Angular client. |
|||
|
|||
According to this flow, the user is redirected to an external login page which is built with MVC. So, if you need **to customize the login page**, please follow [this community article](https://community.abp.io/articles/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd). |
|||
@ -0,0 +1,64 @@ |
|||
# Page Alerts |
|||
|
|||
A page alert is useful for displaying an important message to the user. The ABP Framework provides an easy way to show the following alert to the user. |
|||
|
|||
 |
|||
|
|||
You can simply import `PageAlertService` from `@abp/ng.theme.shared` and utilize it as follows: |
|||
|
|||
```typescript |
|||
import { PageAlertService } from '@abp/ng.theme.shared'; |
|||
|
|||
@Component({ |
|||
// ... |
|||
}) |
|||
export class MyComponent { |
|||
constructor(private service: PageAlertService) {} |
|||
|
|||
showWarning() { |
|||
this.service.show({ |
|||
type: 'warning', |
|||
message: |
|||
'We will have a service interruption between 02:00 AM and 04:00 AM at October 23, 2023!', |
|||
title: 'Service Interruption', |
|||
}); |
|||
} |
|||
} |
|||
``` |
|||
|
|||
## `SHOW` |
|||
|
|||
The method `show` accepts a single object that is type of `PageAlert` |
|||
|
|||
```typescript |
|||
export interface PageAlert { |
|||
type: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark'; |
|||
message: string; |
|||
title?: string; |
|||
dismissible?: boolean; |
|||
messageLocalizationParams?: string[]; |
|||
titleLocalizationParams?: string[]; |
|||
} |
|||
``` |
|||
|
|||
* `type` (Required): Defines what type of alert will be shown |
|||
* `message` (Required): The message who will be shown, also works with localization as well. |
|||
* `title` (Optional): The title of the message. If it is not provided, the title will be hidden. |
|||
* `dismissible` (Optional): Default is `true`. If enabled, a button on the top right corner will be shown to the users so that they can dismiss the message. |
|||
* `messageLocalizationParams` and `titleLocalizationParams` (Optional): If the message and/or the title is a key for localization service and contains some parameters, these fields could be used to pass those parameters. |
|||
|
|||
### An example with Localization |
|||
|
|||
```typescript |
|||
this.service.show({ |
|||
type: 'danger', |
|||
message: 'AbpAccount::PagerInfo{0}{1}{2}', |
|||
messageLocalizationParams: ['10', '20', '30'], |
|||
title: 'AbpAccount::EntityNotFoundErrorMessage', |
|||
titleLocalizationParams: ['Test', 'id123'], |
|||
}); |
|||
``` |
|||
|
|||
 |
|||
|
|||
|
|||
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 64 KiB |
@ -0,0 +1,10 @@ |
|||
{ |
|||
"culture": "nl", |
|||
"texts": { |
|||
"Volo.Authorization:010001": "Autorisatie mislukt! De benodigde policy is niet aan u verleend.", |
|||
"Volo.Authorization:010002": "Autorisatie mislukt! De benodigde policy: '{PolicyName}' is niet aan u verleend.", |
|||
"Volo.Authorization:010003": "Autorisatie mislukt! De benodigde policy is niet aan de opgegeven resource: '{ResourceName}' verleend.", |
|||
"Volo.Authorization:010004": "Autorisatie mislukt! De benodigde requirement is niet aan de opgegeven resource: '{ResourceName}' verleend.", |
|||
"Volo.Authorization:010005": "Autorisatie mislukt! De benodigde requirements zijn niet aan de opgegeven resource: '{ResourceName}' verleend." |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
namespace Volo.Abp.Cli.ProjectBuilding.Templates.Microservice |
|||
{ |
|||
public class MicroserviceProTemplate : MicroserviceTemplateBase |
|||
{ |
|||
/// <summary>
|
|||
/// "microservice-pro".
|
|||
/// </summary>
|
|||
public const string TemplateName = "microservice-pro"; |
|||
|
|||
public MicroserviceProTemplate() |
|||
: base(TemplateName) |
|||
{ |
|||
DocumentUrl = null; // todo: set this
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,74 @@ |
|||
using System.Collections.Generic; |
|||
using JetBrains.Annotations; |
|||
using Volo.Abp.Cli.ProjectBuilding.Building; |
|||
using Volo.Abp.Cli.ProjectBuilding.Building.Steps; |
|||
|
|||
namespace Volo.Abp.Cli.ProjectBuilding.Templates.Microservice |
|||
{ |
|||
public abstract class MicroserviceTemplateBase : TemplateInfo |
|||
{ |
|||
protected MicroserviceTemplateBase([NotNull] string name) |
|||
: base(name) |
|||
{ |
|||
} |
|||
|
|||
public override IEnumerable<ProjectBuildPipelineStep> GetCustomSteps(ProjectBuildContext context) |
|||
{ |
|||
var steps = new List<ProjectBuildPipelineStep>(); |
|||
|
|||
DeleteUnrelatedProjects(context, steps); |
|||
RandomizeStringEncryption(context, steps); |
|||
UpdateNuGetConfig(context, steps); |
|||
|
|||
return steps; |
|||
} |
|||
|
|||
private static void DeleteUnrelatedProjects(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
|||
{ |
|||
switch (context.BuildArgs.UiFramework) |
|||
{ |
|||
case UiFramework.None: |
|||
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Web")); |
|||
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.WebGateway")); |
|||
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Blazor")); |
|||
steps.Add(new RemoveFolderStep("/angular")); |
|||
break; |
|||
|
|||
case UiFramework.Angular: |
|||
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Web")); |
|||
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.WebGateway")); |
|||
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Blazor")); |
|||
break; |
|||
|
|||
|
|||
case UiFramework.Blazor: |
|||
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Web")); |
|||
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.WebGateway")); |
|||
steps.Add(new RemoveFolderStep("/angular")); |
|||
break; |
|||
|
|||
case UiFramework.Mvc: |
|||
case UiFramework.NotSpecified: |
|||
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Blazor")); |
|||
steps.Add(new RemoveFolderStep("/angular")); |
|||
break; |
|||
} |
|||
|
|||
if (!context.BuildArgs.PublicWebSite) |
|||
{ |
|||
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.PublicWeb")); |
|||
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.PublicWebGateway")); |
|||
} |
|||
} |
|||
|
|||
private static void RandomizeStringEncryption(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
|||
{ |
|||
steps.Add(new RandomizeStringEncryptionStep()); |
|||
} |
|||
|
|||
private static void UpdateNuGetConfig(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
|||
{ |
|||
steps.Add(new UpdateNuGetConfigStep("/NuGet.Config")); |
|||
} |
|||
} |
|||
} |
|||
@ -1,23 +1,25 @@ |
|||
{ |
|||
"culture": "nl", |
|||
"texts": { |
|||
"DisplayName:Abp.Mailing.DefaultFromAddress": "Standard vanaf adres", |
|||
"DisplayName:Abp.Mailing.DefaultFromDisplayName": "Standaard vanaf weergave naam", |
|||
"DisplayName:Abp.Mailing.DefaultFromAddress": "Standaard vanaf adres", |
|||
"DisplayName:Abp.Mailing.DefaultFromDisplayName": "Standaard vanaf weergavenaam", |
|||
"DisplayName:Abp.Mailing.Smtp.Host": "Host", |
|||
"DisplayName:Abp.Mailing.Smtp.Port": "Poort", |
|||
"DisplayName:Abp.Mailing.Smtp.UserName": "Gebruiker naam", |
|||
"DisplayName:Abp.Mailing.Smtp.Password": "wachtwoord", |
|||
"DisplayName:Abp.Mailing.Smtp.UserName": "Gebruikersnaam", |
|||
"DisplayName:Abp.Mailing.Smtp.Password": "Wachtwoord", |
|||
"DisplayName:Abp.Mailing.Smtp.Domain": "Domein", |
|||
"DisplayName:Abp.Mailing.Smtp.EnableSsl": "SSL toestaan", |
|||
"DisplayName:Abp.Mailing.Smtp.UseDefaultCredentials": "Gebruik standaard inloggegevens", |
|||
"Description:Abp.Mailing.DefaultFromAddress": "Standard vanaf adres", |
|||
"Description:Abp.Mailing.DefaultFromDisplayName": "Standaard vanaf weergave naam", |
|||
"Description:Abp.Mailing.DefaultFromAddress": "Standaard vanaf adres", |
|||
"Description:Abp.Mailing.DefaultFromDisplayName": "Standaard vanaf weergavenaam", |
|||
"Description:Abp.Mailing.Smtp.Host": "De naam of het IP-adres van de host die wordt gebruikt voor SMTP-transacties.", |
|||
"Description:Abp.Mailing.Smtp.Port": "De poort die wordt gebruikt voor SMTP-transacties.", |
|||
"Description:Abp.Mailing.Smtp.UserName": "Gebruikersnaam gekoppeld aan de inloggegevens.", |
|||
"Description:Abp.Mailing.Smtp.Password": "Het wachtwoord voor de gebruikersnaam die bij de inloggegevens hoort.", |
|||
"Description:Abp.Mailing.Smtp.Domain": "Het domein of de computernaam die de inloggegevens verifieert.", |
|||
"Description:Abp.Mailing.Smtp.EnableSsl": "Of de SmtpClient Secure Sockets Layer (SSL) gebruikt om de verbinding te versleutelen.", |
|||
"Description:Abp.Mailing.Smtp.UseDefaultCredentials": "Of de standaard inloggegevens worden verzonden met verzoeken." |
|||
"Description:Abp.Mailing.Smtp.UseDefaultCredentials": "Of de standaard inloggegevens worden verzonden met verzoeken.", |
|||
"TextTemplate:StandardEmailTemplates.Layout": "Standaard sjabloon voor e-mail lay-out", |
|||
"TextTemplate:StandardEmailTemplates.Message": "Eenvoudig berichtsjabloon voor e-mails" |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
{ |
|||
"culture": "nl", |
|||
"texts": { |
|||
"Volo.Feature:010001": "Functie '{FeatureName}' is niet ingeschakeld", |
|||
"Volo.Feature:010002": "Vereiste functies zijn niet ingeschakeld. Al deze functies moeten zijn ingeschakeld: {FeatureNames}", |
|||
"Volo.Feature:010003": "Vereiste functies zijn niet ingeschakeld. Ten minste een van deze functies moet zijn ingeschakeld: {FeatureNames}" |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
{ |
|||
"culture": "nl", |
|||
"texts": { |
|||
"DisplayName:Abp.Ldap.ServerHost": "Serverhost", |
|||
"Description:Abp.Ldap.ServerHost": "Serverhost", |
|||
"DisplayName:Abp.Ldap.ServerPort": "Server poort", |
|||
"Description:Abp.Ldap.ServerPort": "Server poort", |
|||
"DisplayName:Abp.Ldap.BaseDc": "Basisdomein component", |
|||
"Description:Abp.Ldap.BaseDc": "Basisdomein component", |
|||
"DisplayName:Abp.Ldap.UserName": "Gebruikersnaam", |
|||
"Description:Abp.Ldap.UserName": "Gebruikersnaam", |
|||
"DisplayName:Abp.Ldap.Password": "Wachtwoord", |
|||
"Description:Abp.Ldap.Password": "Wachtwoord" |
|||
} |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
using System; |
|||
using System.Security.Claims; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.Security.Claims |
|||
{ |
|||
public class AbpClaimsPrincipalContributorContext |
|||
{ |
|||
[NotNull] |
|||
public ClaimsPrincipal ClaimsPrincipal { get; } |
|||
|
|||
[NotNull] |
|||
public IServiceProvider ServiceProvider { get; } |
|||
|
|||
public AbpClaimsPrincipalContributorContext( |
|||
[NotNull] ClaimsPrincipal claimsIdentity, |
|||
[NotNull] IServiceProvider serviceProvider) |
|||
{ |
|||
ClaimsPrincipal = claimsIdentity; |
|||
ServiceProvider = serviceProvider; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
using System.Security.Claims; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Options; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.Security.Claims |
|||
{ |
|||
public class AbpClaimsPrincipalFactory : IAbpClaimsPrincipalFactory, ITransientDependency |
|||
{ |
|||
protected IServiceScopeFactory ServiceScopeFactory { get; } |
|||
protected AbpClaimsPrincipalFactoryOptions Options { get; } |
|||
|
|||
public AbpClaimsPrincipalFactory( |
|||
IServiceScopeFactory serviceScopeFactory, |
|||
IOptions<AbpClaimsPrincipalFactoryOptions> abpClaimOptions) |
|||
{ |
|||
ServiceScopeFactory = serviceScopeFactory; |
|||
Options = abpClaimOptions.Value; |
|||
} |
|||
|
|||
public virtual async Task<ClaimsPrincipal> CreateAsync() |
|||
{ |
|||
using (var scope = ServiceScopeFactory.CreateScope()) |
|||
{ |
|||
var claimsPrincipal = new ClaimsPrincipal(new ClaimsIdentity()); |
|||
|
|||
var context = new AbpClaimsPrincipalContributorContext(claimsPrincipal, scope.ServiceProvider); |
|||
|
|||
foreach (var contributorType in Options.Contributors) |
|||
{ |
|||
var contributor = (IAbpClaimsPrincipalContributor) scope.ServiceProvider.GetRequiredService(contributorType); |
|||
await contributor.ContributeAsync(context); |
|||
} |
|||
|
|||
return claimsPrincipal; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
using Volo.Abp.Collections; |
|||
|
|||
namespace Volo.Abp.Security.Claims |
|||
{ |
|||
public class AbpClaimsPrincipalFactoryOptions |
|||
{ |
|||
public ITypeList<IAbpClaimsPrincipalContributor> Contributors { get; } |
|||
|
|||
public AbpClaimsPrincipalFactoryOptions() |
|||
{ |
|||
Contributors = new TypeList<IAbpClaimsPrincipalContributor>(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.Security.Claims |
|||
{ |
|||
public interface IAbpClaimsPrincipalContributor |
|||
{ |
|||
Task ContributeAsync(AbpClaimsPrincipalContributorContext context); |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
using System.Security.Claims; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.Security.Claims |
|||
{ |
|||
public interface IAbpClaimsPrincipalFactory |
|||
{ |
|||
Task<ClaimsPrincipal> CreateAsync(); |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "nl", |
|||
"texts": { |
|||
"DisplayName:Abp.Timing.Timezone": "Tijdzone", |
|||
"Description:Abp.Timing.Timezone": "Tijdzone van applicatie" |
|||
} |
|||
} |
|||
@ -0,0 +1,6 @@ |
|||
{ |
|||
"culture": "nl", |
|||
"texts": { |
|||
"Volo.Abp.Http.DynamicProxying:10001": "Business-uitzondering met data: {0}" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"culture": "nl", |
|||
"texts": { |
|||
"HelloText": "Hallo {0}", |
|||
"HowAreYou": "hoe is het met je?" |
|||
} |
|||
} |
|||
@ -0,0 +1,6 @@ |
|||
{ |
|||
"culture": "nl", |
|||
"texts": { |
|||
"ManageYourProfile": "Beheer uw profiel" |
|||
} |
|||
} |
|||
@ -0,0 +1,531 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.CmsKit.EntityFrameworkCore; |
|||
|
|||
namespace Volo.CmsKit.Migrations |
|||
{ |
|||
[DbContext(typeof(CmsKitHttpApiHostMigrationsDbContext))] |
|||
[Migration("20201231111745_Initial")] |
|||
partial class Initial |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.UseIdentityColumns() |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("ProductVersion", "5.0.1"); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<Guid>("ContainerId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<byte[]>("Content") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("varbinary(max)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("ContainerId"); |
|||
|
|||
b.HasIndex("TenantId", "ContainerId", "Name"); |
|||
|
|||
b.ToTable("AbpBlobs"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Name"); |
|||
|
|||
b.ToTable("AbpBlobContainers"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<Guid?>("RepliedCommentId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Text") |
|||
.IsRequired() |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "RepliedCommentId"); |
|||
|
|||
b.HasIndex("TenantId", "EntityType", "EntityId"); |
|||
|
|||
b.ToTable("CmsComments"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Contents.Content", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.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>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.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?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Value") |
|||
.IsRequired() |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "EntityType", "EntityId"); |
|||
|
|||
b.ToTable("CmsContents"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Pages.Page", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.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>("Description") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.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?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Title") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("Url") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Url"); |
|||
|
|||
b.ToTable("CmsPages"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<short>("StarCount") |
|||
.HasColumnType("smallint"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); |
|||
|
|||
b.ToTable("CmsRatings"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ReactionName") |
|||
.IsRequired() |
|||
.HasMaxLength(32) |
|||
.HasColumnType("nvarchar(32)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); |
|||
|
|||
b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); |
|||
|
|||
b.ToTable("CmsUserReactions"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => |
|||
{ |
|||
b.Property<string>("EntityId") |
|||
.HasColumnType("nvarchar(450)"); |
|||
|
|||
b.Property<Guid>("TagId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("EntityId", "TagId"); |
|||
|
|||
b.HasIndex("TenantId", "EntityId", "TagId"); |
|||
|
|||
b.ToTable("CmsEntityTags"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Tags.Tag", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.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>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.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<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(32) |
|||
.HasColumnType("nvarchar(32)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Name"); |
|||
|
|||
b.ToTable("CmsTags"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
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<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("Name"); |
|||
|
|||
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>("Surname") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("Surname"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("UserName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("UserName"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Email"); |
|||
|
|||
b.HasIndex("TenantId", "UserName"); |
|||
|
|||
b.ToTable("CmsUsers"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) |
|||
.WithMany() |
|||
.HasForeignKey("ContainerId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,309 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Volo.CmsKit.Migrations |
|||
{ |
|||
public partial class Initial : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "AbpBlobContainers", |
|||
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), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpBlobContainers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsComments", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Text = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false), |
|||
RepliedCommentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsComments", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsContents", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Value = table.Column<string>(type: "nvarchar(max)", maxLength: 2147483647, nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
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_CmsContents", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsEntityTags", |
|||
columns: table => new |
|||
{ |
|||
TagId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(450)", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsEntityTags", x => new { x.EntityId, x.TagId }); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsPages", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Url = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Description = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
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_CmsPages", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsRatings", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
StarCount = table.Column<short>(type: "smallint", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsRatings", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsTags", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
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_CmsTags", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsUserReactions", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
ReactionName = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsUserReactions", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsUsers", |
|||
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), |
|||
Email = 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), |
|||
EmailConfirmed = 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), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsUsers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpBlobs", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ContainerId = 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), |
|||
Content = table.Column<byte[]>(type: "varbinary(max)", maxLength: 2147483647, nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpBlobs", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpBlobs_AbpBlobContainers_ContainerId", |
|||
column: x => x.ContainerId, |
|||
principalTable: "AbpBlobContainers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobContainers_TenantId_Name", |
|||
table: "AbpBlobContainers", |
|||
columns: new[] { "TenantId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobs_ContainerId", |
|||
table: "AbpBlobs", |
|||
column: "ContainerId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobs_TenantId_ContainerId_Name", |
|||
table: "AbpBlobs", |
|||
columns: new[] { "TenantId", "ContainerId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsComments_TenantId_EntityType_EntityId", |
|||
table: "CmsComments", |
|||
columns: new[] { "TenantId", "EntityType", "EntityId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsComments_TenantId_RepliedCommentId", |
|||
table: "CmsComments", |
|||
columns: new[] { "TenantId", "RepliedCommentId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsContents_TenantId_EntityType_EntityId", |
|||
table: "CmsContents", |
|||
columns: new[] { "TenantId", "EntityType", "EntityId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsEntityTags_TenantId_EntityId_TagId", |
|||
table: "CmsEntityTags", |
|||
columns: new[] { "TenantId", "EntityId", "TagId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsPages_TenantId_Url", |
|||
table: "CmsPages", |
|||
columns: new[] { "TenantId", "Url" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", |
|||
table: "CmsRatings", |
|||
columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsTags_TenantId_Name", |
|||
table: "CmsTags", |
|||
columns: new[] { "TenantId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", |
|||
table: "CmsUserReactions", |
|||
columns: new[] { "TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsUserReactions_TenantId_EntityType_EntityId_ReactionName", |
|||
table: "CmsUserReactions", |
|||
columns: new[] { "TenantId", "EntityType", "EntityId", "ReactionName" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsUsers_TenantId_Email", |
|||
table: "CmsUsers", |
|||
columns: new[] { "TenantId", "Email" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsUsers_TenantId_UserName", |
|||
table: "CmsUsers", |
|||
columns: new[] { "TenantId", "UserName" }); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "AbpBlobs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsComments"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsContents"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsEntityTags"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsPages"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsRatings"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsTags"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsUserReactions"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsUsers"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpBlobContainers"); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,529 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.CmsKit.EntityFrameworkCore; |
|||
|
|||
namespace Volo.CmsKit.Migrations |
|||
{ |
|||
[DbContext(typeof(CmsKitHttpApiHostMigrationsDbContext))] |
|||
partial class CmsKitHttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot |
|||
{ |
|||
protected override void BuildModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.UseIdentityColumns() |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("ProductVersion", "5.0.1"); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<Guid>("ContainerId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<byte[]>("Content") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("varbinary(max)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("ContainerId"); |
|||
|
|||
b.HasIndex("TenantId", "ContainerId", "Name"); |
|||
|
|||
b.ToTable("AbpBlobs"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Name"); |
|||
|
|||
b.ToTable("AbpBlobContainers"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<Guid?>("RepliedCommentId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Text") |
|||
.IsRequired() |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "RepliedCommentId"); |
|||
|
|||
b.HasIndex("TenantId", "EntityType", "EntityId"); |
|||
|
|||
b.ToTable("CmsComments"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Contents.Content", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.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>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.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?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Value") |
|||
.IsRequired() |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "EntityType", "EntityId"); |
|||
|
|||
b.ToTable("CmsContents"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Pages.Page", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.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>("Description") |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.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?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Title") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("Url") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Url"); |
|||
|
|||
b.ToTable("CmsPages"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<short>("StarCount") |
|||
.HasColumnType("smallint"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); |
|||
|
|||
b.ToTable("CmsRatings"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ReactionName") |
|||
.IsRequired() |
|||
.HasMaxLength(32) |
|||
.HasColumnType("nvarchar(32)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); |
|||
|
|||
b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); |
|||
|
|||
b.ToTable("CmsUserReactions"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => |
|||
{ |
|||
b.Property<string>("EntityId") |
|||
.HasColumnType("nvarchar(450)"); |
|||
|
|||
b.Property<Guid>("TagId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("EntityId", "TagId"); |
|||
|
|||
b.HasIndex("TenantId", "EntityId", "TagId"); |
|||
|
|||
b.ToTable("CmsEntityTags"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Tags.Tag", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.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>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.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<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(32) |
|||
.HasColumnType("nvarchar(32)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Name"); |
|||
|
|||
b.ToTable("CmsTags"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
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<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("Name"); |
|||
|
|||
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>("Surname") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("Surname"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("UserName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("UserName"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Email"); |
|||
|
|||
b.HasIndex("TenantId", "UserName"); |
|||
|
|||
b.ToTable("CmsUsers"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) |
|||
.WithMany() |
|||
.HasForeignKey("ContainerId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,95 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Volo.CmsKit.Migrations |
|||
{ |
|||
public partial class Added_Blob_Storing : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Description", |
|||
table: "CmsPages", |
|||
type: "nvarchar(512)", |
|||
maxLength: 512, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(515)", |
|||
oldMaxLength: 515, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpBlobContainers", |
|||
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), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpBlobContainers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpBlobs", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ContainerId = 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), |
|||
Content = table.Column<byte[]>(type: "varbinary(max)", maxLength: 2147483647, nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpBlobs", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpBlobs_AbpBlobContainers_ContainerId", |
|||
column: x => x.ContainerId, |
|||
principalTable: "AbpBlobContainers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobContainers_TenantId_Name", |
|||
table: "AbpBlobContainers", |
|||
columns: new[] { "TenantId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobs_ContainerId", |
|||
table: "AbpBlobs", |
|||
column: "ContainerId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobs_TenantId_ContainerId_Name", |
|||
table: "AbpBlobs", |
|||
columns: new[] { "TenantId", "ContainerId", "Name" }); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "AbpBlobs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpBlobContainers"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Description", |
|||
table: "CmsPages", |
|||
type: "nvarchar(515)", |
|||
maxLength: 515, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(512)", |
|||
oldMaxLength: 512, |
|||
oldNullable: true); |
|||
} |
|||
} |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Volo.CmsKit.Admin.Pages |
|||
{ |
|||
public class CheckUrlInputDto |
|||
{ |
|||
[Required] |
|||
public string Url { get; set; } |
|||
} |
|||
} |
|||
@ -1,15 +1,21 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Validation; |
|||
using Volo.CmsKit.Contents; |
|||
using Volo.CmsKit.Pages; |
|||
|
|||
namespace Volo.CmsKit.Admin.Pages |
|||
{ |
|||
public class CreatePageInputDto |
|||
{ |
|||
[Required] |
|||
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxTitleLength))] |
|||
public string Title { get; set; } |
|||
|
|||
[Required] |
|||
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] |
|||
public string Url { get; set; } |
|||
|
|||
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] |
|||
public string Description { get; set; } |
|||
} |
|||
} |
|||
@ -1,18 +0,0 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Volo.CmsKit.Admin.Pages |
|||
{ |
|||
public class CreatePageWithContentInputDto |
|||
{ |
|||
[Required] |
|||
public string Title { get; set; } |
|||
|
|||
[Required] |
|||
public string Url { get; set; } |
|||
|
|||
public string Description { get; set; } |
|||
|
|||
[Required] |
|||
public string Content { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace Volo.CmsKit.Admin.Pages |
|||
{ |
|||
public class GetPagesInputDto : PagedAndSortedResultRequestDto |
|||
{ |
|||
public string Filter { get; set; } |
|||
} |
|||
} |
|||
@ -1,22 +1,11 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Services; |
|||
using Volo.Abp.Content; |
|||
|
|||
namespace Volo.CmsKit.Admin.Pages |
|||
{ |
|||
public interface IPageAdminAppService |
|||
public interface IPageAdminAppService : ICrudAppService<PageDto, PageDto, Guid, GetPagesInputDto, CreatePageInputDto, UpdatePageInputDto> |
|||
{ |
|||
Task<PageDto> GetAsync(Guid id); |
|||
|
|||
Task<PageDto> CreatePageAsync(CreatePageInputDto input); |
|||
|
|||
Task<PageDto> CreatePageWithContentAsync(CreatePageWithContentInputDto input); |
|||
|
|||
Task<PageDto> UpdatePageAsync(Guid id, UpdatePageInputDto input); |
|||
|
|||
Task<bool> DoesUrlExistAsync(CheckUrlInputDto input); |
|||
|
|||
Task UpdatePageContentAsync(Guid id, UpdatePageContentInputDto input); |
|||
|
|||
Task DeleteAsync(Guid id); |
|||
} |
|||
} |
|||
@ -1,17 +0,0 @@ |
|||
using System; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.CmsKit.Admin.Contents; |
|||
|
|||
namespace Volo.CmsKit.Admin.Pages |
|||
{ |
|||
public class PageWithContentDto : EntityDto<Guid> |
|||
{ |
|||
public string Title { get; set; } |
|||
|
|||
public string Url { get; set; } |
|||
|
|||
public string Description { get; set; } |
|||
|
|||
public ContentDto Content { get; set; } |
|||
} |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Volo.CmsKit.Admin.Pages |
|||
{ |
|||
public class UpdatePageContentInputDto |
|||
{ |
|||
[Required] |
|||
public string Content { get; set; } |
|||
} |
|||
} |
|||
@ -1,15 +1,21 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Volo.Abp.Validation; |
|||
using Volo.CmsKit.Contents; |
|||
using Volo.CmsKit.Pages; |
|||
|
|||
namespace Volo.CmsKit.Admin.Pages |
|||
{ |
|||
public class UpdatePageInputDto |
|||
{ |
|||
[Required] |
|||
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxTitleLength))] |
|||
public string Title { get; set; } |
|||
|
|||
[Required] |
|||
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] |
|||
public string Url { get; set; } |
|||
|
|||
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] |
|||
public string Description { get; set; } |
|||
} |
|||
} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue