feat:初版
This commit is contained in:
17
apps/api/app/models/ai_provider.py
Normal file
17
apps/api/app/models/ai_provider.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from sqlalchemy import Column, String, Integer, Float, Boolean, DateTime, Text
|
||||
from datetime import datetime
|
||||
from .admin import Base
|
||||
|
||||
|
||||
class AIProvider(Base):
|
||||
__tablename__ = "ai_providers"
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
name = Column(String(50), nullable=False)
|
||||
model_id = Column(String(100), nullable=False)
|
||||
base_url = Column(String(255))
|
||||
api_key = Column(Text, nullable=False)
|
||||
is_active = Column(Boolean, default=True)
|
||||
is_default = Column(Boolean, default=False)
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
||||
Reference in New Issue
Block a user