Spaces:
Sleeping
Sleeping
| from sqlalchemy import Column, Integer, String, Text, Boolean, DateTime | |
| from datetime import datetime | |
| from app.db import Base | |
| class DictionaryEntry(Base): | |
| __tablename__ = "dictionary_entries" | |
| id = Column(Integer, primary_key=True, index=True) | |
| headword_zomi = Column(String, index=True, nullable=False) | |
| headword_english = Column(String, index=True, nullable=False) | |
| translations = Column(Text, nullable=True) # comma-separated list | |
| part_of_speech = Column(String, nullable=True) | |
| definition = Column(Text, nullable=False) | |
| definition_translation = Column(Text, nullable=True) | |
| is_approved = Column(Boolean, default=True) | |
| created_at = Column(DateTime, default=datetime.utcnow) | |
| updated_at = Column(DateTime, default=datetime.utcnow) | |