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