15 lines
625 B
Python
15 lines
625 B
Python
from sqlalchemy import Column, Integer, String, Boolean, DateTime, Text
|
|
from sqlalchemy.sql import func
|
|
from app.core.database import Base
|
|
|
|
class AIConfiguration(Base):
|
|
__tablename__ = "ai_configurations"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
provider = Column(String(50), nullable=False) # openai, gemini
|
|
api_key = Column(Text, nullable=False)
|
|
model_name = Column(String(100), 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())
|