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:
@@ -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")
|
||||
|
Reference in New Issue
Block a user