Coverage for benefits/enrollment_switchio/migrations/0001_initial.py: 100%
8 statements
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-06 20:07 +0000
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-06 20:07 +0000
1# Generated by Django 5.1.7 on 2025-05-13 19:55
3import benefits.core.models.common
4import benefits.secrets
5import django.db.models.deletion
6from django.db import migrations, models
9class Migration(migrations.Migration):
11 initial = True
13 dependencies = [
14 ("core", "0049_alter_transitagency_littlepay_config"),
15 ]
17 operations = [
18 migrations.CreateModel(
19 name="SwitchioConfig",
20 fields=[
21 ("id", models.AutoField(primary_key=True, serialize=False)),
22 (
23 "environment",
24 models.TextField(
25 choices=[("qa", "QA"), ("prod", "Production")],
26 help_text="A label to indicate which environment this configuration is for.",
27 ),
28 ),
29 (
30 "api_key",
31 models.TextField(blank=True, default="", help_text="The API key used to access the Switchio API."),
32 ),
33 (
34 "api_secret_name",
35 benefits.core.models.common.SecretNameField(
36 blank=True,
37 default="",
38 help_text="The name of the secret containing the api_secret value used to access the Switchio API.",
39 max_length=127,
40 validators=[benefits.secrets.SecretNameValidator()],
41 ),
42 ),
43 (
44 "ca_certificate",
45 models.ForeignKey(
46 blank=True,
47 default=None,
48 help_text="The CA certificate chain for accessing the Switchio API.",
49 null=True,
50 on_delete=django.db.models.deletion.PROTECT,
51 related_name="+",
52 to="core.pemdata",
53 ),
54 ),
55 (
56 "client_certificate",
57 models.ForeignKey(
58 blank=True,
59 default=None,
60 help_text="The client certificate for accessing the Switchio API.",
61 null=True,
62 on_delete=django.db.models.deletion.PROTECT,
63 related_name="+",
64 to="core.pemdata",
65 ),
66 ),
67 (
68 "private_key",
69 models.ForeignKey(
70 blank=True,
71 default=None,
72 help_text="The private key for accessing the Switchio API.",
73 null=True,
74 on_delete=django.db.models.deletion.PROTECT,
75 related_name="+",
76 to="core.pemdata",
77 ),
78 ),
79 ],
80 ),
81 ]