feat: add data source

This commit is contained in:
qixinbo
2026-03-15 19:36:02 +08:00
parent 219944f059
commit f1db709aae
14 changed files with 851 additions and 22 deletions
+12
View File
@@ -0,0 +1,12 @@
from sqlalchemy import Column, Integer, String, JSON, DateTime, func
from app.database import Base
class DataSource(Base):
__tablename__ = "data_sources"
id = Column(Integer, primary_key=True, index=True)
name = Column(String, nullable=False)
type = Column(String, nullable=False)
config = Column(JSON, nullable=False)
created_at = Column(DateTime, default=func.now())
updated_at = Column(DateTime, default=func.now(), onupdate=func.now())