from sqlalchemy import Column, BigInteger, String, Text, TIMESTAMP, func from app.core.database import Base class ShortUrl(Base): __tablename__ = "short_url" id = Column(BigInteger, primary_key=True, autoincrement=True) short_key = Column(String(10), unique=True, nullable=False, comment="短链接Key") long_url = Column(Text, nullable=False, comment="原始长链接") created_at = Column(TIMESTAMP, server_default=func.now(), comment="创建时间")