littleshop/LittleShop/Models
sysadmin eb87148c63 Add variant collections system and enhance ProductVariant with weight/stock tracking
This commit introduces a comprehensive variant management system and enhances
the existing ProductVariant model with per-variant weight overrides and stock
tracking, integrated across Admin Panel and TeleBot.

Features Added:
- Variant Collections: Reusable variant templates (e.g., "Standard Sizes")
- Admin UI for managing variant collections (CRUD operations)
- Dynamic variant editor with JavaScript-based UI
- Per-variant weight and weight unit overrides
- Per-variant stock level tracking
- SalesLedger model for financial tracking

ProductVariant Enhancements:
- Added Weight (decimal, nullable) field for variant-specific weights
- Added WeightUnit (enum, nullable) field for variant-specific units
- Maintains backward compatibility with product-level weights

TeleBot Integration:
- Enhanced variant selection UI to display stock levels
- Shows weight information with proper unit conversion (µg, g, oz, lb, ml, L)
- Compact button format: "Medium (15 in stock, 350g)"
- Real-time stock availability display

Database Migrations:
- 20250928014850_AddVariantCollectionsAndSalesLedger
- 20250928155814_AddWeightToProductVariants

Technical Changes:
- Updated Product model to support VariantCollectionId and VariantsJson
- Extended ProductService with variant collection operations
- Enhanced OrderService to handle variant-specific pricing and weights
- Updated LittleShop.Client DTOs to match server models
- Added JavaScript dynamic variant form builder

Files Modified: 15
Files Added: 17
Lines Changed: ~2000

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 17:03:09 +01:00
..
Bot.cs Add customer communication system 2025-08-27 18:02:39 +01:00
BotActivity.cs Implement product multi-buys and variants system 2025-09-21 00:30:12 +01:00
BotContact.cs Configure BTCPay with external nodes via Tor 2025-09-19 12:14:39 +01:00
BotMetric.cs Add customer communication system 2025-08-27 18:02:39 +01:00
BotSession.cs Add customer communication system 2025-08-27 18:02:39 +01:00
Category.cs Implement complete e-commerce functionality with shipping and order management 2025-08-20 17:37:24 +01:00
CryptoPayment.cs Remove BTCPay completely, integrate SilverPAY only, configure TeleBot with real token 2025-09-20 19:22:29 +01:00
Customer.cs Add customer communication system 2025-08-27 18:02:39 +01:00
CustomerMessage.cs Add customer communication system 2025-08-27 18:02:39 +01:00
Order.cs Implement product variations, enhanced order workflow, mobile responsiveness, and product import system 2025-09-18 01:39:31 +01:00
OrderItem.cs Add product variants system and live bot activity dashboard 2025-09-24 23:00:20 +01:00
Product.cs Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
ProductMultiBuy.cs Implement product multi-buys and variants system 2025-09-21 00:30:12 +01:00
ProductPhoto.cs Implement complete e-commerce functionality with shipping and order management 2025-08-20 17:37:24 +01:00
ProductVariant.cs Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
PushSubscription.cs WebPush-and-photo-upload-fixes 2025-09-01 06:01:05 +01:00
Review.cs Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
SalesLedger.cs Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
ShippingRate.cs Implement complete e-commerce functionality with shipping and order management 2025-08-20 17:37:24 +01:00
SystemSetting.cs 🔒 SECURITY: Emergency fixes and hardening 2025-09-22 05:45:49 +01:00
User.cs Remove BTCPay completely, integrate SilverPAY only, configure TeleBot with real token 2025-09-20 19:22:29 +01:00
VariantCollection.cs Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00