maleo-foundation 0.0.54__py3-none-any.whl → 0.0.56__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- maleo_foundation/db/database.py +13 -14
- maleo_foundation/models/schemas/general.py +3 -0
- maleo_foundation/models/transfers/parameters/general.py +3 -1
- {maleo_foundation-0.0.54.dist-info → maleo_foundation-0.0.56.dist-info}/METADATA +1 -1
- {maleo_foundation-0.0.54.dist-info → maleo_foundation-0.0.56.dist-info}/RECORD +7 -7
- {maleo_foundation-0.0.54.dist-info → maleo_foundation-0.0.56.dist-info}/WHEEL +0 -0
- {maleo_foundation-0.0.54.dist-info → maleo_foundation-0.0.56.dist-info}/top_level.txt +0 -0
maleo_foundation/db/database.py
CHANGED
|
@@ -4,33 +4,32 @@ from uuid import uuid4
|
|
|
4
4
|
from maleo_foundation.enums import BaseEnums
|
|
5
5
|
from maleo_foundation.utils.formatter.case import CaseFormatter
|
|
6
6
|
|
|
7
|
-
Base = declarative_base() #* Correct way to define a declarative base
|
|
8
|
-
|
|
9
7
|
class DatabaseManager:
|
|
10
|
-
class
|
|
11
|
-
__abstract__ = True
|
|
8
|
+
class BaseMixin:
|
|
9
|
+
__abstract__ = True
|
|
12
10
|
|
|
13
11
|
@declared_attr
|
|
14
12
|
def __tablename__(cls) -> str:
|
|
15
|
-
"""Automatically generates table name (in snake_case) based on class name."""
|
|
16
13
|
return CaseFormatter.to_snake_case(cls.__name__)
|
|
17
14
|
|
|
18
15
|
#* ----- ----- Common columns definition ----- ----- *#
|
|
19
16
|
|
|
20
17
|
#* Identifiers
|
|
21
|
-
id = Column(
|
|
22
|
-
uuid = Column(
|
|
18
|
+
id = Column(Integer, primary_key=True)
|
|
19
|
+
uuid = Column(UUID, default=uuid4, unique=True, nullable=False)
|
|
23
20
|
|
|
24
21
|
#* Timestamps
|
|
25
|
-
created_at = Column(
|
|
26
|
-
updated_at = Column(
|
|
27
|
-
deleted_at = Column(
|
|
28
|
-
restored_at = Column(
|
|
29
|
-
deactivated_at = Column(
|
|
30
|
-
activated_at = Column(
|
|
22
|
+
created_at = Column(TIMESTAMP(timezone=True), server_default=func.now(), nullable=False)
|
|
23
|
+
updated_at = Column(TIMESTAMP(timezone=True), server_default=func.now(), onupdate=func.now(), nullable=False)
|
|
24
|
+
deleted_at = Column(TIMESTAMP(timezone=True))
|
|
25
|
+
restored_at = Column(TIMESTAMP(timezone=True))
|
|
26
|
+
deactivated_at = Column(TIMESTAMP(timezone=True))
|
|
27
|
+
activated_at = Column(TIMESTAMP(timezone=True), server_default=func.now(), nullable=False)
|
|
31
28
|
|
|
32
29
|
#* Statuses
|
|
33
|
-
status = Column(
|
|
30
|
+
status = Column(Enum(BaseEnums.StatusType, name="statustype"), default=BaseEnums.StatusType.ACTIVE, nullable=False)
|
|
31
|
+
|
|
32
|
+
Base = declarative_base() #* Correct way to define a declarative base
|
|
34
33
|
|
|
35
34
|
#* Explicitly define the type of metadata
|
|
36
35
|
metadata:MetaData = Base.metadata
|
|
@@ -44,6 +44,9 @@ class BaseGeneralSchemas:
|
|
|
44
44
|
class StatusUpdate(BaseModel):
|
|
45
45
|
action:BaseEnums.StatusUpdateAction = Field(..., description="Status update's action to be executed")
|
|
46
46
|
|
|
47
|
+
class Status(BaseModel):
|
|
48
|
+
status:BaseEnums.StatusType = Field(..., description="Status")
|
|
49
|
+
|
|
47
50
|
class Expand(BaseModel):
|
|
48
51
|
expand:BaseTypes.OptionalListOfStrings = Field(None, description="Expanded field(s)")
|
|
49
52
|
|
|
@@ -14,7 +14,7 @@ maleo_foundation/clients/google/cloud/storage.py,sha256=y_HAsbcGSnu5sxZPxaQWFWvO
|
|
|
14
14
|
maleo_foundation/clients/utils/__init__.py,sha256=hChEGABHH4tOFxPRcpxmlhkM9PgF18M7wXapH88hpu4,131
|
|
15
15
|
maleo_foundation/clients/utils/logger.py,sha256=QhxljzrvNY_gXAHCqaOUJJAgwvvcE9v3IQK6AWYxzM4,1144
|
|
16
16
|
maleo_foundation/db/__init__.py,sha256=fFqGxpsiowiws70AqOfcOWFhwaahfOj9_05JSJ0iRaE,107
|
|
17
|
-
maleo_foundation/db/database.py,sha256=
|
|
17
|
+
maleo_foundation/db/database.py,sha256=4UXY6nRDAf8N_ymzKTT2UXiIuXiQ0NL_V3wT5obPEeU,1663
|
|
18
18
|
maleo_foundation/db/engine.py,sha256=kw2SMMiWy5KARquh4TLk7v6HwlHW97lUIUvqdFbhNxk,1600
|
|
19
19
|
maleo_foundation/db/session.py,sha256=tI13DJ6rLo8FOpSIFZrmD4dbuxY_c0RTjwEGb76ZOo0,2681
|
|
20
20
|
maleo_foundation/expanded_types/__init__.py,sha256=RohoIQCiMvo2g6Jacq2dlqNXg3WLmRc-TD8nvMsyDKs,275
|
|
@@ -27,13 +27,13 @@ maleo_foundation/middlewares/cors.py,sha256=9uvBvY2N6Vxa9RP_YtESxcWo6Doi6uS0lzAG
|
|
|
27
27
|
maleo_foundation/models/__init__.py,sha256=AaKehO7c1HyKhoTGRmNHDddSeBXkW-_YNrpOGBu8Ms8,246
|
|
28
28
|
maleo_foundation/models/responses.py,sha256=ePz7yNEYVCNxxrQlj_dnWXspv1HAnBAHCQfyaaqTHdo,4541
|
|
29
29
|
maleo_foundation/models/schemas/__init__.py,sha256=Xj8Ahsqyra-fmEaVcGPok5GOOsPQlKcknHYMvbjvENA,277
|
|
30
|
-
maleo_foundation/models/schemas/general.py,sha256=
|
|
30
|
+
maleo_foundation/models/schemas/general.py,sha256=AKrO54sMh93Gk0RpDDofbVS67TqO5khz31Zw8V6sj4U,7114
|
|
31
31
|
maleo_foundation/models/schemas/parameter.py,sha256=K47z2NzmTEhUiOfRiRLyRPXoQurbWsKBL7ObXAxIWRY,2100
|
|
32
32
|
maleo_foundation/models/schemas/result.py,sha256=V3dljS2AdtWW4Pf8YsnQuiCylN1bZtEY1AtYC7okWuI,1747
|
|
33
33
|
maleo_foundation/models/transfers/__init__.py,sha256=B8oCZHE3NTsrJ_rviSXaDsuc-gc25jpjuhJO40lpQiE,222
|
|
34
34
|
maleo_foundation/models/transfers/parameters/__init__.py,sha256=oKW4RPIEISISRjsJzD8lsCGY1HhZRTzshPpWHcJu86k,353
|
|
35
35
|
maleo_foundation/models/transfers/parameters/client.py,sha256=tn_Hwa-k-Utp5rODe7GylqZB8djIKKupgkUFscYCyLc,4059
|
|
36
|
-
maleo_foundation/models/transfers/parameters/general.py,sha256=
|
|
36
|
+
maleo_foundation/models/transfers/parameters/general.py,sha256=H8D7WUrHm0gzTaegO98VIxBskdAycfyXGSssjllMn6M,464
|
|
37
37
|
maleo_foundation/models/transfers/parameters/service.py,sha256=d7Xy_R-DtLBRozyD6r8YnTiuKlE3sb9HMDCCq9WmUbY,6757
|
|
38
38
|
maleo_foundation/models/transfers/results/__init__.py,sha256=0_8uJ1IQW87RZ4nIxzWkQVi3Fxb7B8myZTngXfoxgNc,241
|
|
39
39
|
maleo_foundation/models/transfers/results/client/__init__.py,sha256=xBRuY0NUIPpQEGQ2qoBnqLZGX4W1YSrQ0VnDf5OYJBo,290
|
|
@@ -52,7 +52,7 @@ maleo_foundation/utils/logger.py,sha256=978P57JOhGR-WIu7xdPXBIwd3JrfLLA8WerVzxhE
|
|
|
52
52
|
maleo_foundation/utils/query.py,sha256=qKNcjf5J7_Q7NjA79BO6_TpZVdYcF8YIO68F9M501ew,4398
|
|
53
53
|
maleo_foundation/utils/formatter/__init__.py,sha256=iKf5YCbEdg1qKnFHyKqqcQbqAqEeRUf8mhI3v3dQoj8,78
|
|
54
54
|
maleo_foundation/utils/formatter/case.py,sha256=TmvvlfzGdC_omMTB5vAa40TZBxQ3hnr-SYeo0M52Rlg,1352
|
|
55
|
-
maleo_foundation-0.0.
|
|
56
|
-
maleo_foundation-0.0.
|
|
57
|
-
maleo_foundation-0.0.
|
|
58
|
-
maleo_foundation-0.0.
|
|
55
|
+
maleo_foundation-0.0.56.dist-info/METADATA,sha256=sryTq06RYmaKprHNVqjq0WrECjJCl2LRQWJ2e4KMmW4,3160
|
|
56
|
+
maleo_foundation-0.0.56.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
|
57
|
+
maleo_foundation-0.0.56.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
|
|
58
|
+
maleo_foundation-0.0.56.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|