maleo-identity 0.0.93__py3-none-any.whl → 0.0.95__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.

Potentially problematic release.


This version of maleo-identity might be problematic. Click here for more details.

@@ -18,7 +18,7 @@ class Email(BaseModel, Generic[OptStrT]):
18
18
 
19
19
 
20
20
  class Emails(BaseModel, Generic[OptListOfStrsT]):
21
- emais: Annotated[OptListOfStrsT, Field(..., description="User's Emails")]
21
+ emails: Annotated[OptListOfStrsT, Field(..., description="User's Emails")]
22
22
 
23
23
 
24
24
  class Phone(BaseModel, Generic[OptStrT]):
maleo/identity/models.py CHANGED
@@ -206,6 +206,11 @@ class UserProfile(
206
206
  name="avatar_name", type_=Text, nullable=False
207
207
  )
208
208
 
209
+ # Relationships
210
+ @declared_attr
211
+ def user(cls) -> Mapped["User"]:
212
+ return relationship("User", back_populates="profile")
213
+
209
214
 
210
215
  class UserSystemRole(
211
216
  DataStatus,
@@ -229,6 +234,11 @@ class UserSystemRole(
229
234
  UniqueConstraint("user_id", "system_role", name="uq_user_system_role"),
230
235
  )
231
236
 
237
+ # Relationships
238
+ @declared_attr
239
+ def user(cls) -> Mapped["User"]:
240
+ return relationship("User", back_populates="system_roles")
241
+
232
242
 
233
243
  class User(
234
244
  DataStatus,
@@ -259,6 +269,18 @@ class User(
259
269
  "UserOrganization", back_populates="user", cascade="all, delete-orphan"
260
270
  )
261
271
 
272
+ @declared_attr
273
+ def profile(cls) -> Mapped["UserProfile | None"]:
274
+ return relationship(
275
+ "UserProfile", back_populates="user", cascade="all, delete-orphan"
276
+ )
277
+
278
+ @declared_attr
279
+ def system_roles(cls) -> Mapped["UserSystemRole | None"]:
280
+ return relationship(
281
+ "UserSystemRole", back_populates="user", cascade="all, delete-orphan"
282
+ )
283
+
262
284
 
263
285
  class UserOrganization(
264
286
  DataStatus,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo-identity
3
- Version: 0.0.93
3
+ Version: 0.0.95
4
4
  Summary: MaleoIdentity service package
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: Proprietary
@@ -1,5 +1,5 @@
1
1
  maleo/identity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- maleo/identity/models.py,sha256=9XTpaozr0l9s6fKh0obwV3dpKKThFT30V9tDxH8Kdc8,9980
2
+ maleo/identity/models.py,sha256=jCDCBx0jImvFSKxZ3qoIIh5NkjDjuZuFhpACXDU9ONo,10658
3
3
  maleo/identity/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  maleo/identity/constants/organization.py,sha256=9GXKRvYRFMIWX56VhpHw_AAuQmelwQwZT4_3hPusw7U,607
5
5
  maleo/identity/constants/organization_registration_code.py,sha256=dseUWnG3-rQv-e4d4wWpMmAHEgDLznfV1VXGMQFXM7Y,783
@@ -13,7 +13,7 @@ maleo/identity/enums/user_profile.py,sha256=LgX7Ct-MAfx7o0W8MICzpHMfDhi7wpiJfRsz
13
13
  maleo/identity/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  maleo/identity/mixins/organization.py,sha256=KMl7Zz_SXu6SvF_1fTibN2vORFGWH7P22cxS_T4KXmE,574
15
15
  maleo/identity/mixins/organization_registration_code.py,sha256=G-kgdf2IzKENEyZcV6IXT69eAemnqR1vph3hhG3l1y4,508
16
- maleo/identity/mixins/user.py,sha256=Ch1j3swz6LuOsz9TSFGO2g6b1tJUPjFj_er8YUsBZFM,1053
16
+ maleo/identity/mixins/user.py,sha256=UHoMgFJXptE9x9QsR07KG2bgp5OlCNqvYjEtP9S3TIY,1054
17
17
  maleo/identity/mixins/user_profile.py,sha256=WhAEoeaqe1zmLr_s5n8Du4DXDlKFae-biXjOWHTg5I4,1667
18
18
  maleo/identity/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  maleo/identity/schemas/common.py,sha256=-QR1UjSk7onu9CHG0KKweB9Tw2_ZuAUeMtOTE-CaBPs,6590
@@ -26,8 +26,8 @@ maleo/identity/types/organization.py,sha256=wLu9QcVDfiMke3-Smfs-LI3zV5QiMuCKkoa0
26
26
  maleo/identity/types/organization_registration_code.py,sha256=wLu9QcVDfiMke3-Smfs-LI3zV5QiMuCKkoa0CCRmh4s,93
27
27
  maleo/identity/types/user.py,sha256=wLu9QcVDfiMke3-Smfs-LI3zV5QiMuCKkoa0CCRmh4s,93
28
28
  maleo/identity/types/user_profile.py,sha256=wLu9QcVDfiMke3-Smfs-LI3zV5QiMuCKkoa0CCRmh4s,93
29
- maleo_identity-0.0.93.dist-info/licenses/LICENSE,sha256=aftGsecnk7TWVX-7KW94FqK4Syy6YSZ8PZEF7EcIp3M,2621
30
- maleo_identity-0.0.93.dist-info/METADATA,sha256=RiAkVhWEyfxfQ-MuN5FVTBNLXF8FwMf7EIXuPtjzek4,3546
31
- maleo_identity-0.0.93.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
32
- maleo_identity-0.0.93.dist-info/top_level.txt,sha256=3Tpd1siVsfYoeI9FEOJNYnffx_shzZ3wsPpTvz5bljc,6
33
- maleo_identity-0.0.93.dist-info/RECORD,,
29
+ maleo_identity-0.0.95.dist-info/licenses/LICENSE,sha256=aftGsecnk7TWVX-7KW94FqK4Syy6YSZ8PZEF7EcIp3M,2621
30
+ maleo_identity-0.0.95.dist-info/METADATA,sha256=zAa-RsNBni146uTmL59HYfg0_Cam3zxUvEW3eC1ZCao,3546
31
+ maleo_identity-0.0.95.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
32
+ maleo_identity-0.0.95.dist-info/top_level.txt,sha256=3Tpd1siVsfYoeI9FEOJNYnffx_shzZ3wsPpTvz5bljc,6
33
+ maleo_identity-0.0.95.dist-info/RECORD,,