mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 16:44:54 +00:00
sonar fixes
This commit is contained in:
@ -5,6 +5,7 @@ from django.contrib.auth import get_user_model
|
||||
"""Import Django app"""
|
||||
from base.constants import GENDERS, TASK_STATUS, PENDING, TASK_POINTS
|
||||
from junior.models import Junior
|
||||
"""Add user model"""
|
||||
User = get_user_model()
|
||||
# Create your models here.
|
||||
|
||||
@ -44,16 +45,22 @@ class Guardian(models.Model):
|
||||
return f'{self.user}'
|
||||
|
||||
class JuniorTask(models.Model):
|
||||
"""Guardian model"""
|
||||
"""Junior Task details model"""
|
||||
guardian = models.ForeignKey(Guardian, on_delete=models.CASCADE, related_name='guardian', verbose_name='Guardian')
|
||||
"""task details"""
|
||||
task_name = models.CharField(max_length=100)
|
||||
task_description = models.CharField(max_length=500)
|
||||
"""points of the task"""
|
||||
points = models.IntegerField(default=TASK_POINTS)
|
||||
due_date = models.DateField(auto_now_add=False, null=True, blank=True)
|
||||
"""Images of task"""
|
||||
default_image = models.URLField(null=True, blank=True, default=None)
|
||||
image = models.URLField(null=True, blank=True, default=None)
|
||||
"""associated junior with the task"""
|
||||
junior = models.ForeignKey(Junior, on_delete=models.CASCADE, related_name='junior', verbose_name='Junior')
|
||||
"""task status"""
|
||||
task_status = models.CharField(choices=TASK_STATUS, max_length=15, default=PENDING)
|
||||
"""task stage"""
|
||||
is_active = models.BooleanField(default=True)
|
||||
is_approved = models.BooleanField(default=False)
|
||||
"""Profile created and updated time"""
|
||||
|
||||
Reference in New Issue
Block a user