feat(src/epics): scaffold epic module with models, admin, serializers, urls, views
Implement core Epic model and API for managing project epics, enabling CRUD operations and integration with admin and DRF.
This commit is contained in:
5 files changed
+83
-16
No files matched your search
+22
-3
@@ -1,5 +1,24 @@
|
||||
"""generated with djinit"""
|
||||
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class Epic(models.Model):
|
||||
project = models.ForeignKey(
|
||||
"projects.Project", on_delete=models.CASCADE, related_name="epics"
|
||||
)
|
||||
name = models.CharField(max_length=255)
|
||||
description = models.TextField(blank=True, null=True)
|
||||
start_date = models.DateField(blank=True, null=True)
|
||||
end_date = models.DateField(blank=True, null=True)
|
||||
sort_order = models.IntegerField(default=0)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
class Meta:
|
||||
db_table = "epics"
|
||||
verbose_name = "Epic"
|
||||
verbose_name_plural = "Epics"
|
||||
ordering = ("sort_order",)
|
||||
|
||||
def __str__(self):
|
||||
return f"[{self.project.ticket_prefix}] {self.name}"
|
||||
|
||||
Reference in new issue
Block a user