maleo-foundation 0.0.61__py3-none-any.whl → 0.0.62__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.
@@ -5,31 +5,31 @@ from uuid import uuid4
5
5
  from maleo_foundation.enums import BaseEnums
6
6
  from maleo_foundation.utils.formatter.case import CaseFormatter
7
7
 
8
- class DatabaseManager:
9
- class BaseMixin:
10
- __abstract__ = True
8
+ class BaseMixin:
9
+ __abstract__ = True
11
10
 
12
- @declared_attr
13
- def __tablename__(cls) -> str:
14
- return CaseFormatter.to_snake_case(cls.__name__)
11
+ @declared_attr
12
+ def __tablename__(cls) -> str:
13
+ return CaseFormatter.to_snake_case(cls.__name__)
15
14
 
16
- #* ----- ----- Common columns definition ----- ----- *#
15
+ #* ----- ----- Common columns definition ----- ----- *#
17
16
 
18
- #* Identifiers
19
- id = Column(Integer, primary_key=True)
20
- uuid = Column(UUID, default=uuid4, unique=True, nullable=False)
17
+ #* Identifiers
18
+ id = Column(Integer, primary_key=True)
19
+ uuid = Column(UUID, default=uuid4, unique=True, nullable=False)
21
20
 
22
- #* Timestamps
23
- created_at = Column(TIMESTAMP(timezone=True), server_default=func.now(), nullable=False)
24
- updated_at = Column(TIMESTAMP(timezone=True), server_default=func.now(), onupdate=func.now(), nullable=False)
25
- deleted_at = Column(TIMESTAMP(timezone=True))
26
- restored_at = Column(TIMESTAMP(timezone=True))
27
- deactivated_at = Column(TIMESTAMP(timezone=True))
28
- activated_at = Column(TIMESTAMP(timezone=True), server_default=func.now(), nullable=False)
21
+ #* Timestamps
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)
29
28
 
30
- #* Statuses
31
- status = Column(Enum(BaseEnums.StatusType, name="statustype"), default=BaseEnums.StatusType.ACTIVE, nullable=False)
29
+ #* Statuses
30
+ status = Column(Enum(BaseEnums.StatusType, name="statustype"), default=BaseEnums.StatusType.ACTIVE, nullable=False)
32
31
 
32
+ class DatabaseManager:
33
33
  Base:DeclarativeMeta = declarative_base() #* Correct way to define a declarative base
34
34
 
35
35
  #* Explicitly define the type of metadata
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.0.61
3
+ Version: 0.0.62
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -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=6i-KLR4WCS1mYThGVr_xwZhAKgzflPii0PITEUZlu6c,1724
17
+ maleo_foundation/db/database.py,sha256=wrgNUCyScSbkBngaYjckZaePRlw84Z_srlXPsVn4yto,1652
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
@@ -52,7 +52,7 @@ maleo_foundation/utils/logger.py,sha256=978P57JOhGR-WIu7xdPXBIwd3JrfLLA8WerVzxhE
52
52
  maleo_foundation/utils/query.py,sha256=ODQ3adOYQNj5E2cRW9ytbjBz56nEDcnfq8mQ6YZbCCM,4375
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.61.dist-info/METADATA,sha256=SnLvlO9AYkgkOTBoWAfWEMc_83QZhdM0ghkLE49_8T0,3160
56
- maleo_foundation-0.0.61.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
57
- maleo_foundation-0.0.61.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
58
- maleo_foundation-0.0.61.dist-info/RECORD,,
55
+ maleo_foundation-0.0.62.dist-info/METADATA,sha256=w396sabhoQLXTy_eD5QHWshrvlq-Gj7yuA-ufxCGh5o,3160
56
+ maleo_foundation-0.0.62.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
57
+ maleo_foundation-0.0.62.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
58
+ maleo_foundation-0.0.62.dist-info/RECORD,,