action table add

This commit is contained in:
2023-09-16 01:52:15 +00:00
parent 59e6d33656
commit c1e50736e8
4 changed files with 40 additions and 4 deletions

View File

@@ -115,4 +115,10 @@ def get_kintones(db: Session, type: int):
kintones = db.query(models.Kintone).filter(models.Kintone.type == type).all()
if not kintones:
raise HTTPException(status_code=404, detail="Data not found")
return kintones
return kintones
def get_actions(db: Session):
actions = db.query(models.Action).all()
if not actions:
raise HTTPException(status_code=404, detail="Data not found")
return actions

View File

@@ -28,4 +28,12 @@ class Kintone(Base):
type = Column(Integer, index=True, nullable=False)
name = Column(String(100), nullable=False)
desc = Column(String)
content = Column(String)
content = Column(String)
class Action(Base):
__tablename__ = "action"
id = Column(Integer, primary_key=True, index=True)
name = Column(String(100), index=True, nullable=False)
title = Column(String(200))
inputpoint = Column(String(100))
property = Column(String)

View File

@@ -67,5 +67,15 @@ class Kintone(BaseModel):
desc: str = None
content: str = None
class Config:
orm_mode = True
class Action(BaseModel):
id: int
name: str = None
title: str = None
inputpoint: str = None
property: str = None
class Config:
orm_mode = True