schemas updated
This commit is contained in:
@@ -16,13 +16,14 @@ from sqlalchemy import (
|
||||
)
|
||||
from sqlalchemy.orm import mapped_column, relationship, Mapped
|
||||
|
||||
from api_library.date_time_actions.date_functions import system_arrow
|
||||
from api_configs import Auth, ApiStatic, RelationAccess
|
||||
from databases.sql_models.core_mixin import CrudCollection
|
||||
from databases.extensions import SelectAction, SelectActionWithEmployee
|
||||
from databases.extensions.auth import UserLoginModule
|
||||
from api_validations.validations_request import InsertUsers, InsertPerson
|
||||
from databases.language_models.identity.identity import (
|
||||
from ApiLibrary.date_time_actions.date_functions import system_arrow
|
||||
from AllConfigs.Token.config import Auth, ApiStatic
|
||||
|
||||
from Services.PostgresDb import CrudCollection
|
||||
# from databases.extensions import SelectAction, SelectActionWithEmployee
|
||||
# from databases.extensions.auth import UserLoginModule
|
||||
from ApiValidations.Request import InsertUsers, InsertPerson
|
||||
from LanguageModels.Database.identity.identity import (
|
||||
UsersTokensLanguageModel,
|
||||
UsersLanguageModel,
|
||||
PeopleLanguageModel,
|
||||
@@ -197,7 +198,7 @@ class Users(CrudCollection, UserLoginModule, SelectAction):
|
||||
}
|
||||
|
||||
def get_employee_and_duty_details(self):
|
||||
from databases import Employees, Duties
|
||||
from Schemas import Employees, Duties
|
||||
|
||||
found_person = People.filter_one(
|
||||
People.id == self.person_id,
|
||||
@@ -234,7 +235,7 @@ class Users(CrudCollection, UserLoginModule, SelectAction):
|
||||
}
|
||||
|
||||
def get_main_domain_and_other_domains(self, get_main_domain: bool = True):
|
||||
from databases import MongoQueryIdentity
|
||||
from Schemas import MongoQueryIdentity
|
||||
|
||||
query_engine = MongoQueryIdentity(company_uuid=self.related_company)
|
||||
domain_via_user = query_engine.get_domain_via_user(user_uu_id=str(self.uu_id))
|
||||
@@ -253,7 +254,6 @@ class RelationshipDutyPeople(CrudCollection):
|
||||
|
||||
__tablename__ = "relationship_duty_people"
|
||||
__exclude__fields__ = []
|
||||
__access_by__ = RelationAccess.SuperAccessList
|
||||
__language_model__ = RelationshipDutyPeopleLanguageModel
|
||||
|
||||
company_id: Mapped[int] = mapped_column(
|
||||
@@ -374,7 +374,7 @@ class People(CrudCollection, SelectAction):
|
||||
|
||||
@classmethod
|
||||
def create_action(cls, data: InsertPerson, token):
|
||||
from databases import Duties
|
||||
from Schemas import Duties
|
||||
|
||||
token_duties_id, token_company_id = (
|
||||
token.selected_company.duty_id,
|
||||
|
||||
Reference in New Issue
Block a user