first commit
This commit is contained in:
14
backend/app/models_ai.py
Normal file
14
backend/app/models_ai.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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())
|
||||
Reference in New Issue
Block a user