12345678910111213141516 |
- from .Base import Base
- from datetime import datetime
- from sqlalchemy.orm import relationship
- from sqlalchemy import Column, Integer, String, DateTime
- class User(Base):
- __tablename__ = "users"
- id = Column(Integer, primary_key=True)
- email = Column(String(100), unique=True, nullable=False)
- password_hash = Column(String(256), nullable=False)
- created_at = Column(DateTime, default=datetime.now)
- conversations = relationship("Conversation", back_populates="user")
|