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