Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchdawson1982 committed Oct 23, 2024
1 parent 8c4e12e commit c60af1e
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 5 deletions.
109 changes: 109 additions & 0 deletions feedback/migrations/0001_initial_squashed_0011_alter_issue_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Generated by Django 5.1.2 on 2024-10-23 16:49

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

replaces = [
("feedback", "0001_initial"),
("feedback", "0002_alter_feedback_how_can_we_improve"),
("feedback", "0003_reportissue"),
("feedback", "0004_reportissue_additional_info_alter_reportissue_reason"),
("feedback", "0005_reportissue_user_email_and_more"),
(
"feedback",
"0006_rename_data_asset_owner_email_reportissue_data_owner_email_and_more",
),
("feedback", "0007_reportissue_created_reportissue_modified_and_more"),
("feedback", "0008_alter_reportissue_additional_info_and_more"),
("feedback", "0009_alter_reportissue_additional_info_and_more"),
("feedback", "0010_issue_delete_reportissue"),
("feedback", "0011_alter_issue_id"),
]

dependencies = []

operations = [
migrations.CreateModel(
name="Feedback",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"satisfaction_rating",
models.IntegerField(
choices=[
(5, "Very satisfied"),
(4, "Satisfied"),
(3, "Neither satisfied or dissatisfied"),
(2, "Dissatisfied"),
(1, "Very dissatisfied"),
],
verbose_name="Satisfaction survey",
),
),
(
"how_can_we_improve",
models.TextField(
blank=True, verbose_name="How can we improve this service?"
),
),
],
),
migrations.CreateModel(
name="Issue",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("created", models.DateTimeField(auto_now_add=True)),
("modified", models.DateTimeField(auto_now=True)),
(
"reason",
models.CharField(
choices=[
("Link is broken", "Broken Link"),
("Owner is incorrect", "Incorrect Owner"),
("Contact is outdated", "Outdated Contact"),
("Other", "Other"),
],
max_length=50,
verbose_name="What is wrong with this page?",
),
),
(
"additional_info",
models.TextField(
validators=[django.core.validators.MinLengthValidator(10)],
verbose_name="Can you provide more detail?",
),
),
("entity_name", models.CharField(max_length=250)),
("entity_url", models.CharField(max_length=250)),
("data_owner_email", models.CharField(max_length=250)),
(
"user_email",
models.CharField(
blank=True,
max_length=250,
validators=[django.core.validators.EmailValidator()],
),
),
],
),
]
20 changes: 20 additions & 0 deletions feedback/migrations/0011_alter_issue_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 5.1.2 on 2024-10-23 16:48

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("feedback", "0010_issue_delete_reportissue"),
]

operations = [
migrations.AlterField(
model_name="issue",
name="id",
field=models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
),
),
]
5 changes: 0 additions & 5 deletions feedback/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import uuid

from django.core.validators import EmailValidator, MinLengthValidator
from django.db import models
from django.utils.translation import gettext as _
Expand Down Expand Up @@ -33,9 +31,6 @@ class IssueChoices(models.TextChoices):
OUTDATED_CONTACT = "Contact is outdated"
OTHER = "Other"

id = models.UUIDField(
default=uuid.uuid4, unique=True, primary_key=True, editable=False
)
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)

Expand Down

0 comments on commit c60af1e

Please sign in to comment.