Merge pull request #7841 from abpframework/cotur/cms-kit/general

Added serializable attribute to all cms-kit dtos and fix namespaces
pull/7847/head
Enis Necipoglu 5 years ago committed by GitHub
commit eb1ef5e6e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,6 +6,7 @@ using Volo.CmsKit.Blogs;
namespace Volo.CmsKit.Admin.Blogs
{
[Serializable]
public class BlogDto : EntityDto<Guid>
{
[Required]

@ -1,11 +1,14 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
namespace Volo.CmsKit.Admin.Blogs
{
[Serializable]
public class BlogFeatureInputDto
{
[Required]
public string FeatureName { get; set; }
public bool IsEnabled { get; set; }
}
}

@ -1,7 +1,9 @@
using Volo.Abp.Application.Dtos;
using System;
using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Admin.Blogs
{
[Serializable]
public class BlogGetListInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }

@ -3,6 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Admin.Blogs
{
[Serializable]
public class BlogPostDto : EntityDto<Guid>
{
public Guid BlogId { get; set; }

@ -5,6 +5,7 @@ using Volo.CmsKit.Blogs;
namespace Volo.CmsKit.Admin.Blogs
{
[Serializable]
public class CreateBlogPostDto
{
[Required]
@ -15,10 +16,7 @@ namespace Volo.CmsKit.Admin.Blogs
public string Title { get; set; }
[Required]
[DynamicStringLength(
typeof(BlogPostConsts),
nameof(BlogPostConsts.MaxSlugLength),
nameof(BlogPostConsts.MinSlugLength))]
[DynamicStringLength(typeof(BlogPostConsts), nameof(BlogPostConsts.MaxSlugLength), nameof(BlogPostConsts.MinSlugLength))]
public string Slug { get; set; }
[DynamicMaxLength(typeof(BlogPostConsts), nameof(BlogPostConsts.MaxShortDescriptionLength))]

@ -1,9 +1,11 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
using Volo.CmsKit.Blogs;
namespace Volo.CmsKit.Admin.Blogs
{
[Serializable]
public class UpdateBlogPostDto
{
[Required]
@ -11,10 +13,7 @@ namespace Volo.CmsKit.Admin.Blogs
public string Title { get; set; }
[Required]
[DynamicStringLength(
typeof(BlogPostConsts),
nameof(BlogPostConsts.MaxSlugLength),
nameof(BlogPostConsts.MinSlugLength))]
[DynamicStringLength(typeof(BlogPostConsts), nameof(BlogPostConsts.MaxSlugLength), nameof(BlogPostConsts.MinSlugLength))]
public string Slug { get; set; }
[DynamicMaxLength(typeof(BlogPostConsts), nameof(BlogPostConsts.MaxShortDescriptionLength))]

@ -2,6 +2,7 @@
namespace Volo.CmsKit.Admin.Comments
{
[Serializable]
public class CmsUserDto
{
public Guid Id { get; set; }

@ -2,6 +2,7 @@
namespace Volo.CmsKit.Admin.Comments
{
[Serializable]
public class CommentDto
{
public Guid Id { get; set; }

@ -3,6 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Admin.Comments
{
[Serializable]
public class CommentGetListInput : PagedAndSortedResultRequestDto
{
public string EntityType { get; set; }

@ -4,6 +4,7 @@ using Volo.CmsKit.Users;
namespace Volo.CmsKit.Admin.Comments
{
[Serializable]
public class CommentWithAuthorDto
{
public Guid Id { get; set; }

@ -1,9 +1,11 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
using Volo.CmsKit.Contents;
namespace Volo.CmsKit.Admin.Contents
{
[Serializable]
public class ContentCreateDto
{
[Required]

@ -3,6 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Admin.Contents
{
[Serializable]
public class ContentDto : EntityDto<Guid>
{
public string EntityType { get; set; }

@ -3,6 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Admin.Contents
{
[Serializable]
public class ContentGetListDto : EntityDto<Guid>
{
public string EntityType { get; set; }

@ -1,7 +1,9 @@
using Volo.Abp.Application.Dtos;
using System;
using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Admin.Contents
{
[Serializable]
public class ContentGetListInput : PagedAndSortedResultRequestDto
{
}

@ -1,9 +1,11 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
using Volo.CmsKit.Contents;
namespace Volo.CmsKit.Admin.Contents
{
[Serializable]
public class ContentUpdateDto
{
[Required]

@ -3,6 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Admin.MediaDescriptors
{
[Serializable]
public class MediaDescriptorDto : EntityDto<Guid>
{
public string Name { get; set; }

@ -1,10 +1,12 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
using Volo.CmsKit.Contents;
using Volo.CmsKit.Pages;
namespace Volo.CmsKit.Admin.Pages
{
[Serializable]
public class CreatePageInputDto
{
[Required]

@ -1,7 +1,9 @@
using Volo.Abp.Application.Dtos;
using System;
using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Admin.Pages
{
[Serializable]
public class GetPagesInputDto : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }

@ -3,6 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Admin.Pages
{
[Serializable]
public class PageDto : AuditedEntityDto<Guid>
{
public string Title { get; set; }

@ -1,10 +1,12 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
using Volo.CmsKit.Contents;
using Volo.CmsKit.Pages;
namespace Volo.CmsKit.Admin.Pages
{
[Serializable]
public class UpdatePageInputDto
{
[Required]

@ -1,7 +1,9 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
namespace Volo.CmsKit.Admin.Tags
{
[Serializable]
public class EntityTagCreateDto
{
[Required]

@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
namespace Volo.CmsKit.Admin.Tags
{
[Serializable]
public class EntityTagRemoveDto
{
[Required]

@ -6,6 +6,7 @@ using System.Threading.Tasks;
namespace Volo.CmsKit.Admin.Tags
{
[Serializable]
public class EntityTagSetDto
{
public string EntityId { get; set; }

@ -1,9 +1,11 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Admin.Tags
{
[Serializable]
public class TagCreateDto
{
[Required]

@ -1,16 +1,10 @@
namespace Volo.CmsKit.Admin.Tags
using System;
namespace Volo.CmsKit.Admin.Tags
{
[Serializable]
public class TagDefinitionDto
{
public TagDefinitionDto()
{
}
public TagDefinitionDto(string entityType, string displayName)
{
EntityType = entityType;
DisplayName = displayName;
}
public string EntityType { get; set; }
public string DisplayName { get; set; }

@ -1,7 +1,9 @@
using Volo.Abp.Application.Dtos;
using System;
using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Admin.Tags
{
[Serializable]
public class TagGetListInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }

@ -1,9 +1,11 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Admin.Tags
{
[Serializable]
public class TagUpdateDto
{
[Required]

@ -78,9 +78,11 @@ namespace Volo.CmsKit.Admin.Tags
return definitions
.Select(s =>
new TagDefinitionDto(
s.EntityType,
s.DisplayName?.Localize(StringLocalizerFactory) ?? s.EntityType))
new TagDefinitionDto
{
EntityType = s.EntityType,
DisplayName = s.DisplayName?.Localize(StringLocalizerFactory) ?? s.EntityType
})
.ToList();
}
}

@ -3,6 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Blogs
{
[Serializable]
public class BlogFeatureDto : EntityDto<Guid>
{
public string FeatureName { get; set; }

@ -3,6 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Tags
{
[Serializable]
public class TagDto : EntityDto<Guid>
{
public string EntityType { get; set; }

@ -7,6 +7,7 @@ using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Users
{
[Serializable]
public class CmsUserDto : EntityDto<Guid>
{
public virtual Guid? TenantId { get; protected set; }

@ -1,4 +1,4 @@
namespace Volo.CmsKit
namespace Volo.CmsKit.Web
{
public class CmsKitUiCommentOptions
{

@ -1,8 +1,6 @@
using JetBrains.Annotations;
using Volo.Abp;
using Volo.Abp.Localization;
namespace Volo.CmsKit.Domain.Volo.CmsKit
namespace Volo.CmsKit
{
public abstract class PolicySpecifiedDefinition
{

@ -2,7 +2,6 @@
using System;
using Volo.Abp;
using Volo.Abp.Localization;
using Volo.CmsKit.Domain.Volo.CmsKit;
namespace Volo.CmsKit.Tags
{

@ -3,7 +3,8 @@ using Volo.Abp.Application.Dtos;
using Volo.CmsKit.Users;
namespace Volo.CmsKit.Public.Blogs
{
{
[Serializable]
public class BlogPostPublicDto : AuditedEntityWithUserDto<Guid, CmsUserDto>
{
public Guid BlogId { get; set; }

@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Volo.CmsKit.Public.Blogs
{
[Serializable]
public class GetBlogFeatureInput
{
public List<string> FeatureNames { get; set; }

@ -2,6 +2,7 @@
namespace Volo.CmsKit.Public.Comments
{
[Serializable]
public class CmsUserDto
{
public Guid Id { get; set; }

@ -2,6 +2,7 @@
namespace Volo.CmsKit.Public.Comments
{
[Serializable]
public class CommentDto
{
public Guid Id { get; set; }

@ -3,6 +3,7 @@ using System.Collections.Generic;
namespace Volo.CmsKit.Public.Comments
{
[Serializable]
public class CommentWithDetailsDto
{
public Guid Id { get; set; }

@ -5,6 +5,7 @@ using Volo.CmsKit.Comments;
namespace Volo.CmsKit.Public.Comments
{
[Serializable]
public class CreateCommentInput
{
[Required]

@ -1,9 +1,11 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
using Volo.CmsKit.Comments;
namespace Volo.CmsKit.Public.Comments
{
[Serializable]
public class UpdateCommentInput
{
[Required]

@ -1,8 +1,9 @@
using System;
using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Contents
namespace Volo.CmsKit.Public.Contents
{
[Serializable]
public class ContentDto : EntityDto<Guid>
{
public string Value { get; set; }

@ -1,8 +1,12 @@
namespace Volo.CmsKit.Public.Contents
using System;
namespace Volo.CmsKit.Public.Contents
{
[Serializable]
public class GetContentInput
{
public string EntityType { get; set; }
public string EntityId { get; set; }
}
}

@ -3,6 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace Volo.CmsKit.Public.Pages
{
[Serializable]
public class PageDto : EntityDto<Guid>
{
public string Title { get; set; }

@ -1,9 +1,11 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Validation;
using Volo.CmsKit.Ratings;
namespace Volo.CmsKit.Public.Ratings
{
[Serializable]
public class CreateUpdateRatingInput
{
[Required]

@ -2,6 +2,7 @@
namespace Volo.CmsKit.Public.Ratings
{
[Serializable]
public class RatingDto
{
public Guid Id { get; set; }

@ -1,5 +1,8 @@
namespace Volo.CmsKit.Public.Ratings
using System;
namespace Volo.CmsKit.Public.Ratings
{
[Serializable]
public class RatingWithStarCountDto
{
public short StarCount { get; set; }

@ -1,7 +1,9 @@
using JetBrains.Annotations;
using System;
using JetBrains.Annotations;
namespace Volo.CmsKit.Public.Reactions
{
[Serializable]
public class ReactionDto
{
[NotNull]

@ -8,7 +8,6 @@ using Volo.Abp.Data;
using Volo.Abp.GlobalFeatures;
using Volo.Abp.Modularity;
using Volo.Abp.Threading;
using Volo.FileManagement;
namespace Volo.CmsKit
{

@ -2,7 +2,7 @@
using System.Threading.Tasks;
using Volo.Abp.BlobStoring;
namespace Volo.FileManagement
namespace Volo.CmsKit
{
public class FakeBlobProvider : IBlobProvider
{

Loading…
Cancel
Save