add parent_role

This commit is contained in:
2025-10-28 09:09:06 +03:30
parent f4868f6f83
commit 8baf111461
5 changed files with 240 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
from django.db import models
from apps.authentication import models as auth_models
from apps.core.models import BaseModel
@@ -52,6 +53,12 @@ class Permissions(BaseModel):
class Role(BaseModel):
parent_role = models.ForeignKey(
'self',
on_delete=models.CASCADE,
related_name='child',
null=True
)
role_name = models.CharField(max_length=50, unique=True)
description = models.TextField(max_length=500)
type = models.ForeignKey(