From 418273399eba3bc1b99f90fe5f4b05cf958305ed Mon Sep 17 00:00:00 2001 From: signebedi Date: Sat, 23 Mar 2024 15:34:38 -0500 Subject: [PATCH] Grumble: fixed import error (#22) --- libreforms_fastapi/utils/sqlalchemy_models.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libreforms_fastapi/utils/sqlalchemy_models.py b/libreforms_fastapi/utils/sqlalchemy_models.py index 594fedc..774fd4f 100644 --- a/libreforms_fastapi/utils/sqlalchemy_models.py +++ b/libreforms_fastapi/utils/sqlalchemy_models.py @@ -9,6 +9,7 @@ Integer, String, DateTime, + JSON, ) from sqlalchemy.orm import relationship, declarative_base @@ -68,6 +69,14 @@ class Group(Base): name = Column(String(1000), unique=True) permissions = Column(JSON) +# Allow custom approval chains to be defined here +class ApprovalChains(Base): + __tablename__ = 'approval_chains' + id = Column(Integer, primary_key=True) + form_name = Column(String(1000)) + apply_to_single_group = Column(String(100), nullable=True) # Maybe we allow admins to route approvals based on the group of the sender... + send_to_users_manager = Column(Boolean) # I think that this is probably going to be difficult to implement ... + # Create a custom Signing class from sqlalchemy_signing Signing = create_signing_class(Base, tz_aware_datetime) \ No newline at end of file