Files
MermsCoreFlask/app/api/services/subscription.py
T
CHIEFSOFT\ameye 8fd53a7ec6 subscription layer
2025-08-11 12:12:47 -04:00

43 lines
1.6 KiB
Python

from flask import jsonify
from app.utils.logger import logger
from app.api.services.base_service import BaseService
from sqlalchemy import func, desc
class SubscriptionService(BaseService):
@staticmethod
def subscription_available_products(data):
try:
subscription_products_data = {
"current_product": {
"display_name": "Current Subscriptions",
},
"options": {
"starter":{
"display_name" : "Starter",
"monthly" : 5.99,
"items" : ['Post Jobs','advanced instructors search','invite candidates','post events',
'Cancel anythime']
},
"basic": {
"display_name": "Basic",
"monthly": 12.99,
"items": ['Post Jobs', 'advanced instructors search', 'invite candidates', 'post events',
'Cancel anythime']
},
"premium": {
"display_name": "Premium",
"monthly": 20.99,
"items": ['Post Jobs', 'advanced instructors search', 'invite candidates', 'post events',
'Cancel anythime']
},
}
}
return subscription_products_data
except Exception as e:
logger.error(f"An error occurred while getting dashboard data: {str(e)}", exc_info=True)
return jsonify({"message": "Internal Server Error"}), 500