mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-05 01:45:22 -05:00
* generate types * use generated types * ui updates * init button link for common styles * add links * setup label views * add delete confirmation * reset when not saved * link label to foods and auto set when adding to shopping list * generate types * use inheritence to manage exception handling * fix schema generation and add test for open_api generation * add header to api docs * move list consilidation to service * split list and list items controller * shopping list/list item tests - PARTIAL * enable recipe add/remove in shopping lists * generate types * linting * init global utility components * update types and add list item api * fix import cycle and database error * add container and border classes * new recipe list component * fix tests * breakout item editor * refactor item editor * update bulk actions * update input / color contrast * type generation * refactor controller dependencies * include food/unit editor * remove console.logs * fix and update type generation * fix incorrect type for column * fix postgres error * fix delete by variable * auto remove refs * fix typo
62 lines
2.5 KiB
Python
62 lines
2.5 KiB
Python
from sqlalchemy import Boolean, Column, ForeignKey, String, orm
|
|
|
|
from .._model_base import BaseMixins, SqlAlchemyBase
|
|
from .._model_utils import GUID, auto_init
|
|
|
|
|
|
class GroupEventNotifierOptionsModel(SqlAlchemyBase, BaseMixins):
|
|
__tablename__ = "group_events_notifier_options"
|
|
|
|
id = Column(GUID, primary_key=True, default=GUID.generate)
|
|
event_notifier_id = Column(GUID, ForeignKey("group_events_notifiers.id"), nullable=False)
|
|
|
|
recipe_created = Column(Boolean, default=False, nullable=False)
|
|
recipe_updated = Column(Boolean, default=False, nullable=False)
|
|
recipe_deleted = Column(Boolean, default=False, nullable=False)
|
|
|
|
user_signup = Column(Boolean, default=False, nullable=False)
|
|
|
|
data_migrations = Column(Boolean, default=False, nullable=False)
|
|
data_export = Column(Boolean, default=False, nullable=False)
|
|
data_import = Column(Boolean, default=False, nullable=False)
|
|
|
|
mealplan_entry_created = Column(Boolean, default=False, nullable=False)
|
|
|
|
shopping_list_created = Column(Boolean, default=False, nullable=False)
|
|
shopping_list_updated = Column(Boolean, default=False, nullable=False)
|
|
shopping_list_deleted = Column(Boolean, default=False, nullable=False)
|
|
|
|
cookbook_created = Column(Boolean, default=False, nullable=False)
|
|
cookbook_updated = Column(Boolean, default=False, nullable=False)
|
|
cookbook_deleted = Column(Boolean, default=False, nullable=False)
|
|
|
|
tag_created = Column(Boolean, default=False, nullable=False)
|
|
tag_updated = Column(Boolean, default=False, nullable=False)
|
|
tag_deleted = Column(Boolean, default=False, nullable=False)
|
|
|
|
category_created = Column(Boolean, default=False, nullable=False)
|
|
category_updated = Column(Boolean, default=False, nullable=False)
|
|
category_deleted = Column(Boolean, default=False, nullable=False)
|
|
|
|
@auto_init()
|
|
def __init__(self, **_) -> None:
|
|
pass
|
|
|
|
|
|
class GroupEventNotifierModel(SqlAlchemyBase, BaseMixins):
|
|
__tablename__ = "group_events_notifiers"
|
|
|
|
id = Column(GUID, primary_key=True, default=GUID.generate)
|
|
name = Column(String, nullable=False)
|
|
enabled = Column(Boolean, default=True, nullable=False)
|
|
apprise_url = Column(String, nullable=False)
|
|
|
|
group = orm.relationship("Group", back_populates="group_event_notifiers", single_parent=True)
|
|
group_id = Column(GUID, ForeignKey("groups.id"), index=True)
|
|
|
|
options = orm.relationship(GroupEventNotifierOptionsModel, uselist=False, cascade="all, delete-orphan")
|
|
|
|
@auto_init()
|
|
def __init__(self, **_) -> None:
|
|
pass
|