Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.
API operations
Data model
Attributes
Relationships
System-computed
- workspace_subscription_id — generated by gen_random_uuid() at the database level on INSERT; also seeded client-side via randomUUID() as the ORM default
- created_at — set by MikroORM onCreate lifecycle hook to new Date(); never user-supplied
- updated_at — set by MikroORM onCreate and onUpdate lifecycle hooks; reflects every Stripe-webhook-driven mutation
- deleted_at — not set by any automated pipeline today; available as the soft-delete sentinel column following the platform convention
- status — written exclusively by the Stripe webhook handler (stripe-webhooks.service.ts) and by SubscriptionsService.syncSubscriptionFromStripe; mirrors Stripe pricing-plan servicing_status (active / canceled / paused)
- stripe_customer_id — written by SubscriptionsService when creating or linking a Stripe Customer for the workspace
- stripe_pricing_plan_subscription_id — written by SubscriptionsService when a pricing-plan subscription is activated or changed
Example
apps/api/src/database/entities/WorkspaceSubscription.ts · domain: workspace · tier: Platform