mirror of https://github.com/abpframework/abp.git
249 changed files with 7055 additions and 2744 deletions
@ -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", |
"culture": "nl", |
||||
"texts": { |
"texts": { |
||||
"DisplayName:Abp.Mailing.DefaultFromAddress": "Standard vanaf adres", |
"DisplayName:Abp.Mailing.DefaultFromAddress": "Standaard vanaf adres", |
||||
"DisplayName:Abp.Mailing.DefaultFromDisplayName": "Standaard vanaf weergave naam", |
"DisplayName:Abp.Mailing.DefaultFromDisplayName": "Standaard vanaf weergavenaam", |
||||
"DisplayName:Abp.Mailing.Smtp.Host": "Host", |
"DisplayName:Abp.Mailing.Smtp.Host": "Host", |
||||
"DisplayName:Abp.Mailing.Smtp.Port": "Poort", |
"DisplayName:Abp.Mailing.Smtp.Port": "Poort", |
||||
"DisplayName:Abp.Mailing.Smtp.UserName": "Gebruiker naam", |
"DisplayName:Abp.Mailing.Smtp.UserName": "Gebruikersnaam", |
||||
"DisplayName:Abp.Mailing.Smtp.Password": "wachtwoord", |
"DisplayName:Abp.Mailing.Smtp.Password": "Wachtwoord", |
||||
"DisplayName:Abp.Mailing.Smtp.Domain": "Domein", |
"DisplayName:Abp.Mailing.Smtp.Domain": "Domein", |
||||
"DisplayName:Abp.Mailing.Smtp.EnableSsl": "SSL toestaan", |
"DisplayName:Abp.Mailing.Smtp.EnableSsl": "SSL toestaan", |
||||
"DisplayName:Abp.Mailing.Smtp.UseDefaultCredentials": "Gebruik standaard inloggegevens", |
"DisplayName:Abp.Mailing.Smtp.UseDefaultCredentials": "Gebruik standaard inloggegevens", |
||||
"Description:Abp.Mailing.DefaultFromAddress": "Standard vanaf adres", |
"Description:Abp.Mailing.DefaultFromAddress": "Standaard vanaf adres", |
||||
"Description:Abp.Mailing.DefaultFromDisplayName": "Standaard vanaf weergave naam", |
"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.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.Port": "De poort die wordt gebruikt voor SMTP-transacties.", |
||||
"Description:Abp.Mailing.Smtp.UserName": "Gebruikersnaam gekoppeld aan de inloggegevens.", |
"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.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.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.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 System.ComponentModel.DataAnnotations; |
||||
|
using Volo.Abp.Validation; |
||||
|
using Volo.CmsKit.Contents; |
||||
|
using Volo.CmsKit.Pages; |
||||
|
|
||||
namespace Volo.CmsKit.Admin.Pages |
namespace Volo.CmsKit.Admin.Pages |
||||
{ |
{ |
||||
public class CreatePageInputDto |
public class CreatePageInputDto |
||||
{ |
{ |
||||
[Required] |
[Required] |
||||
|
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxTitleLength))] |
||||
public string Title { get; set; } |
public string Title { get; set; } |
||||
|
|
||||
[Required] |
[Required] |
||||
|
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] |
||||
public string Url { get; set; } |
public string Url { get; set; } |
||||
|
|
||||
|
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] |
||||
public string Description { get; set; } |
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; |
||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
using Volo.Abp.Content; |
||||
|
|
||||
namespace Volo.CmsKit.Admin.Pages |
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 System.ComponentModel.DataAnnotations; |
||||
|
using Volo.Abp.Validation; |
||||
|
using Volo.CmsKit.Contents; |
||||
|
using Volo.CmsKit.Pages; |
||||
|
|
||||
namespace Volo.CmsKit.Admin.Pages |
namespace Volo.CmsKit.Admin.Pages |
||||
{ |
{ |
||||
public class UpdatePageInputDto |
public class UpdatePageInputDto |
||||
{ |
{ |
||||
[Required] |
[Required] |
||||
|
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxTitleLength))] |
||||
public string Title { get; set; } |
public string Title { get; set; } |
||||
|
|
||||
[Required] |
[Required] |
||||
|
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxUrlLength))] |
||||
public string Url { get; set; } |
public string Url { get; set; } |
||||
|
|
||||
|
[DynamicMaxLength(typeof(PageConsts), nameof(PageConsts.MaxDescriptionLength))] |
||||
public string Description { get; set; } |
public string Description { get; set; } |
||||
} |
} |
||||
} |
} |
||||
@ -1,70 +0,0 @@ |
|||||
using System; |
|
||||
using System.Threading.Tasks; |
|
||||
using Microsoft.AspNetCore.Mvc; |
|
||||
using Volo.Abp; |
|
||||
using Volo.CmsKit.Admin.Pages; |
|
||||
|
|
||||
namespace Volo.CmsKit.Admin.Page |
|
||||
{ |
|
||||
[RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] |
|
||||
[Area("cms-kit")] |
|
||||
[Route("api/cms-kit-admin/pages")] |
|
||||
public class PageAdminController : CmsKitAdminController, IPageAdminAppService |
|
||||
{ |
|
||||
protected readonly IPageAdminAppService PageAdminAppService; |
|
||||
|
|
||||
public PageAdminController(IPageAdminAppService pageAdminAppService) |
|
||||
{ |
|
||||
PageAdminAppService = pageAdminAppService; |
|
||||
} |
|
||||
|
|
||||
[HttpGet] |
|
||||
[Route("{id}")] |
|
||||
public virtual Task<PageDto> GetAsync(Guid id) |
|
||||
{ |
|
||||
return PageAdminAppService.GetAsync(id); |
|
||||
} |
|
||||
|
|
||||
[HttpPost] |
|
||||
[Route("create")] |
|
||||
public virtual Task<PageDto> CreatePageAsync(CreatePageInputDto input) |
|
||||
{ |
|
||||
return PageAdminAppService.CreatePageAsync(input); |
|
||||
} |
|
||||
|
|
||||
[HttpPost] |
|
||||
[Route("create-with-content")] |
|
||||
public virtual Task<PageDto> CreatePageWithContentAsync(CreatePageWithContentInputDto input) |
|
||||
{ |
|
||||
return PageAdminAppService.CreatePageWithContentAsync(input); |
|
||||
} |
|
||||
|
|
||||
[HttpPut] |
|
||||
[Route("{id}")] |
|
||||
public virtual Task<PageDto> UpdatePageAsync(Guid id, UpdatePageInputDto input) |
|
||||
{ |
|
||||
return PageAdminAppService.UpdatePageAsync(id, input); |
|
||||
} |
|
||||
|
|
||||
[HttpPost] |
|
||||
[Route("does-url-exist")] |
|
||||
public virtual Task<bool> DoesUrlExistAsync(CheckUrlInputDto input) |
|
||||
{ |
|
||||
return PageAdminAppService.DoesUrlExistAsync(input); |
|
||||
} |
|
||||
|
|
||||
[HttpPut] |
|
||||
[Route("update-content/{id}")] |
|
||||
public virtual Task UpdatePageContentAsync(Guid id, UpdatePageContentInputDto input) |
|
||||
{ |
|
||||
return PageAdminAppService.UpdatePageContentAsync(id, input); |
|
||||
} |
|
||||
|
|
||||
[HttpDelete] |
|
||||
[Route("{id}")] |
|
||||
public virtual Task DeleteAsync(Guid id) |
|
||||
{ |
|
||||
return PageAdminAppService.DeleteAsync(id); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,63 @@ |
|||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.GlobalFeatures; |
||||
|
using Volo.CmsKit.GlobalFeatures; |
||||
|
using Volo.CmsKit.Permissions; |
||||
|
|
||||
|
namespace Volo.CmsKit.Admin.Pages |
||||
|
{ |
||||
|
[RequiresGlobalFeature(typeof(PagesFeature))] |
||||
|
[RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] |
||||
|
[Area("cms-kit")] |
||||
|
[Authorize(CmsKitAdminPermissions.Pages.Default)] |
||||
|
[Route("api/cms-kit-admin/pages")] |
||||
|
public class PageAdminController : CmsKitAdminController, IPageAdminAppService |
||||
|
{ |
||||
|
protected readonly IPageAdminAppService PageAdminAppService; |
||||
|
|
||||
|
public PageAdminController(IPageAdminAppService pageAdminAppService) |
||||
|
{ |
||||
|
PageAdminAppService = pageAdminAppService; |
||||
|
} |
||||
|
|
||||
|
[HttpGet] |
||||
|
[Route("{id}")] |
||||
|
public virtual Task<PageDto> GetAsync(Guid id) |
||||
|
{ |
||||
|
return PageAdminAppService.GetAsync(id); |
||||
|
} |
||||
|
|
||||
|
[HttpGet] |
||||
|
public virtual Task<PagedResultDto<PageDto>> GetListAsync(GetPagesInputDto input) |
||||
|
{ |
||||
|
return PageAdminAppService.GetListAsync(input); |
||||
|
} |
||||
|
|
||||
|
[HttpPost] |
||||
|
[Authorize(CmsKitAdminPermissions.Pages.Create)] |
||||
|
public virtual Task<PageDto> CreateAsync(CreatePageInputDto input) |
||||
|
{ |
||||
|
return PageAdminAppService.CreateAsync(input); |
||||
|
} |
||||
|
|
||||
|
[HttpPut] |
||||
|
[Authorize(CmsKitAdminPermissions.Pages.Update)] |
||||
|
[Route("{id}")] |
||||
|
public virtual Task<PageDto> UpdateAsync(Guid id, UpdatePageInputDto input) |
||||
|
{ |
||||
|
return PageAdminAppService.UpdateAsync(id, input); |
||||
|
} |
||||
|
|
||||
|
[HttpDelete] |
||||
|
[Authorize(CmsKitAdminPermissions.Pages.Delete)] |
||||
|
[Route("{id}")] |
||||
|
public virtual Task DeleteAsync(Guid id) |
||||
|
{ |
||||
|
return PageAdminAppService.DeleteAsync(id); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
{ |
||||
|
"culture": "nl", |
||||
|
"texts": { |
||||
|
"CmsKit:0002": "Inhoud bestaat al!", |
||||
|
"CommentAuthorizationExceptionMessage": "Die opmerkingen zijn niet toegestaan voor openbare vertoning.", |
||||
|
"Comments": "Opmerkingen", |
||||
|
"Delete": "Verwijderen", |
||||
|
"Edit": "Bewerken", |
||||
|
"LoginToAddComment": "Log in om een opmerking toe te voegen", |
||||
|
"LoginToRate": "Log in om te beoordelen", |
||||
|
"LoginToReply": "Log in om te antwoorden", |
||||
|
"Menu:CMS": "CMS", |
||||
|
"MessageDeletionConfirmationMessage": "Deze opmerking wordt volledig verwijderd.", |
||||
|
"Permission:CmsKit": "CMS-Kit", |
||||
|
"Permission:Contents": "Inhoud beheer", |
||||
|
"Permission:Contents.Create": "Creëer inhoud", |
||||
|
"Permission:Contents.Delete": "Inhoud verwijderen", |
||||
|
"Permission:Contents.Update": "Bewerk inhoud", |
||||
|
"Permission:TagManagement": "Tagbeheer", |
||||
|
"Permission:TagManagement.Create": "Tag Creëer", |
||||
|
"Permission:TagManagement.Delete": "Tag verwijderen", |
||||
|
"Permission:TagManagement.Update": "Tag bewerken", |
||||
|
"PickYourReaction": "Kies uw reactie", |
||||
|
"RatingUndoMessage": "Uw beoordeling wordt ongedaan gemaakt.", |
||||
|
"Reply": "Beantwoorden", |
||||
|
"Send": "verzenden", |
||||
|
"Star": "Star", |
||||
|
"TagDeletionConfirmationMessage": "Weet u zeker dat u de tag '{0}' wilt verwijderen?", |
||||
|
"Tags": "Tags", |
||||
|
"Undo": "Ongedaan maken", |
||||
|
"Update": "Bijwerken", |
||||
|
"YourComment": "Jouw opmerking", |
||||
|
"YourReply": "Uw antwoord" |
||||
|
} |
||||
|
} |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue