Generator Changes at 11/20/2025 6:27:21 PM +03:30

This commit is contained in:
masoodafar-web
2025-11-20 18:32:51 +03:30
parent b0a760d063
commit 69ab91fb2b
22 changed files with 69 additions and 81 deletions

View File

@@ -2,8 +2,8 @@ namespace CMSMicroservice.Application.PruductCategoryCQ.Commands.CreateNewPruduc
public record CreateNewPruductCategoryCommand : IRequest<CreateNewPruductCategoryResponseDto>
{
//شناسه محصول
public string ProductId { get; init; }
public long ProductId { get; init; }
//شناسه دسته بندی
public string CategoryId { get; init; }
public long CategoryId { get; init; }
}

View File

@@ -4,9 +4,9 @@ public class CreateNewPruductCategoryCommandValidator : AbstractValidator<Create
public CreateNewPruductCategoryCommandValidator()
{
RuleFor(model => model.ProductId)
.NotEmpty();
.NotNull();
RuleFor(model => model.CategoryId)
.NotEmpty();
.NotNull();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{

View File

@@ -4,8 +4,8 @@ public record UpdatePruductCategoryCommand : IRequest<Unit>
//شناسه
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; }
}

View File

@@ -6,9 +6,9 @@ public class UpdatePruductCategoryCommandValidator : AbstractValidator<UpdatePru
RuleFor(model => model.Id)
.NotNull();
RuleFor(model => model.ProductId)
.NotEmpty();
.NotNull();
RuleFor(model => model.CategoryId)
.NotEmpty();
.NotNull();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{

View File

@@ -13,7 +13,7 @@ public record GetAllPruductCategoryByFilterQuery : IRequest<GetAllPruductCategor
//شناسه
public long? Id { get; set; }
//شناسه محصول
public string? ProductId { get; set; }
public long? ProductId { get; set; }
//شناسه دسته بندی
public string? CategoryId { get; set; }
public long? CategoryId { get; set; }
}

View File

@@ -11,7 +11,7 @@ public class GetAllPruductCategoryByFilterResponseDto
//شناسه
public long Id { get; set; }
//شناسه محصول
public string ProductId { get; set; }
public long ProductId { get; set; }
//شناسه دسته بندی
public string CategoryId { get; set; }
public long CategoryId { get; set; }
}

View File

@@ -4,8 +4,8 @@ public class GetPruductCategoryResponseDto
//شناسه
public long Id { get; set; }
//شناسه محصول
public string ProductId { get; set; }
public long ProductId { get; set; }
//شناسه دسته بندی
public string CategoryId { get; set; }
public long CategoryId { get; set; }
}

View File

@@ -2,9 +2,8 @@ namespace CMSMicroservice.Application.PruductTagCQ.Commands.CreateNewPruductTag;
public record CreateNewPruductTagCommand : IRequest<CreateNewPruductTagResponseDto>
{
//شناسه محصول
public string ProductId { get; init; }
public long ProductId { get; init; }
//شناسه تگ
public string TagId { get; init; }
}
public long TagId { get; init; }
}

View File

@@ -4,9 +4,9 @@ public class CreateNewPruductTagCommandValidator : AbstractValidator<CreateNewPr
public CreateNewPruductTagCommandValidator()
{
RuleFor(model => model.ProductId)
.NotEmpty();
.NotNull();
RuleFor(model => model.TagId)
.NotEmpty();
.NotNull();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{
@@ -16,4 +16,3 @@ public class CreateNewPruductTagCommandValidator : AbstractValidator<CreateNewPr
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -4,9 +4,8 @@ public record UpdatePruductTagCommand : IRequest<Unit>
//شناسه
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; }
}

View File

@@ -6,9 +6,9 @@ public class UpdatePruductTagCommandValidator : AbstractValidator<UpdatePruductT
RuleFor(model => model.Id)
.NotNull();
RuleFor(model => model.ProductId)
.NotEmpty();
.NotNull();
RuleFor(model => model.TagId)
.NotEmpty();
.NotNull();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{
@@ -18,4 +18,3 @@ public class UpdatePruductTagCommandValidator : AbstractValidator<UpdatePruductT
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -8,14 +8,12 @@ public record GetAllPruductTagByFilterQuery : IRequest<GetAllPruductTagByFilterR
//فیلتر
public GetAllPruductTagByFilterFilter? Filter { get; init; }
}
public class GetAllPruductTagByFilterFilter
}public class GetAllPruductTagByFilterFilter
{
//شناسه
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; }
}

View File

@@ -6,14 +6,12 @@ public class GetAllPruductTagByFilterResponseDto
//مدل خروجی
public List<GetAllPruductTagByFilterResponseModel>? 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; }
}

View File

@@ -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; }
}

View File

@@ -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; }
}

View File

@@ -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; }
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -7,9 +7,9 @@ public class CreateNewPruductCategoryRequestValidator : AbstractValidator<Create
public CreateNewPruductCategoryRequestValidator()
{
RuleFor(model => model.ProductId)
.NotEmpty();
.NotNull();
RuleFor(model => model.CategoryId)
.NotEmpty();
.NotNull();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{

View File

@@ -9,9 +9,9 @@ public class UpdatePruductCategoryRequestValidator : AbstractValidator<UpdatePru
RuleFor(model => model.Id)
.NotNull();
RuleFor(model => model.ProductId)
.NotEmpty();
.NotNull();
RuleFor(model => model.CategoryId)
.NotEmpty();
.NotNull();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{

View File

@@ -7,9 +7,9 @@ public class CreateNewPruductTagRequestValidator : AbstractValidator<CreateNewPr
public CreateNewPruductTagRequestValidator()
{
RuleFor(model => model.ProductId)
.NotEmpty();
.NotNull();
RuleFor(model => model.TagId)
.NotEmpty();
.NotNull();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{
@@ -19,4 +19,3 @@ public class CreateNewPruductTagRequestValidator : AbstractValidator<CreateNewPr
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -9,9 +9,9 @@ public class UpdatePruductTagRequestValidator : AbstractValidator<UpdatePruductT
RuleFor(model => model.Id)
.NotNull();
RuleFor(model => model.ProductId)
.NotEmpty();
.NotNull();
RuleFor(model => model.TagId)
.NotEmpty();
.NotNull();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{
@@ -21,4 +21,3 @@ public class UpdatePruductTagRequestValidator : AbstractValidator<UpdatePruductT
return result.Errors.Select(e => e.ErrorMessage);
};
}