From ef3f271bb7d6b68550777a6216312b23e1ab5df6 Mon Sep 17 00:00:00 2001 From: Alireza Zare <78508222+azare242@users.noreply.github.com> Date: Tue, 28 Nov 2023 01:03:15 +0330 Subject: [PATCH] feat: add has_project field to workshop model (#27) * feat: add field has project to model * migrations --- .../0050_presentation_has_project.py | 18 ++++++++++++++++++ backend/backend_api/models.py | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 backend/backend_api/migrations/0050_presentation_has_project.py diff --git a/backend/backend_api/migrations/0050_presentation_has_project.py b/backend/backend_api/migrations/0050_presentation_has_project.py new file mode 100644 index 0000000..19106e1 --- /dev/null +++ b/backend/backend_api/migrations/0050_presentation_has_project.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.4 on 2023-11-27 20:33 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("backend_api", "0049_alter_payment_id"), + ] + + operations = [ + migrations.AddField( + model_name="presentation", + name="has_project", + field=models.BooleanField(default=False), + ), + ] diff --git a/backend/backend_api/models.py b/backend/backend_api/models.py index 36c5eff..b6c42e2 100644 --- a/backend/backend_api/models.py +++ b/backend/backend_api/models.py @@ -156,7 +156,8 @@ class Presentation(models.Model): year = models.IntegerField(blank=False, default=2020) cost = models.PositiveIntegerField(default=0) capacity = models.PositiveIntegerField(default=50) - + has_project = models.BooleanField(default=False, blank=False) + NOT_ASSIGNED = 'NOT_ASSIGNED' ELEMENTARY = 'Elementary' INTERMEDIATE = 'Intermediate'