Download models.py from ChiragPatankar/Gemini_MCP_Server: direct link, hf CLI and curl.
- Browser
- Download file 1.56 kB
-
https://huggingface.co/spaces/ChiragPatankar/Gemini_MCP_Server/resolve/main/models.py
- Command line
-
hf download hf://spaces/ChiragPatankar/Gemini_MCP_Server/models.py
-
curl -L -o models.py https://huggingface.co/spaces/ChiragPatankar/Gemini_MCP_Server/resolve/main/models.py
1.56 kB
| from sqlalchemy import Column, Integer, String, Text, DateTime, Boolean | |
| from sqlalchemy.sql import func | |
| from database import Base | |
| class ChatMessage(Base): | |
| __tablename__ = "chat_messages" | |
| id = Column(Integer, primary_key=True, index=True) | |
| user_id = Column(Integer, nullable=False) | |
| message = Column(Text, nullable=False) | |
| response = Column(Text, nullable=False) | |
| context = Column(Text) # JSON string | |
| created_at = Column(DateTime(timezone=True), server_default=func.now()) | |
| updated_at = Column(DateTime(timezone=True), onupdate=func.now()) | |
| class User(Base): | |
| __tablename__ = "users" | |
| id = Column(Integer, primary_key=True, index=True) | |
| email = Column(String(255), unique=True, index=True, nullable=False) | |
| name = Column(String(255), nullable=False) | |
| hashed_password = Column(String(255), nullable=False) | |
| is_active = Column(Boolean, default=True) | |
| created_at = Column(DateTime(timezone=True), server_default=func.now()) | |
| updated_at = Column(DateTime(timezone=True), onupdate=func.now()) | |
| class Tenant(Base): | |
| __tablename__ = "tenants" | |
| id = Column(Integer, primary_key=True, index=True) | |
| name = Column(String(255), nullable=False) | |
| domain = Column(String(255), unique=True, index=True) | |
| owner_id = Column(Integer, nullable=False) # Reference to User | |
| is_active = Column(Boolean, default=True) | |
| created_at = Column(DateTime(timezone=True), server_default=func.now()) | |
| updated_at = Column(DateTime(timezone=True), onupdate=func.now()) |