Add subcription feature 3
This commit is contained in:
@@ -211,7 +211,8 @@ async def clone_demo_data(
|
||||
subscription_data.get('cancellation_effective_date'),
|
||||
session_time,
|
||||
"cancellation_effective_date"
|
||||
)
|
||||
),
|
||||
is_tenant_linked=True # Required for check constraint when tenant_id is set
|
||||
)
|
||||
|
||||
db.add(subscription)
|
||||
@@ -245,7 +246,8 @@ async def clone_demo_data(
|
||||
"api_access": True,
|
||||
"priority_support": True
|
||||
},
|
||||
next_billing_date=datetime.now(timezone.utc) + timedelta(days=90)
|
||||
next_billing_date=datetime.now(timezone.utc) + timedelta(days=90),
|
||||
is_tenant_linked=True # Required for check constraint when tenant_id is set
|
||||
)
|
||||
|
||||
db.add(subscription)
|
||||
@@ -323,7 +325,8 @@ async def clone_demo_data(
|
||||
max_users=-1, # Unlimited for demo
|
||||
max_locations=max_locations,
|
||||
max_products=-1, # Unlimited for demo
|
||||
features={}
|
||||
features={},
|
||||
is_tenant_linked=True # Required for check constraint when tenant_id is set
|
||||
)
|
||||
db.add(demo_subscription)
|
||||
|
||||
@@ -699,7 +702,8 @@ async def create_child_outlet(
|
||||
max_users=10, # Demo limits
|
||||
max_locations=1, # Single location for outlet
|
||||
max_products=200,
|
||||
features={}
|
||||
features={},
|
||||
is_tenant_linked=True # Required for check constraint when tenant_id is set
|
||||
)
|
||||
db.add(child_subscription)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user