jira-15 top leadership API

This commit is contained in:
jain
2023-07-09 19:13:05 +05:30
parent 3723e46be1
commit 1b60d4344e
5 changed files with 65 additions and 42 deletions

View File

@ -41,3 +41,21 @@ class Junior(models.Model):
def __str__(self):
"""Return email id"""
return f'{self.auth}'
class JuniorPoints(models.Model):
"""Junior model"""
junior = models.OneToOneField(Junior, on_delete=models.CASCADE, related_name='junior_points')
"""Contact details"""
total_task_points = models.IntegerField(blank=True, null=True, default=0)
"""Profile created and updated time"""
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
class Meta(object):
""" Meta class """
db_table = 'junior_task_points'
verbose_name = 'Junior Task Points'
def __str__(self):
"""Return email id"""
return f'{self.junior.auth}'