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

@@ -2,7 +2,8 @@
from enum import Enum
from sqlalchemy import Column, Integer, String, ForeignKey, DateTime, Enum as SQLAlchemyEnum
from sqlalchemy.sql import func
from ..database import Base
from sqlalchemy.orm import relationship
from ..db.base import Base
class RequestStatus(str, Enum):
@@ -33,3 +34,6 @@ class Request(Base):
employee_id = Column(Integer, ForeignKey("employees.id", ondelete="CASCADE"), nullable=False)
created_at = Column(DateTime(timezone=True), server_default=func.now(), nullable=False)
updated_at = Column(DateTime(timezone=True), onupdate=func.now())
# Определяем отношение к Employee
employee = relationship("Employee", back_populates="requests")