Generator Changes at 11/25/2025 1:59:23 AM +03:30

This commit is contained in:
masoodafar-web
2025-11-25 02:03:51 +03:30
parent 87842f0b9b
commit 92a9a0e75d
77 changed files with 164 additions and 138 deletions

View File

@@ -16,5 +16,4 @@ public record CreateNewCategoryCommand : IRequest<CreateNewCategoryResponseDto>
//ترتیب نمایش
public int SortOrder { get; init; }
}
}

View File

@@ -4,5 +4,4 @@ public class CreateNewCategoryResponseDto
//شناسه
public long Id { get; set; }
}
}

View File

@@ -4,5 +4,4 @@ public record DeleteCategoryCommand : IRequest<Unit>
//شناسه
public long Id { get; init; }
}
}

View File

@@ -14,4 +14,3 @@ public class DeleteCategoryCommandValidator : AbstractValidator<DeleteCategoryCo
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -18,5 +18,4 @@ public record UpdateCategoryCommand : IRequest<Unit>
//ترتیب نمایش
public int SortOrder { get; init; }
}
}

View File

@@ -8,8 +8,7 @@ public record GetAllCategoryByFilterQuery : IRequest<GetAllCategoryByFilterRespo
//فیلتر
public GetAllCategoryByFilterFilter? Filter { get; init; }
}
public class GetAllCategoryByFilterFilter
}public class GetAllCategoryByFilterFilter
{
//شناسه
public long? Id { get; set; }
@@ -28,4 +27,3 @@ public class GetAllCategoryByFilterFilter
//ترتیب نمایش
public int? SortOrder { get; set; }
}

View File

@@ -12,4 +12,3 @@ public class GetAllCategoryByFilterQueryValidator : AbstractValidator<GetAllCate
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -6,8 +6,7 @@ public class GetAllCategoryByFilterResponseDto
//مدل خروجی
public List<GetAllCategoryByFilterResponseModel>? Models { get; set; }
}
public class GetAllCategoryByFilterResponseModel
}public class GetAllCategoryByFilterResponseModel
{
//شناسه
public long Id { get; set; }
@@ -26,4 +25,3 @@ public class GetAllCategoryByFilterResponseModel
//ترتیب نمایش
public int SortOrder { get; set; }
}

View File

@@ -4,5 +4,4 @@ public record GetCategoryQuery : IRequest<GetCategoryResponseDto>
//شناسه
public long Id { get; init; }
}
}

View File

@@ -14,4 +14,3 @@ public class GetCategoryQueryValidator : AbstractValidator<GetCategoryQuery>
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -18,5 +18,4 @@ public class GetCategoryResponseDto
//ترتیب نمایش
public int SortOrder { get; set; }
}
}

View File

@@ -7,21 +7,21 @@ public interface IApplicationDbContext
DbSet<Role> Roles { get; }
DbSet<Category> Categorys { get; }
DbSet<UserRole> UserRoles { get; }
DbSet<UserWallet> UserWallets { get; }
DbSet<UserWalletChangeLog> UserWalletChangeLogs { get; }
DbSet<UserCarts> UserCartss { get; }
DbSet<ProductGallerys> ProductGalleryss { get; }
DbSet<UserOrder> UserOrders { get; }
DbSet<FactorDetails> FactorDetailss { get; }
DbSet<Products> Productss { get; }
DbSet<ProductImages> ProductImagess { get; }
DbSet<Transactions> Transactionss { get; }
DbSet<User> Users { get; }
DbSet<OtpToken> OtpTokens { get; }
DbSet<Contract> Contracts { get; }
DbSet<UserContract> UserContracts { get; }
DbSet<PruductCategory> PruductCategorys { get; }
DbSet<Tag> Tags { get; }
DbSet<PruductCategory> PruductCategorys { get; }
DbSet<PruductTag> PruductTags { get; }
DbSet<Transactions> Transactionss { get; }
DbSet<UserOrder> UserOrders { get; }
DbSet<UserWallet> UserWallets { get; }
DbSet<UserWalletChangeLog> UserWalletChangeLogs { get; }
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}

View File

@@ -4,5 +4,4 @@ public class CreateNewPruductTagResponseDto
//شناسه
public long Id { get; set; }
}
}

View File

@@ -4,5 +4,4 @@ public record DeletePruductTagCommand : IRequest<Unit>
//شناسه
public long Id { get; init; }
}
}

View File

@@ -14,4 +14,3 @@ public class DeletePruductTagCommandValidator : AbstractValidator<DeletePruductT
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -12,4 +12,3 @@ public class GetAllPruductTagByFilterQueryValidator : AbstractValidator<GetAllPr
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -4,5 +4,4 @@ public record GetPruductTagQuery : IRequest<GetPruductTagResponseDto>
//شناسه
public long Id { get; init; }
}
}

View File

@@ -14,4 +14,3 @@ public class GetPruductTagQueryValidator : AbstractValidator<GetPruductTagQuery>
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -12,5 +12,4 @@ public record CreateNewTagCommand : IRequest<CreateNewTagResponseDto>
//ترتیب نمایش
public int SortOrder { get; init; }
}
}

View File

@@ -4,5 +4,4 @@ public class CreateNewTagResponseDto
//شناسه
public long Id { get; set; }
}
}

View File

@@ -4,5 +4,4 @@ public record DeleteTagCommand : IRequest<Unit>
//شناسه
public long Id { get; init; }
}
}

View File

@@ -14,4 +14,3 @@ public class DeleteTagCommandValidator : AbstractValidator<DeleteTagCommand>
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -14,5 +14,4 @@ public record UpdateTagCommand : IRequest<Unit>
//ترتیب نمایش
public int SortOrder { get; init; }
}
}

View File

@@ -8,8 +8,7 @@ public record GetAllTagByFilterQuery : IRequest<GetAllTagByFilterResponseDto>
//فیلتر
public GetAllTagByFilterFilter? Filter { get; init; }
}
public class GetAllTagByFilterFilter
}public class GetAllTagByFilterFilter
{
//شناسه
public long? Id { get; set; }
@@ -24,4 +23,3 @@ public class GetAllTagByFilterFilter
//ترتیب نمایش
public int? SortOrder { get; set; }
}

View File

@@ -12,4 +12,3 @@ public class GetAllTagByFilterQueryValidator : AbstractValidator<GetAllTagByFilt
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -6,8 +6,7 @@ public class GetAllTagByFilterResponseDto
//مدل خروجی
public List<GetAllTagByFilterResponseModel>? Models { get; set; }
}
public class GetAllTagByFilterResponseModel
}public class GetAllTagByFilterResponseModel
{
//شناسه
public long Id { get; set; }
@@ -22,4 +21,3 @@ public class GetAllTagByFilterResponseModel
//ترتیب نمایش
public int SortOrder { get; set; }
}

View File

@@ -4,5 +4,4 @@ public record GetTagQuery : IRequest<GetTagResponseDto>
//شناسه
public long Id { get; init; }
}
}

View File

@@ -14,4 +14,3 @@ public class GetTagQueryValidator : AbstractValidator<GetTagQuery>
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -14,5 +14,4 @@ public class GetTagResponseDto
//ترتیب نمایش
public int SortOrder { get; set; }
}
}

View File

@@ -5,5 +5,7 @@ public record CreateNewUserWalletCommand : IRequest<CreateNewUserWalletResponseD
public long UserId { get; init; }
//موجودی
public long Balance { get; init; }
//موجودی شبکه
public long NetworkBalance { get; init; }
}

View File

@@ -7,6 +7,8 @@ public class CreateNewUserWalletCommandValidator : AbstractValidator<CreateNewUs
.NotNull();
RuleFor(model => model.Balance)
.NotNull();
RuleFor(model => model.NetworkBalance)
.NotNull();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{

View File

@@ -7,5 +7,7 @@ public record UpdateUserWalletCommand : IRequest<Unit>
public long UserId { get; init; }
//موجودی
public long Balance { get; init; }
//موجودی شبکه
public long NetworkBalance { get; init; }
}

View File

@@ -9,6 +9,8 @@ public class UpdateUserWalletCommandValidator : AbstractValidator<UpdateUserWall
.NotNull();
RuleFor(model => model.Balance)
.NotNull();
RuleFor(model => model.NetworkBalance)
.NotNull();
}
public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
{

View File

@@ -16,4 +16,6 @@ public record GetAllUserWalletByFilterQuery : IRequest<GetAllUserWalletByFilterR
public long? UserId { get; set; }
//موجودی
public long? Balance { get; set; }
//موجودی شبکه
public long NetworkBalance { get; set; }
}

View File

@@ -14,4 +14,6 @@ public class GetAllUserWalletByFilterResponseDto
public long UserId { get; set; }
//موجودی
public long Balance { get; set; }
//موجودی شبکه
public long NetworkBalance { get; set; }
}

View File

@@ -7,5 +7,7 @@ public class GetUserWalletResponseDto
public long UserId { get; set; }
//موجودی
public long Balance { get; set; }
//موجودی شبکه
public long NetworkBalance { get; set; }
}

View File

@@ -7,6 +7,10 @@ public record CreateNewUserWalletChangeLogCommand : IRequest<CreateNewUserWallet
public long CurrentBalance { get; init; }
//تغییر موجودی
public long ChangeValue { get; init; }
//موجودی جاری شبکه
public long CurrentNetworkBalance { get; init; }
//تغییر موجودی شبکه
public long ChangeNerworkValue { get; init; }
//افزایشی؟
public bool IsIncrease { get; init; }
//شناسه ارجاع

View File

@@ -9,6 +9,10 @@ public class CreateNewUserWalletChangeLogCommandValidator : AbstractValidator<Cr
.NotNull();
RuleFor(model => model.ChangeValue)
.NotNull();
RuleFor(model => model.CurrentNetworkBalance)
.NotNull();
RuleFor(model => model.ChangeNerworkValue)
.NotNull();
RuleFor(model => model.IsIncrease)
.NotNull();
}

View File

@@ -9,6 +9,10 @@ public record UpdateUserWalletChangeLogCommand : IRequest<Unit>
public long CurrentBalance { get; init; }
//تغییر موجودی
public long ChangeValue { get; init; }
//موجودی جاری شبکه
public long CurrentNetworkBalance { get; init; }
//تغییر موجودی شبکه
public long ChangeNerworkValue { get; init; }
//افزایشی؟
public bool IsIncrease { get; init; }
//شناسه ارجاع

View File

@@ -11,6 +11,10 @@ public class UpdateUserWalletChangeLogCommandValidator : AbstractValidator<Updat
.NotNull();
RuleFor(model => model.ChangeValue)
.NotNull();
RuleFor(model => model.CurrentNetworkBalance)
.NotNull();
RuleFor(model => model.ChangeNerworkValue)
.NotNull();
RuleFor(model => model.IsIncrease)
.NotNull();
}

View File

@@ -16,6 +16,10 @@ public class GetAllUserWalletChangeLogByFilterResponseDto
public long CurrentBalance { get; set; }
//تغییر موجودی
public long ChangeValue { get; set; }
//موجودی جاری شبکه
public long CurrentNetworkBalance { get; set; }
//تغییر موجودی شبکه
public long ChangeNerworkValue { get; set; }
//افزایشی؟
public bool IsIncrease { get; set; }
//شناسه ارجاع

View File

@@ -9,6 +9,10 @@ public class GetUserWalletChangeLogResponseDto
public long CurrentBalance { get; set; }
//تغییر موجودی
public long ChangeValue { get; set; }
//موجودی جاری شبکه
public long CurrentNetworkBalance { get; set; }
//تغییر موجودی شبکه
public long ChangeNerworkValue { get; set; }
//افزایشی؟
public bool IsIncrease { get; set; }
//شناسه ارجاع