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

add websockets suppor93

This commit is contained in:
MoonTestUse1
2025-01-05 02:44:04 +06:00
parent c3c20f6e6f
commit af7c903b5d
5 changed files with 22 additions and 21 deletions

View File

@@ -1,10 +1,11 @@
"""Employee model"""
from sqlalchemy import Column, Integer, String, DateTime
from sqlalchemy.sql import func
"""Employee models"""
from sqlalchemy import Column, Integer, String
from sqlalchemy.orm import relationship
from app.db.base_class import Base
from ..db.base import Base
class Employee(Base):
"""Employee model"""
__tablename__ = "employees"
id = Column(Integer, primary_key=True, index=True)
@@ -13,7 +14,6 @@ class Employee(Base):
department = Column(String, nullable=False)
office = Column(String, nullable=False)
hashed_password = Column(String, nullable=False)
created_at = Column(DateTime(timezone=True), server_default=func.now())
# Определяем отношение к Request
requests = relationship("Request", back_populates="employee", cascade="all, delete-orphan")