Files
HangmanLab.Backend/db/models/Webhook.py
2025-03-17 13:54:53 +00:00

16 lines
455 B
Python

from sqlalchemy import Column, String, Integer, ForeignKey, UniqueConstraint, text, Boolean
from db.models import Base
class Webhook(Base):
__tablename__ = 'webhook'
id = Column(Integer, primary_key=True, autoincrement=True)
hook_url = Column(String(100), nullable=False)
__table_args__ = (UniqueConstraint('hook_url'),)
def to_dict(self):
return {
"id": self.id,
"hook_url": self.hook_url
}