updated and cleaned

This commit is contained in:
2025-03-24 13:36:14 +03:00
parent 713730420c
commit 22876d250d
26 changed files with 161 additions and 98 deletions

View File

@@ -228,6 +228,7 @@ class Build(CrudCollection, SelectActionWithEmployee):
).data:
return management_room
return None
#
# @classmethod
# def create_action(cls, data: InsertBuild, token):

View File

@@ -27,7 +27,6 @@ from sqlalchemy.orm import Mapped, mapped_column, relationship
from Services.PostgresService.controllers.mixin_controllers import CrudCollection
class BuildDecisionBook(CrudCollection):
"""
Builds class based on declarative_base and BaseMixin via session

View File

@@ -12,6 +12,7 @@ from sqlalchemy import (
from sqlalchemy.orm import mapped_column, relationship, Mapped
from Commons.select_functions import SelectAction
# from ApiLayers.ApiValidations.Custom.token_objects import EmployeeTokenObject
# from ApiLayers.ApiValidations.Request import (
# InsertCompany,

View File

@@ -34,7 +34,8 @@ class UsersTokens(CrudCollection):
token: Mapped[str] = mapped_column(String, server_default="")
domain: Mapped[str] = mapped_column(String, server_default="")
expires_at: Mapped[TIMESTAMP] = mapped_column(
TIMESTAMP(timezone=True), default=str(arrow.now().shift(days=3)),
TIMESTAMP(timezone=True),
default=str(arrow.now().shift(days=3)),
)
# users = relationship("Users", back_populates="tokens", foreign_keys=[user_id])
@@ -146,6 +147,7 @@ class Users(CrudCollection, SelectAction):
)
)
)
#
# @classmethod
# def create_action(cls, create_user: InsertUsers, token_dict):
@@ -359,6 +361,7 @@ class People(CrudCollection, SelectAction):
if self.middle_name:
return f"{self.firstname} {self.middle_name} {self.surname}"
return f"{self.firstname} {self.surname}"
#
# @classmethod
# def create_action(cls, data: InsertPerson, token):