Initial commit of LittleShop project (excluding large archives)

- BTCPay Server integration
- TeleBot Telegram bot
- Review system
- Admin area
- Docker deployment configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-17 15:07:38 +01:00
parent bcca00ab39
commit e1b377a042
140 changed files with 32166 additions and 21089 deletions

View File

@@ -1,30 +1,30 @@
using LittleShop.Enums;
namespace LittleShop.DTOs;
public class CryptoPaymentDto
{
public Guid Id { get; set; }
public Guid OrderId { get; set; }
public CryptoCurrency Currency { get; set; }
public string WalletAddress { get; set; } = string.Empty;
public decimal RequiredAmount { get; set; }
public decimal PaidAmount { get; set; }
public PaymentStatus Status { get; set; }
public string? BTCPayInvoiceId { get; set; }
public string? TransactionHash { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? PaidAt { get; set; }
public DateTime ExpiresAt { get; set; }
}
public class PaymentStatusDto
{
public Guid PaymentId { get; set; }
public PaymentStatus Status { get; set; }
public decimal RequiredAmount { get; set; }
public decimal PaidAmount { get; set; }
public DateTime? PaidAt { get; set; }
public DateTime ExpiresAt { get; set; }
public bool IsExpired => DateTime.UtcNow > ExpiresAt;
using LittleShop.Enums;
namespace LittleShop.DTOs;
public class CryptoPaymentDto
{
public Guid Id { get; set; }
public Guid OrderId { get; set; }
public CryptoCurrency Currency { get; set; }
public string WalletAddress { get; set; } = string.Empty;
public decimal RequiredAmount { get; set; }
public decimal PaidAmount { get; set; }
public PaymentStatus Status { get; set; }
public string? BTCPayInvoiceId { get; set; }
public string? TransactionHash { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? PaidAt { get; set; }
public DateTime ExpiresAt { get; set; }
}
public class PaymentStatusDto
{
public Guid PaymentId { get; set; }
public PaymentStatus Status { get; set; }
public decimal RequiredAmount { get; set; }
public decimal PaidAmount { get; set; }
public DateTime? PaidAt { get; set; }
public DateTime ExpiresAt { get; set; }
public bool IsExpired => DateTime.UtcNow > ExpiresAt;
}

View File

@@ -0,0 +1,86 @@
using System.ComponentModel.DataAnnotations;
namespace LittleShop.DTOs;
public class ReviewDto
{
public Guid Id { get; set; }
public Guid ProductId { get; set; }
public string ProductName { get; set; } = string.Empty;
public Guid CustomerId { get; set; }
public string CustomerDisplayName { get; set; } = string.Empty;
public Guid OrderId { get; set; }
public int Rating { get; set; }
public string? Title { get; set; }
public string? Comment { get; set; }
public bool IsVerifiedPurchase { get; set; }
public bool IsApproved { get; set; }
public bool IsActive { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
public DateTime? ApprovedAt { get; set; }
public string? ApprovedByUsername { get; set; }
}
public class CreateReviewDto
{
[Required]
public Guid ProductId { get; set; }
[Required]
public Guid CustomerId { get; set; }
[Required]
public Guid OrderId { get; set; }
[Required]
[Range(1, 5, ErrorMessage = "Rating must be between 1 and 5 stars")]
public int Rating { get; set; }
[StringLength(100, ErrorMessage = "Title cannot exceed 100 characters")]
public string? Title { get; set; }
[StringLength(2000, ErrorMessage = "Comment cannot exceed 2000 characters")]
public string? Comment { get; set; }
}
public class UpdateReviewDto
{
[Range(1, 5, ErrorMessage = "Rating must be between 1 and 5 stars")]
public int? Rating { get; set; }
[StringLength(100, ErrorMessage = "Title cannot exceed 100 characters")]
public string? Title { get; set; }
[StringLength(2000, ErrorMessage = "Comment cannot exceed 2000 characters")]
public string? Comment { get; set; }
public bool? IsApproved { get; set; }
public bool? IsActive { get; set; }
}
public class ReviewSummaryDto
{
public Guid ProductId { get; set; }
public string ProductName { get; set; } = string.Empty;
public int TotalReviews { get; set; }
public int ApprovedReviews { get; set; }
public double AverageRating { get; set; }
public int FiveStars { get; set; }
public int FourStars { get; set; }
public int ThreeStars { get; set; }
public int TwoStars { get; set; }
public int OneStar { get; set; }
public DateTime? LatestReviewDate { get; set; }
}
public class CustomerReviewEligibilityDto
{
public Guid CustomerId { get; set; }
public Guid ProductId { get; set; }
public bool CanReview { get; set; }
public string? Reason { get; set; }
public List<Guid> EligibleOrderIds { get; set; } = new();
public bool HasExistingReview { get; set; }
public Guid? ExistingReviewId { get; set; }
}