[SILO-1026] feat: add estimates external API endpoints (#8664)
* add project summary endpoint * update response structure * add estimates external API endpoints with migrations * fix invalid project and workspace error
This commit is contained in:
parent
d7c80885fd
commit
9fa707b260
10 changed files with 504 additions and 11 deletions
18
apps/api/plane/db/migrations/0121_alter_estimate_type.py
Normal file
18
apps/api/plane/db/migrations/0121_alter_estimate_type.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 4.2.28 on 2026-02-26 14:37
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('db', '0120_issueview_archived_at'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='estimate',
|
||||
name='type',
|
||||
field=models.CharField(choices=[('categories', 'Categories'), ('points', 'Points')], default='categories', max_length=255),
|
||||
),
|
||||
]
|
||||
|
|
@ -10,11 +10,15 @@ from django.db.models import Q
|
|||
# Module imports
|
||||
from .project import ProjectBaseModel
|
||||
|
||||
class EstimateType(models.TextChoices):
|
||||
CATEGORIES = "categories", "Categories"
|
||||
POINTS = "points", "Points"
|
||||
|
||||
|
||||
class Estimate(ProjectBaseModel):
|
||||
name = models.CharField(max_length=255)
|
||||
description = models.TextField(verbose_name="Estimate Description", blank=True)
|
||||
type = models.CharField(max_length=255, default="categories")
|
||||
type = models.CharField(max_length=255, choices=EstimateType.choices, default=EstimateType.CATEGORIES)
|
||||
last_used = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue