auth service up running
This commit is contained in:
@@ -2,8 +2,8 @@ from fastapi.exceptions import HTTPException
|
||||
|
||||
from databases.sql_models.core_mixin import CrudCollection
|
||||
|
||||
from sqlalchemy import String, Integer, Boolean, ForeignKey, Index, Identity
|
||||
from sqlalchemy.orm import mapped_column, Mapped
|
||||
from sqlalchemy import String, Integer, Boolean, ForeignKey, Index, Identity, TIMESTAMP, func
|
||||
from sqlalchemy.orm import mapped_column, relationship, Mapped
|
||||
|
||||
from api_configs import RelationAccess
|
||||
from databases.extensions import SelectAction
|
||||
@@ -13,6 +13,11 @@ from api_validations.validations_request import (
|
||||
MatchCompany2Company,
|
||||
)
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject
|
||||
from databases.language_models.company.company import (
|
||||
RelationshipDutyCompanyLanguageModel,
|
||||
CompaniesLanguageModel,
|
||||
# CompanyDutiesLanguageModel,
|
||||
)
|
||||
|
||||
|
||||
class RelationshipDutyCompany(CrudCollection):
|
||||
@@ -31,6 +36,7 @@ class RelationshipDutyCompany(CrudCollection):
|
||||
__tablename__ = "relationship_duty_company"
|
||||
__exclude__fields__ = []
|
||||
__access_by__ = RelationAccess.SuperAccessList
|
||||
__language_model__ = RelationshipDutyCompanyLanguageModel
|
||||
|
||||
owner_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("companies.id"), nullable=False
|
||||
@@ -184,6 +190,7 @@ class Companies(CrudCollection, SelectAction):
|
||||
__exclude__fields__ = ["is_blacklist", "is_commercial"]
|
||||
__access_by__ = []
|
||||
__many__table__ = RelationshipDutyCompany
|
||||
__language_model__ = CompaniesLanguageModel
|
||||
# __explain__ = AbstractCompany()
|
||||
|
||||
formal_name: Mapped[str] = mapped_column(
|
||||
|
||||
Reference in New Issue
Block a user