|
| 1 | +# Generated by Django 4.2.11 on 2024-07-04 14:21 |
| 2 | + |
| 3 | +import django.db.models.deletion |
| 4 | +from django.db import migrations, models |
| 5 | + |
| 6 | +import django_jsonform.models.fields |
| 7 | + |
| 8 | +import openforms.appointments.contrib.qmatic.models |
| 9 | + |
| 10 | + |
| 11 | +class Migration(migrations.Migration): |
| 12 | + |
| 13 | + replaces = [ |
| 14 | + ("qmatic", "0001_initial"), |
| 15 | + ("qmatic", "0002_qmaticconfig_required_customer_fields"), |
| 16 | + ("qmatic", "0003_strip_qmatic_service_v1"), |
| 17 | + ] |
| 18 | + |
| 19 | + initial = True |
| 20 | + |
| 21 | + dependencies = [ |
| 22 | + ("zgw_consumers", "0012_auto_20210104_1039"), |
| 23 | + ] |
| 24 | + |
| 25 | + operations = [ |
| 26 | + migrations.CreateModel( |
| 27 | + name="QmaticConfig", |
| 28 | + fields=[ |
| 29 | + ( |
| 30 | + "id", |
| 31 | + models.AutoField( |
| 32 | + auto_created=True, |
| 33 | + primary_key=True, |
| 34 | + serialize=False, |
| 35 | + verbose_name="ID", |
| 36 | + ), |
| 37 | + ), |
| 38 | + ( |
| 39 | + "service", |
| 40 | + models.OneToOneField( |
| 41 | + help_text="The Qmatic Orchestra Calendar Public Appointment API service. Example: https://example.com:8443/calendar-backend/public/api/v1/", |
| 42 | + limit_choices_to={"api_type": "orc"}, |
| 43 | + null=True, |
| 44 | + on_delete=django.db.models.deletion.PROTECT, |
| 45 | + related_name="+", |
| 46 | + to="zgw_consumers.service", |
| 47 | + verbose_name="Calendar API", |
| 48 | + ), |
| 49 | + ), |
| 50 | + ( |
| 51 | + "required_customer_fields", |
| 52 | + django_jsonform.models.fields.ArrayField( |
| 53 | + base_field=models.CharField( |
| 54 | + choices=[ |
| 55 | + ("firstName", "First name"), |
| 56 | + ("lastName", "Last name"), |
| 57 | + ("email", "Email address"), |
| 58 | + ("phone", "Phone number"), |
| 59 | + ("addressLine1", "Street name and number"), |
| 60 | + ("addressLine2", "Address line 2"), |
| 61 | + ("addressCity", "City"), |
| 62 | + ("addressState", "State"), |
| 63 | + ("addressZip", "Postal code"), |
| 64 | + ("addressCountry", "Country"), |
| 65 | + ("identificationNumber", "Identification number"), |
| 66 | + ( |
| 67 | + "externalId", |
| 68 | + "Unique customer identification/account number", |
| 69 | + ), |
| 70 | + ("dateOfBirth", "Birthday"), |
| 71 | + ], |
| 72 | + max_length=50, |
| 73 | + ), |
| 74 | + default=openforms.appointments.contrib.qmatic.models.get_default_customer_fields, |
| 75 | + help_text="Select the customer fields for the contact details step. Fields that you select here are REQUIRED fields for the user making the appointment. You must have at least one field to be able to identify the customer.", |
| 76 | + size=None, |
| 77 | + verbose_name="Required customer fields", |
| 78 | + ), |
| 79 | + ), |
| 80 | + ], |
| 81 | + options={ |
| 82 | + "verbose_name": "Qmatic configuration", |
| 83 | + }, |
| 84 | + ), |
| 85 | + ] |
0 commit comments