From 69ab91fb2be2eef6dd6d6fca8b08ccffda57cc3f Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Thu, 20 Nov 2025 18:32:51 +0330 Subject: [PATCH] =?UTF-8?q?Generator=20Changes=20at=2011/20/2025=206:27:21?= =?UTF-8?q?=E2=80=AFPM=20+03:30?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CreateNewPruductCategoryCommand.cs | 4 ++-- ...reateNewPruductCategoryCommandValidator.cs | 4 ++-- .../UpdatePruductCategoryCommand.cs | 4 ++-- .../UpdatePruductCategoryCommandValidator.cs | 4 ++-- .../GetAllPruductCategoryByFilterQuery.cs | 4 ++-- ...etAllPruductCategoryByFilterResponseDto.cs | 4 ++-- .../GetPruductCategoryResponseDto.cs | 4 ++-- .../CreateNewPruductTagCommand.cs | 7 +++---- .../CreateNewPruductTagCommandValidator.cs | 5 ++--- .../UpdatePruductTagCommand.cs | 7 +++---- .../UpdatePruductTagCommandValidator.cs | 5 ++--- .../GetAllPruductTagByFilterQuery.cs | 8 +++---- .../GetAllPruductTagByFilterResponseDto.cs | 8 +++---- .../GetPruductTag/GetPruductTagResponseDto.cs | 6 +++--- .../Entities/PruductCategory.cs | 4 ++-- .../Entities/PruductTag.cs | 13 ++++++------ .../Protos/pruductcategory.proto | 20 +++++++++--------- .../Protos/pruducttag.proto | 21 +++++++++---------- ...reateNewPruductCategoryRequestValidator.cs | 4 ++-- .../UpdatePruductCategoryRequestValidator.cs | 4 ++-- .../CreateNewPruductTagRequestValidator.cs | 5 ++--- .../UpdatePruductTagRequestValidator.cs | 5 ++--- 22 files changed, 69 insertions(+), 81 deletions(-) diff --git a/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/CreateNewPruductCategory/CreateNewPruductCategoryCommand.cs b/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/CreateNewPruductCategory/CreateNewPruductCategoryCommand.cs index 968944b..30f9c8b 100644 --- a/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/CreateNewPruductCategory/CreateNewPruductCategoryCommand.cs +++ b/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/CreateNewPruductCategory/CreateNewPruductCategoryCommand.cs @@ -2,8 +2,8 @@ namespace CMSMicroservice.Application.PruductCategoryCQ.Commands.CreateNewPruduc public record CreateNewPruductCategoryCommand : IRequest { //شناسه محصول - public string ProductId { get; init; } + public long ProductId { get; init; } //شناسه دسته بندی - public string CategoryId { get; init; } + public long CategoryId { get; init; } } \ No newline at end of file diff --git a/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/CreateNewPruductCategory/CreateNewPruductCategoryCommandValidator.cs b/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/CreateNewPruductCategory/CreateNewPruductCategoryCommandValidator.cs index ed3950e..89f82bc 100644 --- a/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/CreateNewPruductCategory/CreateNewPruductCategoryCommandValidator.cs +++ b/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/CreateNewPruductCategory/CreateNewPruductCategoryCommandValidator.cs @@ -4,9 +4,9 @@ public class CreateNewPruductCategoryCommandValidator : AbstractValidator model.ProductId) - .NotEmpty(); + .NotNull(); RuleFor(model => model.CategoryId) - .NotEmpty(); + .NotNull(); } public Func>> ValidateValue => async (model, propertyName) => { diff --git a/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/UpdatePruductCategory/UpdatePruductCategoryCommand.cs b/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/UpdatePruductCategory/UpdatePruductCategoryCommand.cs index 275f891..7969e6c 100644 --- a/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/UpdatePruductCategory/UpdatePruductCategoryCommand.cs +++ b/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/UpdatePruductCategory/UpdatePruductCategoryCommand.cs @@ -4,8 +4,8 @@ public record UpdatePruductCategoryCommand : IRequest //شناسه public long Id { get; init; } //شناسه محصول - public string ProductId { get; init; } + public long ProductId { get; init; } //شناسه دسته بندی - public string CategoryId { get; init; } + public long CategoryId { get; init; } } \ No newline at end of file diff --git a/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/UpdatePruductCategory/UpdatePruductCategoryCommandValidator.cs b/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/UpdatePruductCategory/UpdatePruductCategoryCommandValidator.cs index 455e3ed..6d7b2a8 100644 --- a/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/UpdatePruductCategory/UpdatePruductCategoryCommandValidator.cs +++ b/src/CMSMicroservice.Application/PruductCategoryCQ/Commands/UpdatePruductCategory/UpdatePruductCategoryCommandValidator.cs @@ -6,9 +6,9 @@ public class UpdatePruductCategoryCommandValidator : AbstractValidator model.Id) .NotNull(); RuleFor(model => model.ProductId) - .NotEmpty(); + .NotNull(); RuleFor(model => model.CategoryId) - .NotEmpty(); + .NotNull(); } public Func>> ValidateValue => async (model, propertyName) => { diff --git a/src/CMSMicroservice.Application/PruductCategoryCQ/Queries/GetAllPruductCategoryByFilter/GetAllPruductCategoryByFilterQuery.cs b/src/CMSMicroservice.Application/PruductCategoryCQ/Queries/GetAllPruductCategoryByFilter/GetAllPruductCategoryByFilterQuery.cs index 89ba6f9..f4dd9b0 100644 --- a/src/CMSMicroservice.Application/PruductCategoryCQ/Queries/GetAllPruductCategoryByFilter/GetAllPruductCategoryByFilterQuery.cs +++ b/src/CMSMicroservice.Application/PruductCategoryCQ/Queries/GetAllPruductCategoryByFilter/GetAllPruductCategoryByFilterQuery.cs @@ -13,7 +13,7 @@ public record GetAllPruductCategoryByFilterQuery : IRequest { //شناسه محصول - public string ProductId { get; init; } + public long ProductId { get; init; } //شناسه تگ - public string TagId { get; init; } - -} + public long TagId { get; init; } +} \ No newline at end of file diff --git a/src/CMSMicroservice.Application/PruductTagCQ/Commands/CreateNewPruductTag/CreateNewPruductTagCommandValidator.cs b/src/CMSMicroservice.Application/PruductTagCQ/Commands/CreateNewPruductTag/CreateNewPruductTagCommandValidator.cs index ccd07a3..08f896f 100644 --- a/src/CMSMicroservice.Application/PruductTagCQ/Commands/CreateNewPruductTag/CreateNewPruductTagCommandValidator.cs +++ b/src/CMSMicroservice.Application/PruductTagCQ/Commands/CreateNewPruductTag/CreateNewPruductTagCommandValidator.cs @@ -4,9 +4,9 @@ public class CreateNewPruductTagCommandValidator : AbstractValidator model.ProductId) - .NotEmpty(); + .NotNull(); RuleFor(model => model.TagId) - .NotEmpty(); + .NotNull(); } public Func>> ValidateValue => async (model, propertyName) => { @@ -16,4 +16,3 @@ public class CreateNewPruductTagCommandValidator : AbstractValidator e.ErrorMessage); }; } - diff --git a/src/CMSMicroservice.Application/PruductTagCQ/Commands/UpdatePruductTag/UpdatePruductTagCommand.cs b/src/CMSMicroservice.Application/PruductTagCQ/Commands/UpdatePruductTag/UpdatePruductTagCommand.cs index fdb0bc3..c880f11 100644 --- a/src/CMSMicroservice.Application/PruductTagCQ/Commands/UpdatePruductTag/UpdatePruductTagCommand.cs +++ b/src/CMSMicroservice.Application/PruductTagCQ/Commands/UpdatePruductTag/UpdatePruductTagCommand.cs @@ -4,9 +4,8 @@ public record UpdatePruductTagCommand : IRequest //شناسه public long Id { get; init; } //شناسه محصول - public string ProductId { get; init; } + public long ProductId { get; init; } //شناسه تگ - public string TagId { get; init; } - -} + public long TagId { get; init; } +} \ No newline at end of file diff --git a/src/CMSMicroservice.Application/PruductTagCQ/Commands/UpdatePruductTag/UpdatePruductTagCommandValidator.cs b/src/CMSMicroservice.Application/PruductTagCQ/Commands/UpdatePruductTag/UpdatePruductTagCommandValidator.cs index 2eca3fc..8dc83bb 100644 --- a/src/CMSMicroservice.Application/PruductTagCQ/Commands/UpdatePruductTag/UpdatePruductTagCommandValidator.cs +++ b/src/CMSMicroservice.Application/PruductTagCQ/Commands/UpdatePruductTag/UpdatePruductTagCommandValidator.cs @@ -6,9 +6,9 @@ public class UpdatePruductTagCommandValidator : AbstractValidator model.Id) .NotNull(); RuleFor(model => model.ProductId) - .NotEmpty(); + .NotNull(); RuleFor(model => model.TagId) - .NotEmpty(); + .NotNull(); } public Func>> ValidateValue => async (model, propertyName) => { @@ -18,4 +18,3 @@ public class UpdatePruductTagCommandValidator : AbstractValidator e.ErrorMessage); }; } - diff --git a/src/CMSMicroservice.Application/PruductTagCQ/Queries/GetAllPruductTagByFilter/GetAllPruductTagByFilterQuery.cs b/src/CMSMicroservice.Application/PruductTagCQ/Queries/GetAllPruductTagByFilter/GetAllPruductTagByFilterQuery.cs index d650da0..a13b196 100644 --- a/src/CMSMicroservice.Application/PruductTagCQ/Queries/GetAllPruductTagByFilter/GetAllPruductTagByFilterQuery.cs +++ b/src/CMSMicroservice.Application/PruductTagCQ/Queries/GetAllPruductTagByFilter/GetAllPruductTagByFilterQuery.cs @@ -8,14 +8,12 @@ public record GetAllPruductTagByFilterQuery : IRequest? Models { get; set; } -} -public class GetAllPruductTagByFilterResponseModel +}public class GetAllPruductTagByFilterResponseModel { //شناسه public long Id { get; set; } //شناسه محصول - public string ProductId { get; set; } + public long ProductId { get; set; } //شناسه تگ - public string TagId { get; set; } + public long TagId { get; set; } } - diff --git a/src/CMSMicroservice.Application/PruductTagCQ/Queries/GetPruductTag/GetPruductTagResponseDto.cs b/src/CMSMicroservice.Application/PruductTagCQ/Queries/GetPruductTag/GetPruductTagResponseDto.cs index 77121b8..54beeda 100644 --- a/src/CMSMicroservice.Application/PruductTagCQ/Queries/GetPruductTag/GetPruductTagResponseDto.cs +++ b/src/CMSMicroservice.Application/PruductTagCQ/Queries/GetPruductTag/GetPruductTagResponseDto.cs @@ -4,8 +4,8 @@ public class GetPruductTagResponseDto //شناسه public long Id { get; set; } //شناسه محصول - public string ProductId { get; set; } + public long ProductId { get; set; } //شناسه تگ - public string TagId { get; set; } -} + public long TagId { get; set; } +} \ No newline at end of file diff --git a/src/CMSMicroservice.Domain/Entities/PruductCategory.cs b/src/CMSMicroservice.Domain/Entities/PruductCategory.cs index 2438305..22e8ca5 100644 --- a/src/CMSMicroservice.Domain/Entities/PruductCategory.cs +++ b/src/CMSMicroservice.Domain/Entities/PruductCategory.cs @@ -3,11 +3,11 @@ namespace CMSMicroservice.Domain.Entities; public class PruductCategory : BaseAuditableEntity { //شناسه محصول - public string ProductId { get; set; } + public long ProductId { get; set; } //Product Navigation Property public virtual Products Product { get; set; } //شناسه دسته بندی - public string CategoryId { get; set; } + public long CategoryId { get; set; } //Category Navigation Property public virtual Category Category { get; set; } } diff --git a/src/CMSMicroservice.Domain/Entities/PruductTag.cs b/src/CMSMicroservice.Domain/Entities/PruductTag.cs index 1a52201..429a02b 100644 --- a/src/CMSMicroservice.Domain/Entities/PruductTag.cs +++ b/src/CMSMicroservice.Domain/Entities/PruductTag.cs @@ -2,13 +2,12 @@ namespace CMSMicroservice.Domain.Entities; //برچسب محصول public class PruductTag : BaseAuditableEntity { - //شناسه محصول - public string ProductId { get; set; } - //Product Navigation Property + //شناسه محصول + public long ProductId { get; set; } + //Product Navigation Property public virtual Products Product { get; set; } - //شناسه تگ - public string TagId { get; set; } - //Tag Navigation Property + //شناسه تگ + public long TagId { get; set; } + //Tag Navigation Property public virtual Tag Tag { get; set; } } - diff --git a/src/CMSMicroservice.Protobuf/Protos/pruductcategory.proto b/src/CMSMicroservice.Protobuf/Protos/pruductcategory.proto index 3fbed21..46eecda 100644 --- a/src/CMSMicroservice.Protobuf/Protos/pruductcategory.proto +++ b/src/CMSMicroservice.Protobuf/Protos/pruductcategory.proto @@ -46,8 +46,8 @@ service PruductCategoryContract } message CreateNewPruductCategoryRequest { - string product_id = 1; - string category_id = 2; + int64 product_id = 1; + int64 category_id = 2; } message CreateNewPruductCategoryResponse { @@ -56,8 +56,8 @@ message CreateNewPruductCategoryResponse message UpdatePruductCategoryRequest { int64 id = 1; - string product_id = 2; - string category_id = 3; + int64 product_id = 2; + int64 category_id = 3; } message DeletePruductCategoryRequest { @@ -70,8 +70,8 @@ message GetPruductCategoryRequest message GetPruductCategoryResponse { int64 id = 1; - string product_id = 2; - string category_id = 3; + int64 product_id = 2; + int64 category_id = 3; } message GetAllPruductCategoryByFilterRequest { @@ -82,8 +82,8 @@ message GetAllPruductCategoryByFilterRequest message GetAllPruductCategoryByFilterFilter { google.protobuf.Int64Value id = 1; - google.protobuf.StringValue product_id = 2; - google.protobuf.StringValue category_id = 3; + google.protobuf.Int64Value product_id = 2; + google.protobuf.Int64Value category_id = 3; } message GetAllPruductCategoryByFilterResponse { @@ -93,6 +93,6 @@ message GetAllPruductCategoryByFilterResponse message GetAllPruductCategoryByFilterResponseModel { int64 id = 1; - string product_id = 2; - string category_id = 3; + int64 product_id = 2; + int64 category_id = 3; } diff --git a/src/CMSMicroservice.Protobuf/Protos/pruducttag.proto b/src/CMSMicroservice.Protobuf/Protos/pruducttag.proto index 7961452..acbc92f 100644 --- a/src/CMSMicroservice.Protobuf/Protos/pruducttag.proto +++ b/src/CMSMicroservice.Protobuf/Protos/pruducttag.proto @@ -46,8 +46,8 @@ service PruductTagContract } message CreateNewPruductTagRequest { - string product_id = 1; - string tag_id = 2; + int64 product_id = 1; + int64 tag_id = 2; } message CreateNewPruductTagResponse { @@ -56,8 +56,8 @@ message CreateNewPruductTagResponse message UpdatePruductTagRequest { int64 id = 1; - string product_id = 2; - string tag_id = 3; + int64 product_id = 2; + int64 tag_id = 3; } message DeletePruductTagRequest { @@ -70,8 +70,8 @@ message GetPruductTagRequest message GetPruductTagResponse { int64 id = 1; - string product_id = 2; - string tag_id = 3; + int64 product_id = 2; + int64 tag_id = 3; } message GetAllPruductTagByFilterRequest { @@ -82,8 +82,8 @@ message GetAllPruductTagByFilterRequest message GetAllPruductTagByFilterFilter { google.protobuf.Int64Value id = 1; - google.protobuf.StringValue product_id = 2; - google.protobuf.StringValue tag_id = 3; + google.protobuf.Int64Value product_id = 2; + google.protobuf.Int64Value tag_id = 3; } message GetAllPruductTagByFilterResponse { @@ -93,7 +93,6 @@ message GetAllPruductTagByFilterResponse message GetAllPruductTagByFilterResponseModel { int64 id = 1; - string product_id = 2; - string tag_id = 3; + int64 product_id = 2; + int64 tag_id = 3; } - diff --git a/src/CMSMicroservice.Protobuf/Validator/PruductCategory/CreateNewPruductCategoryRequestValidator.cs b/src/CMSMicroservice.Protobuf/Validator/PruductCategory/CreateNewPruductCategoryRequestValidator.cs index bae94c8..cb0b9a5 100644 --- a/src/CMSMicroservice.Protobuf/Validator/PruductCategory/CreateNewPruductCategoryRequestValidator.cs +++ b/src/CMSMicroservice.Protobuf/Validator/PruductCategory/CreateNewPruductCategoryRequestValidator.cs @@ -7,9 +7,9 @@ public class CreateNewPruductCategoryRequestValidator : AbstractValidator model.ProductId) - .NotEmpty(); + .NotNull(); RuleFor(model => model.CategoryId) - .NotEmpty(); + .NotNull(); } public Func>> ValidateValue => async (model, propertyName) => { diff --git a/src/CMSMicroservice.Protobuf/Validator/PruductCategory/UpdatePruductCategoryRequestValidator.cs b/src/CMSMicroservice.Protobuf/Validator/PruductCategory/UpdatePruductCategoryRequestValidator.cs index 2bf4c71..ea0eef7 100644 --- a/src/CMSMicroservice.Protobuf/Validator/PruductCategory/UpdatePruductCategoryRequestValidator.cs +++ b/src/CMSMicroservice.Protobuf/Validator/PruductCategory/UpdatePruductCategoryRequestValidator.cs @@ -9,9 +9,9 @@ public class UpdatePruductCategoryRequestValidator : AbstractValidator model.Id) .NotNull(); RuleFor(model => model.ProductId) - .NotEmpty(); + .NotNull(); RuleFor(model => model.CategoryId) - .NotEmpty(); + .NotNull(); } public Func>> ValidateValue => async (model, propertyName) => { diff --git a/src/CMSMicroservice.Protobuf/Validator/PruductTag/CreateNewPruductTagRequestValidator.cs b/src/CMSMicroservice.Protobuf/Validator/PruductTag/CreateNewPruductTagRequestValidator.cs index 17b9ff8..ae027e0 100644 --- a/src/CMSMicroservice.Protobuf/Validator/PruductTag/CreateNewPruductTagRequestValidator.cs +++ b/src/CMSMicroservice.Protobuf/Validator/PruductTag/CreateNewPruductTagRequestValidator.cs @@ -7,9 +7,9 @@ public class CreateNewPruductTagRequestValidator : AbstractValidator model.ProductId) - .NotEmpty(); + .NotNull(); RuleFor(model => model.TagId) - .NotEmpty(); + .NotNull(); } public Func>> ValidateValue => async (model, propertyName) => { @@ -19,4 +19,3 @@ public class CreateNewPruductTagRequestValidator : AbstractValidator e.ErrorMessage); }; } - diff --git a/src/CMSMicroservice.Protobuf/Validator/PruductTag/UpdatePruductTagRequestValidator.cs b/src/CMSMicroservice.Protobuf/Validator/PruductTag/UpdatePruductTagRequestValidator.cs index c45defe..1bdb0a3 100644 --- a/src/CMSMicroservice.Protobuf/Validator/PruductTag/UpdatePruductTagRequestValidator.cs +++ b/src/CMSMicroservice.Protobuf/Validator/PruductTag/UpdatePruductTagRequestValidator.cs @@ -9,9 +9,9 @@ public class UpdatePruductTagRequestValidator : AbstractValidator model.Id) .NotNull(); RuleFor(model => model.ProductId) - .NotEmpty(); + .NotNull(); RuleFor(model => model.TagId) - .NotEmpty(); + .NotNull(); } public Func>> ValidateValue => async (model, propertyName) => { @@ -21,4 +21,3 @@ public class UpdatePruductTagRequestValidator : AbstractValidator e.ErrorMessage); }; } -