mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-28 13:05:26 -05:00
feat: mealplan-webhooks (#1403)
* fix type errors on event bus * webhooks fields required for new implementation * db migration * wip: webhook query + tests and stub function * ignore type checker error * type and method cleanup * datetime and time utc validator * update testing code for utc scheduled time * fix file cmp function call * update version_number * add support for translating "time" objects when restoring backup * bump recipe-scrapers * use specific import syntax * generate frontend types * utilize names exports * use utc times * add task to scheduler * implement new scheduler functionality * stub for type annotation * implement meal-plan data getter * add experimental banner
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
from sqlalchemy import Boolean, Column, ForeignKey, String, orm
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import Boolean, Column, ForeignKey, String, Time, orm
|
||||
|
||||
from .._model_base import BaseMixins, SqlAlchemyBase
|
||||
from .._model_utils import GUID, auto_init
|
||||
@@ -14,8 +16,15 @@ class GroupWebhooksModel(SqlAlchemyBase, BaseMixins):
|
||||
enabled = Column(Boolean, default=False)
|
||||
name = Column(String)
|
||||
url = Column(String)
|
||||
|
||||
# New Fields
|
||||
webhook_type = Column(String, default="") # Future use for different types of webhooks
|
||||
scheduled_time = Column(Time, default=lambda: datetime.now().time())
|
||||
|
||||
# Columne is no longer used but is kept for since it's super annoying to
|
||||
# delete a column in SQLite and it's not a big deal to keep it around
|
||||
time = Column(String, default="00:00")
|
||||
|
||||
@auto_init()
|
||||
def __init__(self, **_) -> None:
|
||||
pass
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user