You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
636 B
Python
25 lines
636 B
Python
from sqlalchemy import JSON, TIMESTAMP, Column, Integer, String, Text
|
|
from sqlalchemy.sql import func
|
|
|
|
from app.db.database import Base
|
|
|
|
|
|
class Tool(Base):
|
|
__tablename__ = "tools"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
name = Column(String(100), unique=True, nullable=False)
|
|
description = Column(Text, nullable=False)
|
|
parameters = Column(JSON, nullable=False)
|
|
|
|
created_at = Column(
|
|
TIMESTAMP,
|
|
server_default=func.current_timestamp(),
|
|
)
|
|
|
|
updated_at = Column(
|
|
TIMESTAMP,
|
|
server_default=func.current_timestamp(),
|
|
onupdate=func.current_timestamp(),
|
|
)
|