1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

Fix init tables

This commit is contained in:
MoonTestUse1
2025-01-06 22:56:27 +06:00
parent ed2a1185b7
commit 28a20247d5
5 changed files with 41 additions and 7 deletions

View File

@@ -13,8 +13,8 @@ class Employee(Base):
hashed_password = Column(String, nullable=False)
is_active = Column(Boolean, default=True)
is_admin = Column(Boolean, default=False)
created_at = Column(DateTime(timezone=True), server_default=func.now())
department = Column(String, nullable=True)
created_at = Column(DateTime(timezone=True), server_default=func.now())
# Определяем отношение к Request
requests = relationship("Request", back_populates="employee", cascade="all, delete-orphan")