Generator Changes at 11/20/2025 6:27:21 PM +03:30
This commit is contained in:
@@ -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; }
|
||||
|
||||
}
|
||||
@@ -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) =>
|
||||
{
|
||||
|
||||
@@ -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; }
|
||||
|
||||
}
|
||||
@@ -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) =>
|
||||
{
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
|
||||
}
|
||||
@@ -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; }
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user