Buckets:

download
raw
1.37 kB
from datetime import datetime, timezone
from uuid import UUID
from sqlalchemy import DateTime, ForeignKey, String, Text, UniqueConstraint, Uuid
from sqlalchemy.orm import Mapped, mapped_column
from uuid_utils import uuid7
class OAuthAccountMixin:
"""OAuth-account table. Combine with your DeclarativeBase:
class OAuthAccount(OAuthAccountMixin, Base):
pass
"""
__tablename__ = "fullauth_oauth_accounts"
__table_args__ = (
UniqueConstraint("provider", "provider_user_id", name="uq_oauth_provider_user"),
)
id: Mapped[UUID] = mapped_column(Uuid, primary_key=True, default=uuid7)
provider: Mapped[str] = mapped_column(String(50), nullable=False)
provider_user_id: Mapped[str] = mapped_column(String(320), nullable=False)
user_id: Mapped[UUID] = mapped_column(
Uuid, ForeignKey("fullauth_users.id", ondelete="CASCADE"), nullable=False
)
provider_email: Mapped[str | None] = mapped_column(String(320), nullable=True)
access_token: Mapped[str | None] = mapped_column(Text, nullable=True)
refresh_token: Mapped[str | None] = mapped_column(Text, nullable=True)
expires_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
created_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True), default=lambda: datetime.now(timezone.utc)
)

Xet Storage Details

Size:
1.37 kB
·
Xet hash:
ea071ee65471bcc769b895d86c7c62cbc80764971bf5d75c6abf99989c8b7f1a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.