Files
igny8/backend/igny8_core/modules/billing/constants.py
Desktop 72a31b2edb Phase 0: Foundation & Credit System - Initial implementation
- Updated CREDIT_COSTS constants to Phase 0 format with new operations
- Enhanced CreditService with get_credit_cost() method and operation_type support
- Created AccountModuleSettings model for module enable/disable functionality
- Added AccountModuleSettingsSerializer and ViewSet
- Registered module settings API endpoint: /api/v1/system/settings/account-modules/
- Maintained backward compatibility with existing credit system
2025-11-16 23:24:44 +05:00

26 lines
1.1 KiB
Python

"""
Credit Cost Constants - Phase 0: Credit-Only System
All features are unlimited. Only credits restrict usage.
"""
CREDIT_COSTS = {
# Existing operations
'clustering': 10, # Per clustering request
'idea_generation': 15, # Per cluster → ideas request
'content_generation': 1, # Per 100 words
'image_prompt_extraction': 2, # Per content piece
'image_generation': 5, # Per image
# Legacy operation names (for backward compatibility)
'ideas': 15, # Alias for idea_generation
'content': 1, # Alias for content_generation (per 100 words)
'images': 5, # Alias for image_generation
'reparse': 2, # Alias for image_prompt_extraction
# NEW: Phase 2+ operations
'linking': 8, # Per content piece (NEW)
'optimization': 1, # Per 200 words (NEW)
'site_structure_generation': 50, # Per site blueprint (NEW)
'site_page_generation': 20, # Per page (NEW)
}