constec 0.6.0__tar.gz → 0.7.1__tar.gz

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.
Files changed (45) hide show
  1. {constec-0.6.0 → constec-0.7.1}/PKG-INFO +1 -1
  2. constec-0.7.1/constec/db/migrations/0009_rename_user_to_companyuser.py +40 -0
  3. {constec-0.6.0 → constec-0.7.1}/constec/db/models/__init__.py +11 -2
  4. {constec-0.6.0 → constec-0.7.1}/constec/db/models/automation.py +4 -4
  5. {constec-0.6.0 → constec-0.7.1}/constec/db/models/group.py +2 -2
  6. {constec-0.6.0 → constec-0.7.1}/constec/db/models/user.py +11 -11
  7. {constec-0.6.0 → constec-0.7.1}/constec.egg-info/PKG-INFO +1 -1
  8. {constec-0.6.0 → constec-0.7.1}/constec.egg-info/SOURCES.txt +1 -0
  9. {constec-0.6.0 → constec-0.7.1}/pyproject.toml +1 -1
  10. {constec-0.6.0 → constec-0.7.1}/LICENSE +0 -0
  11. {constec-0.6.0 → constec-0.7.1}/README.md +0 -0
  12. {constec-0.6.0 → constec-0.7.1}/constec/db/__init__.py +0 -0
  13. {constec-0.6.0 → constec-0.7.1}/constec/db/apps.py +0 -0
  14. {constec-0.6.0 → constec-0.7.1}/constec/db/migrations/0001_initial.py +0 -0
  15. {constec-0.6.0 → constec-0.7.1}/constec/db/migrations/0002_module_level.py +0 -0
  16. {constec-0.6.0 → constec-0.7.1}/constec/db/migrations/0003_remove_module_level.py +0 -0
  17. {constec-0.6.0 → constec-0.7.1}/constec/db/migrations/0004_rename_entities_company_cuit_idx_entities_company_e2c50f_idx_and_more.py +0 -0
  18. {constec-0.6.0 → constec-0.7.1}/constec/db/migrations/0005_event.py +0 -0
  19. {constec-0.6.0 → constec-0.7.1}/constec/db/migrations/0006_automation_trigger_action_executionlog_notificationtemplate.py +0 -0
  20. {constec-0.6.0 → constec-0.7.1}/constec/db/migrations/0007_add_organization_to_automations.py +0 -0
  21. {constec-0.6.0 → constec-0.7.1}/constec/db/migrations/0008_refactor_creator_fields.py +0 -0
  22. {constec-0.6.0 → constec-0.7.1}/constec/db/migrations/__init__.py +0 -0
  23. {constec-0.6.0 → constec-0.7.1}/constec/db/models/base.py +0 -0
  24. {constec-0.6.0 → constec-0.7.1}/constec/db/models/company.py +0 -0
  25. {constec-0.6.0 → constec-0.7.1}/constec/db/models/contact.py +0 -0
  26. {constec-0.6.0 → constec-0.7.1}/constec/db/models/erp.py +0 -0
  27. {constec-0.6.0 → constec-0.7.1}/constec/db/models/erp_entity.py +0 -0
  28. {constec-0.6.0 → constec-0.7.1}/constec/db/models/flow.py +0 -0
  29. {constec-0.6.0 → constec-0.7.1}/constec/db/models/module.py +0 -0
  30. {constec-0.6.0 → constec-0.7.1}/constec/db/models/organization.py +0 -0
  31. {constec-0.6.0 → constec-0.7.1}/constec/db/models/person.py +0 -0
  32. {constec-0.6.0 → constec-0.7.1}/constec/db/models/session.py +0 -0
  33. {constec-0.6.0 → constec-0.7.1}/constec/db/models/tag.py +0 -0
  34. {constec-0.6.0 → constec-0.7.1}/constec/py.typed +0 -0
  35. {constec-0.6.0 → constec-0.7.1}/constec/services/__init__.py +0 -0
  36. {constec-0.6.0 → constec-0.7.1}/constec/services/encryption.py +0 -0
  37. {constec-0.6.0 → constec-0.7.1}/constec/shared/__init__.py +0 -0
  38. {constec-0.6.0 → constec-0.7.1}/constec/shared/exceptions.py +0 -0
  39. {constec-0.6.0 → constec-0.7.1}/constec/utils/__init__.py +0 -0
  40. {constec-0.6.0 → constec-0.7.1}/constec/utils/cuit.py +0 -0
  41. {constec-0.6.0 → constec-0.7.1}/constec/utils/password.py +0 -0
  42. {constec-0.6.0 → constec-0.7.1}/constec.egg-info/dependency_links.txt +0 -0
  43. {constec-0.6.0 → constec-0.7.1}/constec.egg-info/requires.txt +0 -0
  44. {constec-0.6.0 → constec-0.7.1}/constec.egg-info/top_level.txt +0 -0
  45. {constec-0.6.0 → constec-0.7.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: constec
3
- Version: 0.6.0
3
+ Version: 0.7.1
4
4
  Summary: Base library for the Constec ecosystem - shared utilities, models, and namespace foundation
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/TpmyCT/constec-python
@@ -0,0 +1,40 @@
1
+ # Generated manually - Rename User to CompanyUser for clarity and consistency
2
+
3
+ from django.db import migrations
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+
8
+ dependencies = [
9
+ ('constec_db', '0008_refactor_creator_fields'),
10
+ ]
11
+
12
+ operations = [
13
+ # Rename tables
14
+ migrations.RenameModel(
15
+ old_name='User',
16
+ new_name='CompanyUser',
17
+ ),
18
+ migrations.RenameModel(
19
+ old_name='UserRole',
20
+ new_name='CompanyUserRole',
21
+ ),
22
+ migrations.RenameModel(
23
+ old_name='UserCompanyAccess',
24
+ new_name='CompanyUserAccess',
25
+ ),
26
+
27
+ # Update table names
28
+ migrations.AlterModelTable(
29
+ name='companyuser',
30
+ table='core"."company_users',
31
+ ),
32
+ migrations.AlterModelTable(
33
+ name='companyuserrole',
34
+ table='core"."company_user_roles',
35
+ ),
36
+ migrations.AlterModelTable(
37
+ name='companyuseraccess',
38
+ table='core"."company_user_access',
39
+ ),
40
+ ]
@@ -19,9 +19,14 @@ from .base import UUIDModel
19
19
  # Core models (core schema)
20
20
  from .organization import Organization, OrganizationRole, OrganizationUser
21
21
  from .company import Company
22
- from .user import User, UserRole, UserCompanyAccess
22
+ from .user import CompanyUser, CompanyUserRole, CompanyUserAccess
23
23
  from .person import Person
24
24
  from .group import UserGroup
25
+
26
+ # Backward compatibility aliases
27
+ User = CompanyUser
28
+ UserRole = CompanyUserRole
29
+ UserCompanyAccess = CompanyUserAccess
25
30
  from .contact import ContactType, Contact, PersonContact
26
31
  from .tag import TagCategory, PersonTag, PersonTagged
27
32
  from .module import Module, CompanyModule, OrganizationModule
@@ -54,7 +59,11 @@ __all__ = [
54
59
  'OrganizationUser',
55
60
  # Company
56
61
  'Company',
57
- # User
62
+ # CompanyUser
63
+ 'CompanyUser',
64
+ 'CompanyUserRole',
65
+ 'CompanyUserAccess',
66
+ # Backward compatibility aliases
58
67
  'User',
59
68
  'UserRole',
60
69
  'UserCompanyAccess',
@@ -7,7 +7,7 @@ from django.core.exceptions import ValidationError
7
7
  from .base import UUIDModel
8
8
  from .company import Company
9
9
  from .organization import Organization, OrganizationUser
10
- from .user import User
10
+ from .user import CompanyUser
11
11
 
12
12
 
13
13
  class Automation(UUIDModel):
@@ -56,7 +56,7 @@ class Automation(UUIDModel):
56
56
 
57
57
  # Creator - only ONE of these should be filled (XOR)
58
58
  created_by_user = models.ForeignKey(
59
- User,
59
+ CompanyUser,
60
60
  on_delete=models.CASCADE,
61
61
  null=True,
62
62
  blank=True,
@@ -317,7 +317,7 @@ class ExecutionLog(UUIDModel):
317
317
  related_name='execution_logs'
318
318
  )
319
319
  triggered_by_user = models.ForeignKey(
320
- User,
320
+ CompanyUser,
321
321
  on_delete=models.SET_NULL,
322
322
  null=True,
323
323
  blank=True,
@@ -418,7 +418,7 @@ class NotificationTemplate(UUIDModel):
418
418
 
419
419
  # Creator - only ONE of these should be filled (XOR)
420
420
  created_by_user = models.ForeignKey(
421
- User,
421
+ CompanyUser,
422
422
  on_delete=models.CASCADE,
423
423
  null=True,
424
424
  blank=True,
@@ -1,7 +1,7 @@
1
1
  from django.db import models
2
2
  from .base import UUIDModel
3
3
  from .company import Company
4
- from .user import User
4
+ from .user import CompanyUser
5
5
 
6
6
 
7
7
  class UserGroup(UUIDModel):
@@ -23,7 +23,7 @@ class UserGroup(UUIDModel):
23
23
  blank=True
24
24
  )
25
25
  users = models.ManyToManyField(
26
- User,
26
+ CompanyUser,
27
27
  related_name="groups"
28
28
  )
29
29
 
@@ -3,7 +3,7 @@ from .base import UUIDModel
3
3
  from .company import Company
4
4
 
5
5
 
6
- class User(UUIDModel):
6
+ class CompanyUser(UUIDModel):
7
7
  """User belonging to a company."""
8
8
  company = models.ForeignKey(
9
9
  Company,
@@ -16,13 +16,13 @@ class User(UUIDModel):
16
16
 
17
17
  class Meta:
18
18
  app_label = 'constec_db'
19
- db_table = 'core"."users'
19
+ db_table = 'core"."company_users'
20
20
 
21
21
  def __str__(self):
22
22
  return f"{self.name} ({self.email})"
23
23
 
24
24
 
25
- class UserRole(UUIDModel):
25
+ class CompanyUserRole(UUIDModel):
26
26
  """Role within a company."""
27
27
  company = models.ForeignKey(
28
28
  Company,
@@ -38,17 +38,17 @@ class UserRole(UUIDModel):
38
38
 
39
39
  class Meta:
40
40
  app_label = 'constec_db'
41
- db_table = 'core"."user_roles'
41
+ db_table = 'core"."company_user_roles'
42
42
  unique_together = [['company', 'name']]
43
43
 
44
44
  def __str__(self):
45
45
  return f"{self.name}"
46
46
 
47
47
 
48
- class UserCompanyAccess(UUIDModel):
49
- """Cross-company access: one User can access multiple Companies."""
48
+ class CompanyUserAccess(UUIDModel):
49
+ """Cross-company access: one CompanyUser can access multiple Companies."""
50
50
  user = models.ForeignKey(
51
- User,
51
+ CompanyUser,
52
52
  on_delete=models.CASCADE,
53
53
  related_name="company_accesses",
54
54
  )
@@ -58,16 +58,16 @@ class UserCompanyAccess(UUIDModel):
58
58
  related_name="user_accesses",
59
59
  )
60
60
  role = models.ForeignKey(
61
- UserRole,
61
+ CompanyUserRole,
62
62
  on_delete=models.PROTECT,
63
63
  related_name="user_accesses",
64
64
  )
65
65
 
66
66
  class Meta:
67
67
  app_label = 'constec_db'
68
- db_table = 'core"."user_company_access'
69
- verbose_name = 'User company access'
70
- verbose_name_plural = 'User company access'
68
+ db_table = 'core"."company_user_access'
69
+ verbose_name = 'Company user access'
70
+ verbose_name_plural = 'Company user access'
71
71
  unique_together = [['user', 'company']]
72
72
 
73
73
  def __str__(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: constec
3
- Version: 0.6.0
3
+ Version: 0.7.1
4
4
  Summary: Base library for the Constec ecosystem - shared utilities, models, and namespace foundation
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/TpmyCT/constec-python
@@ -17,6 +17,7 @@ constec/db/migrations/0005_event.py
17
17
  constec/db/migrations/0006_automation_trigger_action_executionlog_notificationtemplate.py
18
18
  constec/db/migrations/0007_add_organization_to_automations.py
19
19
  constec/db/migrations/0008_refactor_creator_fields.py
20
+ constec/db/migrations/0009_rename_user_to_companyuser.py
20
21
  constec/db/migrations/__init__.py
21
22
  constec/db/models/__init__.py
22
23
  constec/db/models/automation.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "constec"
7
- version = "0.6.0"
7
+ version = "0.7.1"
8
8
  description = "Base library for the Constec ecosystem - shared utilities, models, and namespace foundation"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes