first commit

This commit is contained in:
2024-11-07 17:44:29 +03:00
commit 643d6d8f65
247 changed files with 420800 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
from tasks2events.common_tasks.default_user import AuthDefaultEventBlock
from tasks2events.employee_tasks.super_user import SuperUserEventBlock
from tasks2events.occupant_tasks.build_manager import BuildManager
from tasks2events.occupant_tasks.build_owner import BuildOwner
from tasks2events.occupant_tasks.build_resident import BuildResident
from tasks2events.occupant_tasks.build_tenant import BuildTenant
from tasks2events.occupant_tasks.build_represent import BuildRepresent
from tasks2events.occupant_tasks.meeting_writer import BuildMeetingWriter
from tasks2events.occupant_tasks.meeting_advisor import BuildMeetingAdvisor
from tasks2events.occupant_tasks.meeting_attendance import BuildMeetingAttendance
from tasks2events.occupant_tasks.meeting_president import BuildMeetingPresident
from tasks2events.occupant_tasks.meeting_voted_president import (
BuildMeetingVotedPresident,
)
__all__ = [
"AuthDefaultEventBlock",
"SuperUserEventBlock",
"BuildManager",
"BuildOwner",
"BuildResident",
"BuildTenant",
"BuildRepresent",
"BuildMeetingWriter",
"BuildMeetingPresident",
"BuildMeetingAdvisor",
"BuildMeetingAttendance",
"BuildMeetingVotedPresident",
]

View File

@@ -0,0 +1,22 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class AuthDefaultEventBlock(AddEventFunctionality):
service_code = "AUTH"
related_code = "DF-USER"
events = [
{"function_code": "e672846d-cc45-4d97-85d5-6f96747fac67"},
{"function_code": "cee96b9b-8487-4e9f-aaed-2e8c79687bf9"},
{"function_code": "48379bb2-ba81-4d8e-a9dd-58837cfcbf67"},
{"function_code": "f09f7c1a-bee6-4e32-8444-962ec8f39091"},
{"function_code": "87a15ade-3474-4206-b574-bbf8580cbb14"},
{"function_code": "c519f9af-92e1-47b2-abf7-5a3316d075f7"},
{"function_code": "8b586848-2fb3-4161-abbe-642157eec7ce"},
{"function_code": "5cc22e4e-a0f7-4077-be41-1871feb3dfd1"},
{"function_code": "c90f3334-10c9-4181-b5ff-90d98a0287b2"},
{"function_code": "e3ca6e24-b9f8-4127-949c-3bfa364e3513"},
{"function_code": "c140cd5f-307f-4046-a93e-3ade032a57a7"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)

View File

@@ -0,0 +1,16 @@
class AddEventFunctionality:
@classmethod
def retrieve_events(cls, events) -> list[tuple[int, str]]:
from database_sql_models import Events
from sqlalchemy import select
get_event_ids = Events.session.execute(
select(Events.id, Events.uu_id).where(
Events.function_code.in_([event["function_code"] for event in events])
)
).all()
if get_event_ids:
return [(get_event[0], str(get_event[1])) for get_event in get_event_ids]
else:
raise Exception("No event found")

View File

@@ -0,0 +1,83 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class SuperUserEventBlock(AddEventFunctionality):
service_code = "SRE-SUE"
related_code = "SUE"
events = [
{"function_code": "2d1513f4-44ed-4fa3-84d1-dfbd0eadf9a1"},
{"function_code": "0a05f03c-6ed8-4230-a4ff-6e7cf886909b"},
{"function_code": "e05cf22c-16c4-450b-86c8-417896a26afc"},
{"function_code": "3ae16d66-090b-4d27-b567-cce1b10a1c3b"},
{"function_code": "1483a8a2-d244-4593-b9f8-f1b4bcbefcd5"},
{"function_code": "8eb50c24-4bdc-4309-9836-f7048daee409"},
{"function_code": "d08a9470-1eb0-4890-a9e8-b6686239d7e9"},
{"function_code": "d26a1a3c-eaeb-4d01-b35b-a5ed714e29c0"},
{"function_code": "68b3b5ed-b74c-4a27-820f-3959214e94e9"},
{"function_code": "a2271854-6b90-43da-a440-a62b70d90528"},
{"function_code": "5ad38a66-1189-451e-babb-77de2d63d757"},
{"function_code": "e3876bfe-8847-4dea-ae36-e709f7431930"},
{"function_code": "6320d696-1fd1-49f9-860a-8f22e5b8a68d"},
{"function_code": "76f11a08-5f4a-4e1f-961f-aaef21699acd"},
{"function_code": "41ea7f29-006a-4310-b5c4-b2a0e1a504bd"},
{"function_code": "f6900cb5-ac5b-478e-8e7c-fa87e65cd2e5"},
{"function_code": "2cb90331-c1b4-4923-8314-8111326b621a"},
{"function_code": "d8bd3985-7f3b-4267-a74e-d5017e4ea9f8"},
{"function_code": "4172706f-06c9-4c38-9ac8-59085a72f80a"},
{"function_code": "1e272e4f-6c1e-418b-91a7-be8b06c875da"},
{"function_code": "44b72beb-53a8-407b-a12a-76e74b65794d"},
{"function_code": "30c54cce-3303-4d36-959a-b64e383ae177"},
{"function_code": "3524ae42-0825-4af7-be85-7c890a4f65d3"},
{"function_code": "3fc77829-f1ee-4511-a2ca-582daa03125b"},
{"function_code": "ca81c6d1-975a-4288-a27b-1069aea84afe"},
{"function_code": "23231c7d-4ff2-4b39-b71b-ea350d31fadf"},
{"function_code": "c6ea200e-fa17-4393-b390-37f5337c9c65"},
{"function_code": "ad952647-bcf8-482d-9e05-b2ee8086483f"},
{"function_code": "d5c7b5c4-7b4e-4d5b-8e3b-2b9c5f5d0c0b"},
{"function_code": "cb677c92-6b05-4122-af5c-12766fae8095"},
{"function_code": "1e1632c3-bb0e-46a5-8e45-da3f6d88ac43"},
{"function_code": "9015a076-d78c-463d-9474-ea343a125fb8"},
{"function_code": "8446ce0b-9310-4b9f-93e2-61f56a9dacd1"},
{"function_code": "8984a519-99bf-4f25-8f34-2e1aebba468c"},
{"function_code": "8f619257-19fd-404f-b713-7392c588dc36"},
{"function_code": "7724cfbb-c0ee-4261-959b-61b84e88a34f"},
{"function_code": "5329f35d-ff9d-4656-a831-ba9c8204e483"},
{"function_code": "b1cd7c0a-1458-472b-894f-3adc857c8512"},
{"function_code": "5eb04057-7a74-4555-b2c6-14eda32dae89"},
{"function_code": "caf914fa-0899-4b0b-a85a-3d40fdaa06a5"},
{"function_code": "ffdc445f-da10-4ce4-9531-d2bdb9a198ae"},
{"function_code": "b0e55a7e-af81-468c-b46c-a6b3a6b68d5d"},
{"function_code": "1f9c3a9c-e5bd-4dcd-9b9a-3742d7e03a27"},
{"function_code": "68b3b5ed-b74c-4a27-820f-3959214e94e9"},
{"function_code": "a2271854-6b90-43da-a440-a62b70d90528"},
{"function_code": "5ad38a66-1189-451e-babb-77de2d63d757"},
{"function_code": "e3876bfe-8847-4dea-ae36-e709f7431930"},
{"function_code": "9c251d7d-da70-4d63-a72c-e69c26270442"},
{"function_code": "6f1406ac-577d-4f2c-8077-71fff2252c5f"},
{"function_code": "88d37b78-1ac4-4513-9d25-090ac3a24f31"},
{"function_code": "df18e489-a63c-477f-984c-aa52d30640ad"},
{"function_code": "e0ac1269-e9a7-4806-9962-219ac224b0d0"},
{"function_code": "b860e37a-e19b-4c45-9543-461241f7587c"},
{"function_code": "fb403f69-11ed-4f4f-ad71-5e6fb4a793d2"},
{"function_code": "58fdf95e-2110-4ed6-9c26-95f4be87eaee"},
{"function_code": "70b4666f-4ceb-46ec-b89e-24be8712f0e7"},
{"function_code": "8fd04d94-68fb-4a07-9549-8b47aee3a870"},
{"function_code": "b78ca45c-b9f4-41f6-9ddb-2c6f2faa2570"},
{"function_code": "5c10d6ae-2aee-4243-a7c3-94826d028d13"},
{"function_code": "0a68cb44-271a-4829-81f6-cd99a5f326b4"},
{"function_code": "6bc7035c-3b53-4c0a-8cc9-1ec9c6af1e29"},
{"function_code": "7b58ed84-9a65-4588-994d-30df8366b050"},
{"function_code": "eb36de59-8268-4d96-80b6-5d01c12bf0b1"},
{"function_code": "dce10509-0da5-46fb-af3c-a81d54d5481c"},
{"function_code": "f0fdfe1b-806b-4175-ad50-a1a165c0dfb7"},
{"function_code": "42328809-b516-477b-82cc-2d6fadf28843"},
{"function_code": "5c10d6ae-2aee-4243-a7c3-94826d028d13"},
{"function_code": "0a68cb44-271a-4829-81f6-cd99a5f326b4"},
{"function_code": "6bc7035c-3b53-4c0a-8cc9-1ec9c6af1e29"},
{"function_code": "7b58ed84-9a65-4588-994d-30df8366b050"},
{"function_code": "5702f0a9-fe8f-4aae-922e-6e04b497ef6a"},
{"function_code": "c93a3009-65a0-498d-9191-04484d5cde81"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)

View File

@@ -0,0 +1,37 @@
"""
Toplantı Başkanı Toplantı Başkanı MT-PRS Toplantı
Toplantı Katip Toplantıda tutanak tutan kişi MT-WRT Toplantı
Toplantı Katılımcısı Toplantıda sadece katılan kişi MT-ATT Toplantı
Toplantı Danışman Toplantıda danışmanlık yapan kişi MT-ADV Toplantı
Daire Sahibi Daire Sahibi FL-OWN Daire
Daire Kiracısı Daire Kiracısı FL-TEN Daire
Daire Sakini Daire Sakini FL-RES Daire
Daire Sakini Vekili Daire Sakini Vekili FL-REP Daire
Bina Avukatı Bina Avukatı BU-ATT Bina
Bina Avukatı Yardımcısı Bina Avukatı Yardımcısı BU-ATA Bina
Bina Denetmen Yardımcısı Bina Denetmen Yardımcısı BU-SPA Bina
Bina Denetmeni Bina Denetmeni BU-SPV Bina
Bina Yönetici Yardımcısı Bina Yönetici Yardımcısı BU-MNA Bina
Bina Yöneticisi Bina Yöneticisi BU-MNG Bina
Bina Muhasabecisi Bina Muhasabecisi BU-ACC Bina
"""
MT_PRS = []
MT_WRT = []
MT_ATT = []
MT_ADV = []
FL_OWN = []
FL_TEN = []
FL_RES = []
FL_REP = []
BU_ATT = []
BU_ATA = []
BU_SPA = []
BU_SPV = []
BU_MNA = []
BU_ACC = []

View File

@@ -0,0 +1,21 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class BuildManager(AddEventFunctionality):
service_code = "SRO-BU-MNG"
related_code = "BU-MNG"
events = [
{"function_code": "dce10509-0da5-46fb-af3c-a81d54d5481c"},
{"function_code": "0d2bc5c9-d4b1-4951-8305-69da4a687fdc"},
{"function_code": "0a68cb44-271a-4829-81f6-cd99a5f326b4"},
{"function_code": "5c10d6ae-2aee-4243-a7c3-94826d028d13"},
{"function_code": "d0bfa20c-841d-421c-98e6-d308f938d16a"},
{"function_code": "68b3b5ed-b74c-4a27-820f-3959214e94e9"},
{"function_code": "f6900cb5-ac5b-478e-8e7c-fa87e65cd2e5"},
{"function_code": "92413636-53a8-4a05-842c-1485a64e00d1"},
{"function_code": "bdcba521-0116-441c-ace1-84c5b68c86c7"},
{"function_code": "c0b65098-9c79-4212-b1d0-c7e7836cf141"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)

View File

@@ -0,0 +1,13 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class BuildOwner(AddEventFunctionality):
service_code = "SRO-FL-OWN"
related_code = "FL-OWN"
events = [
{"function_code": "bdcba521-0116-441c-ace1-84c5b68c86c7"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)

View File

@@ -0,0 +1,13 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class BuildRepresent(AddEventFunctionality):
service_code = "SRO-FL-REP"
related_code = "FL-REP"
events = [
{"function_code": "bdcba521-0116-441c-ace1-84c5b68c86c7"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)

View File

@@ -0,0 +1,12 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class BuildResident(AddEventFunctionality):
service_code = "SRO-FL-RES"
related_code = "FL-RES"
events = [
{"function_code": "bdcba521-0116-441c-ace1-84c5b68c86c7"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)

View File

@@ -0,0 +1,12 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class BuildTenant(AddEventFunctionality):
service_code = "SRO-FL-TEN"
related_code = "FL-TEN"
events = [
{"function_code": "bdcba521-0116-441c-ace1-84c5b68c86c7"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)

View File

@@ -0,0 +1,13 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class BuildMeetingAdvisor(AddEventFunctionality):
service_code = "SRO-MT-ADV"
related_code = "MT-ADV"
events = [
{"function_code": "eb36de59-8268-4d96-80b6-5d01c12bf0b1"},
{"function_code": "5c10d6ae-2aee-4243-a7c3-94826d028d13"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)

View File

@@ -0,0 +1,13 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class BuildMeetingAttendance(AddEventFunctionality):
service_code = "SRO-MT-ATT"
related_code = "MT-ATT"
events = [
{"function_code": "eb36de59-8268-4d96-80b6-5d01c12bf0b1"},
{"function_code": "5c10d6ae-2aee-4243-a7c3-94826d028d13"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)

View File

@@ -0,0 +1,13 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class BuildMeetingPresident(AddEventFunctionality):
service_code = "SRO-MT-PRS"
related_code = "MT-PRS"
events = [
{"function_code": "eb36de59-8268-4d96-80b6-5d01c12bf0b1"},
{"function_code": "5c10d6ae-2aee-4243-a7c3-94826d028d13"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)

View File

@@ -0,0 +1,12 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class BuildMeetingVotedPresident(AddEventFunctionality):
service_code = "SRO-MT-VPR"
related_code = "MT-VPR"
events = [
{"function_code": "eb36de59-8268-4d96-80b6-5d01c12bf0b1"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)

View File

@@ -0,0 +1,14 @@
from api_events.tasks2events.default_abstract import AddEventFunctionality
class BuildMeetingWriter(AddEventFunctionality):
service_code = "SRO-MT-WRT"
related_code = "MT-WRT"
events = [
{"function_code": "dce10509-0da5-46fb-af3c-a81d54d5481c"},
{"function_code": "eb36de59-8268-4d96-80b6-5d01c12bf0b1"},
{"function_code": "5c10d6ae-2aee-4243-a7c3-94826d028d13"},
]
def __new__(cls, *args, **kwargs):
return super().retrieve_events(cls.events)