Browse Source

refactoring

pull/16476/head
Onur Pıçakcı 3 years ago
parent
commit
d63154af52
  1. 2352
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20230504103522_Change_CommentUrl_Name.Designer.cs
  2. 28
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20230504103522_Change_CommentUrl_Name.cs
  3. 10
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20230504122708_Initial.Designer.cs
  4. 2
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20230504122708_Initial.cs
  5. 4
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/CommentManager.cs
  6. 2
      modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Comments/CreateCommentInput.cs
  7. 2
      modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Comments/CreateCommentWithParametersInput.cs
  8. 2
      modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs

2352
modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20230504103522_Change_CommentUrl_Name.Designer.cs

File diff suppressed because it is too large

28
modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20230504103522_Change_CommentUrl_Name.cs

@ -1,28 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Volo.CmsKit.Migrations
{
/// <inheritdoc />
public partial class ChangeCommentUrlName : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "CommentUrl",
table: "CmsComments",
newName: "Url");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Url",
table: "CmsComments",
newName: "CommentUrl");
}
}
}

10
modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20230503070601_Initial.Designer.cs → modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20230504122708_Initial.Designer.cs

@ -13,7 +13,7 @@ using Volo.CmsKit.EntityFrameworkCore;
namespace Volo.CmsKit.Migrations namespace Volo.CmsKit.Migrations
{ {
[DbContext(typeof(UnifiedDbContext))] [DbContext(typeof(UnifiedDbContext))]
[Migration("20230503070601_Initial")] [Migration("20230504122708_Initial")]
partial class Initial partial class Initial
{ {
/// <inheritdoc /> /// <inheritdoc />
@ -1590,10 +1590,6 @@ namespace Volo.CmsKit.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<string>("CommentUrl")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)");
b.Property<string>("ConcurrencyStamp") b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken() .IsConcurrencyToken()
.HasMaxLength(40) .HasMaxLength(40)
@ -1634,6 +1630,10 @@ namespace Volo.CmsKit.Migrations
.HasMaxLength(512) .HasMaxLength(512)
.HasColumnType("nvarchar(512)"); .HasColumnType("nvarchar(512)");
b.Property<string>("Url")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)");
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("TenantId", "RepliedCommentId"); b.HasIndex("TenantId", "RepliedCommentId");

2
modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20230503070601_Initial.cs → modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20230504122708_Initial.cs

@ -422,7 +422,7 @@ namespace Volo.CmsKit.Migrations
RepliedCommentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), RepliedCommentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CommentUrl = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), Url = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
}, },

4
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/CommentManager.cs

@ -21,7 +21,7 @@ public class CommentManager : DomainService
[NotNull] string entityType, [NotNull] string entityType,
[NotNull] string entityId, [NotNull] string entityId,
[NotNull] string text, [NotNull] string text,
[CanBeNull] string commentUrl = null, [CanBeNull] string url = null,
[CanBeNull] Guid? repliedCommentId = null) [CanBeNull] Guid? repliedCommentId = null)
{ {
Check.NotNull(creator, nameof(creator)); Check.NotNull(creator, nameof(creator));
@ -41,7 +41,7 @@ public class CommentManager : DomainService
text, text,
repliedCommentId, repliedCommentId,
creator.Id, creator.Id,
commentUrl, url,
CurrentTenant.Id); CurrentTenant.Id);
} }
} }

2
modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Comments/CreateCommentInput.cs

@ -18,5 +18,5 @@ public class CreateCommentInput
public int CaptchaAnswer { get; set; } public int CaptchaAnswer { get; set; }
public string CommentUrl { get; set; } public string Url { get; set; }
} }

2
modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Comments/CreateCommentWithParametersInput.cs

@ -24,5 +24,5 @@ public class CreateCommentWithParametersInput
public int CaptchaAnswer { get; set; } public int CaptchaAnswer { get; set; }
public string CommentUrl { get; set; } public string Url { get; set; }
} }

2
modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs

@ -77,7 +77,7 @@ public class CommentPublicAppService : CmsKitPublicAppServiceBase, ICommentPubli
entityType, entityType,
entityId, entityId,
input.Text, input.Text,
input.CommentUrl, input.Url,
input.RepliedCommentId input.RepliedCommentId
) )
); );

Loading…
Cancel
Save