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,42 +1,42 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using LittleShop.Enums;
namespace LittleShop.Models;
public class CryptoPayment
{
[Key]
public Guid Id { get; set; }
public Guid OrderId { get; set; }
public CryptoCurrency Currency { get; set; }
[Required]
[StringLength(500)]
public string WalletAddress { get; set; } = string.Empty;
[Column(TypeName = "decimal(18,8)")]
public decimal RequiredAmount { get; set; }
[Column(TypeName = "decimal(18,8)")]
public decimal PaidAmount { get; set; } = 0;
public PaymentStatus Status { get; set; } = PaymentStatus.Pending;
[StringLength(200)]
public string? BTCPayInvoiceId { get; set; }
[StringLength(200)]
public string? TransactionHash { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime? PaidAt { get; set; }
public DateTime ExpiresAt { get; set; }
// Navigation properties
public virtual Order Order { get; set; } = null!;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using LittleShop.Enums;
namespace LittleShop.Models;
public class CryptoPayment
{
[Key]
public Guid Id { get; set; }
public Guid OrderId { get; set; }
public CryptoCurrency Currency { get; set; }
[Required]
[StringLength(500)]
public string WalletAddress { get; set; } = string.Empty;
[Column(TypeName = "decimal(18,8)")]
public decimal RequiredAmount { get; set; }
[Column(TypeName = "decimal(18,8)")]
public decimal PaidAmount { get; set; } = 0;
public PaymentStatus Status { get; set; } = PaymentStatus.Pending;
[StringLength(200)]
public string? BTCPayInvoiceId { get; set; }
[StringLength(200)]
public string? TransactionHash { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime? PaidAt { get; set; }
public DateTime ExpiresAt { get; set; }
// Navigation properties
public virtual Order Order { get; set; } = null!;
}

View File

@@ -37,4 +37,5 @@ public class Product
public virtual Category Category { get; set; } = null!;
public virtual ICollection<ProductPhoto> Photos { get; set; } = new List<ProductPhoto>();
public virtual ICollection<OrderItem> OrderItems { get; set; } = new List<OrderItem>();
public virtual ICollection<Review> Reviews { get; set; } = new List<Review>();
}

View File

@@ -0,0 +1,45 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace LittleShop.Models;
public class Review
{
[Key]
public Guid Id { get; set; }
[Required]
public Guid ProductId { get; set; }
[Required]
public Guid CustomerId { get; set; }
[Required]
public Guid OrderId { get; set; }
[Range(1, 5)]
public int Rating { get; set; }
[StringLength(100)]
public string? Title { get; set; }
[StringLength(2000)]
public string? Comment { get; set; }
public bool IsVerifiedPurchase { get; set; } = true;
public bool IsApproved { get; set; } = false;
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
public DateTime? ApprovedAt { get; set; }
public Guid? ApprovedByUserId { get; set; }
// Navigation properties
public virtual Product Product { get; set; } = null!;
public virtual Customer Customer { get; set; } = null!;
public virtual Order Order { get; set; } = null!;
public virtual User? ApprovedByUser { get; set; }
}