Created At: 2026-11-18T17:19:30Z Completed At: 2026-11-18T17:19:31Z Command exited with code 0. Command output: class Subscription(Base, UUIDPrimaryKeyMixin, TenantMixin, TimestampMixin): """Tenant subscription with lifecycle state, period dates, and grace period.""" __tablename__ = "subscriptions" plan_id: Mapped[str] = mapped_column( String(50), ForeignKey("plans.id", ondelete="RESTRICT"), nullable=False, default="free", index=True, ) # trialing | active | past_due | grace_period | canceled | expired status: Mapped[str] = mapped_column(String(50), default="active", nullable=False, index=True) current_period_start: Mapped[datetime] = mapped_column(DateTime(timezone=True), nullable=False) current_period_end: Mapped[datetime] = mapped_column(DateTime(timezone=True), nullable=False, index=True) cancel_at_period_end: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False) canceled_at: Mapped[Optional[datetime]] = mapped_column(DateTime(timezone=True), nullable=True) trial_start: Mapped[Optional[datetime]] = mapped_column(DateTime(timezone=True), nullable=True) trial_end: Mapped[Optional[datetime]] = mapped_column(DateTime(timezone=True), nullable=True) grace_period_ends_at: Mapped[Optional[datetime]] = mapped_column(DateTime(timezone=True), nullable=True) gateway_provider: Mapped[str] = mapped_column(String(50), default="manual", nullable=False) gateway_subscription_id: Mapped[Optional[str]] = mapped_column(String(100), nullable=True) gateway_customer_id: Mapped[Optional[str]] = mapped_column(String(100), nullable=True) plan: Mapped["Plan"] = relationship("Plan", back_populates="subscriptions") invoices: Mapped[list["Invoice"]] = relationship("Invoice", back_populates="subscription")