from sqlalchemy import Column, Integer, String, Float, DateTime, Boolean from sqlalchemy.sql import func from app.core.database import Base class Currency(Base): __tablename__ = "currencies" id = Column(Integer, primary_key=True, index=True) code = Column(String(3), unique=True, nullable=False, index=True) name = Column(String(100), nullable=False) symbol = Column(String(5), 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())