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 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()
|
public CreateNewPruductCategoryCommandValidator()
|
||||||
{
|
{
|
||||||
RuleFor(model => model.ProductId)
|
RuleFor(model => model.ProductId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
RuleFor(model => model.CategoryId)
|
RuleFor(model => model.CategoryId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
}
|
}
|
||||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
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 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)
|
RuleFor(model => model.Id)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.ProductId)
|
RuleFor(model => model.ProductId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
RuleFor(model => model.CategoryId)
|
RuleFor(model => model.CategoryId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
}
|
}
|
||||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
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 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 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 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 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()
|
public CreateNewPruductTagCommandValidator()
|
||||||
{
|
{
|
||||||
RuleFor(model => model.ProductId)
|
RuleFor(model => model.ProductId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
RuleFor(model => model.TagId)
|
RuleFor(model => model.TagId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
}
|
}
|
||||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
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);
|
return result.Errors.Select(e => e.ErrorMessage);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ public record UpdatePruductTagCommand : IRequest<Unit>
|
|||||||
//شناسه
|
//شناسه
|
||||||
public long Id { get; init; }
|
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)
|
RuleFor(model => model.Id)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.ProductId)
|
RuleFor(model => model.ProductId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
RuleFor(model => model.TagId)
|
RuleFor(model => model.TagId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
}
|
}
|
||||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
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);
|
return result.Errors.Select(e => e.ErrorMessage);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,12 @@ public record GetAllPruductTagByFilterQuery : IRequest<GetAllPruductTagByFilterR
|
|||||||
//فیلتر
|
//فیلتر
|
||||||
public GetAllPruductTagByFilterFilter? Filter { get; init; }
|
public GetAllPruductTagByFilterFilter? Filter { get; init; }
|
||||||
|
|
||||||
}
|
}public class GetAllPruductTagByFilterFilter
|
||||||
public class GetAllPruductTagByFilterFilter
|
|
||||||
{
|
{
|
||||||
//شناسه
|
//شناسه
|
||||||
public long? Id { get; set; }
|
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 List<GetAllPruductTagByFilterResponseModel>? Models { get; set; }
|
||||||
|
|
||||||
}
|
}public class GetAllPruductTagByFilterResponseModel
|
||||||
public class GetAllPruductTagByFilterResponseModel
|
|
||||||
{
|
{
|
||||||
//شناسه
|
//شناسه
|
||||||
public long Id { get; set; }
|
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 long Id { get; set; }
|
||||||
//شناسه محصول
|
//شناسه محصول
|
||||||
public string ProductId { get; set; }
|
public long ProductId { get; set; }
|
||||||
//شناسه تگ
|
//شناسه تگ
|
||||||
public string TagId { get; set; }
|
public long TagId { get; set; }
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,11 +3,11 @@ namespace CMSMicroservice.Domain.Entities;
|
|||||||
public class PruductCategory : BaseAuditableEntity
|
public class PruductCategory : BaseAuditableEntity
|
||||||
{
|
{
|
||||||
//شناسه محصول
|
//شناسه محصول
|
||||||
public string ProductId { get; set; }
|
public long ProductId { get; set; }
|
||||||
//Product Navigation Property
|
//Product Navigation Property
|
||||||
public virtual Products Product { get; set; }
|
public virtual Products Product { get; set; }
|
||||||
//شناسه دسته بندی
|
//شناسه دسته بندی
|
||||||
public string CategoryId { get; set; }
|
public long CategoryId { get; set; }
|
||||||
//Category Navigation Property
|
//Category Navigation Property
|
||||||
public virtual Category Category { get; set; }
|
public virtual Category Category { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,13 +2,12 @@ namespace CMSMicroservice.Domain.Entities;
|
|||||||
//برچسب محصول
|
//برچسب محصول
|
||||||
public class PruductTag : BaseAuditableEntity
|
public class PruductTag : BaseAuditableEntity
|
||||||
{
|
{
|
||||||
//شناسه محصول
|
//شناسه محصول
|
||||||
public string ProductId { get; set; }
|
public long ProductId { get; set; }
|
||||||
//Product Navigation Property
|
//Product Navigation Property
|
||||||
public virtual Products Product { get; set; }
|
public virtual Products Product { get; set; }
|
||||||
//شناسه تگ
|
//شناسه تگ
|
||||||
public string TagId { get; set; }
|
public long TagId { get; set; }
|
||||||
//Tag Navigation Property
|
//Tag Navigation Property
|
||||||
public virtual Tag Tag { get; set; }
|
public virtual Tag Tag { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ service PruductCategoryContract
|
|||||||
}
|
}
|
||||||
message CreateNewPruductCategoryRequest
|
message CreateNewPruductCategoryRequest
|
||||||
{
|
{
|
||||||
string product_id = 1;
|
int64 product_id = 1;
|
||||||
string category_id = 2;
|
int64 category_id = 2;
|
||||||
}
|
}
|
||||||
message CreateNewPruductCategoryResponse
|
message CreateNewPruductCategoryResponse
|
||||||
{
|
{
|
||||||
@@ -56,8 +56,8 @@ message CreateNewPruductCategoryResponse
|
|||||||
message UpdatePruductCategoryRequest
|
message UpdatePruductCategoryRequest
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string product_id = 2;
|
int64 product_id = 2;
|
||||||
string category_id = 3;
|
int64 category_id = 3;
|
||||||
}
|
}
|
||||||
message DeletePruductCategoryRequest
|
message DeletePruductCategoryRequest
|
||||||
{
|
{
|
||||||
@@ -70,8 +70,8 @@ message GetPruductCategoryRequest
|
|||||||
message GetPruductCategoryResponse
|
message GetPruductCategoryResponse
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string product_id = 2;
|
int64 product_id = 2;
|
||||||
string category_id = 3;
|
int64 category_id = 3;
|
||||||
}
|
}
|
||||||
message GetAllPruductCategoryByFilterRequest
|
message GetAllPruductCategoryByFilterRequest
|
||||||
{
|
{
|
||||||
@@ -82,8 +82,8 @@ message GetAllPruductCategoryByFilterRequest
|
|||||||
message GetAllPruductCategoryByFilterFilter
|
message GetAllPruductCategoryByFilterFilter
|
||||||
{
|
{
|
||||||
google.protobuf.Int64Value id = 1;
|
google.protobuf.Int64Value id = 1;
|
||||||
google.protobuf.StringValue product_id = 2;
|
google.protobuf.Int64Value product_id = 2;
|
||||||
google.protobuf.StringValue category_id = 3;
|
google.protobuf.Int64Value category_id = 3;
|
||||||
}
|
}
|
||||||
message GetAllPruductCategoryByFilterResponse
|
message GetAllPruductCategoryByFilterResponse
|
||||||
{
|
{
|
||||||
@@ -93,6 +93,6 @@ message GetAllPruductCategoryByFilterResponse
|
|||||||
message GetAllPruductCategoryByFilterResponseModel
|
message GetAllPruductCategoryByFilterResponseModel
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string product_id = 2;
|
int64 product_id = 2;
|
||||||
string category_id = 3;
|
int64 category_id = 3;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ service PruductTagContract
|
|||||||
}
|
}
|
||||||
message CreateNewPruductTagRequest
|
message CreateNewPruductTagRequest
|
||||||
{
|
{
|
||||||
string product_id = 1;
|
int64 product_id = 1;
|
||||||
string tag_id = 2;
|
int64 tag_id = 2;
|
||||||
}
|
}
|
||||||
message CreateNewPruductTagResponse
|
message CreateNewPruductTagResponse
|
||||||
{
|
{
|
||||||
@@ -56,8 +56,8 @@ message CreateNewPruductTagResponse
|
|||||||
message UpdatePruductTagRequest
|
message UpdatePruductTagRequest
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string product_id = 2;
|
int64 product_id = 2;
|
||||||
string tag_id = 3;
|
int64 tag_id = 3;
|
||||||
}
|
}
|
||||||
message DeletePruductTagRequest
|
message DeletePruductTagRequest
|
||||||
{
|
{
|
||||||
@@ -70,8 +70,8 @@ message GetPruductTagRequest
|
|||||||
message GetPruductTagResponse
|
message GetPruductTagResponse
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string product_id = 2;
|
int64 product_id = 2;
|
||||||
string tag_id = 3;
|
int64 tag_id = 3;
|
||||||
}
|
}
|
||||||
message GetAllPruductTagByFilterRequest
|
message GetAllPruductTagByFilterRequest
|
||||||
{
|
{
|
||||||
@@ -82,8 +82,8 @@ message GetAllPruductTagByFilterRequest
|
|||||||
message GetAllPruductTagByFilterFilter
|
message GetAllPruductTagByFilterFilter
|
||||||
{
|
{
|
||||||
google.protobuf.Int64Value id = 1;
|
google.protobuf.Int64Value id = 1;
|
||||||
google.protobuf.StringValue product_id = 2;
|
google.protobuf.Int64Value product_id = 2;
|
||||||
google.protobuf.StringValue tag_id = 3;
|
google.protobuf.Int64Value tag_id = 3;
|
||||||
}
|
}
|
||||||
message GetAllPruductTagByFilterResponse
|
message GetAllPruductTagByFilterResponse
|
||||||
{
|
{
|
||||||
@@ -93,7 +93,6 @@ message GetAllPruductTagByFilterResponse
|
|||||||
message GetAllPruductTagByFilterResponseModel
|
message GetAllPruductTagByFilterResponseModel
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string product_id = 2;
|
int64 product_id = 2;
|
||||||
string tag_id = 3;
|
int64 tag_id = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ public class CreateNewPruductCategoryRequestValidator : AbstractValidator<Create
|
|||||||
public CreateNewPruductCategoryRequestValidator()
|
public CreateNewPruductCategoryRequestValidator()
|
||||||
{
|
{
|
||||||
RuleFor(model => model.ProductId)
|
RuleFor(model => model.ProductId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
RuleFor(model => model.CategoryId)
|
RuleFor(model => model.CategoryId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
}
|
}
|
||||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ public class UpdatePruductCategoryRequestValidator : AbstractValidator<UpdatePru
|
|||||||
RuleFor(model => model.Id)
|
RuleFor(model => model.Id)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.ProductId)
|
RuleFor(model => model.ProductId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
RuleFor(model => model.CategoryId)
|
RuleFor(model => model.CategoryId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
}
|
}
|
||||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ public class CreateNewPruductTagRequestValidator : AbstractValidator<CreateNewPr
|
|||||||
public CreateNewPruductTagRequestValidator()
|
public CreateNewPruductTagRequestValidator()
|
||||||
{
|
{
|
||||||
RuleFor(model => model.ProductId)
|
RuleFor(model => model.ProductId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
RuleFor(model => model.TagId)
|
RuleFor(model => model.TagId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
}
|
}
|
||||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
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);
|
return result.Errors.Select(e => e.ErrorMessage);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ public class UpdatePruductTagRequestValidator : AbstractValidator<UpdatePruductT
|
|||||||
RuleFor(model => model.Id)
|
RuleFor(model => model.Id)
|
||||||
.NotNull();
|
.NotNull();
|
||||||
RuleFor(model => model.ProductId)
|
RuleFor(model => model.ProductId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
RuleFor(model => model.TagId)
|
RuleFor(model => model.TagId)
|
||||||
.NotEmpty();
|
.NotNull();
|
||||||
}
|
}
|
||||||
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
|
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);
|
return result.Errors.Select(e => e.ErrorMessage);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user