Coverage for benefits / enrollment_switchio / migrations / 0001_initial.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-02-13 19:35 +0000

1# Generated by Django 5.1.7 on 2025-05-13 19:55 

2 

3import django.db.models.deletion 

4from django.db import migrations, models 

5 

6import benefits.core.models.common 

7import benefits.secrets 

8 

9 

10class Migration(migrations.Migration): 

11 

12 initial = True 

13 

14 dependencies = [ 

15 ("core", "0049_alter_transitagency_littlepay_config"), 

16 ] 

17 

18 operations = [ 

19 migrations.CreateModel( 

20 name="SwitchioConfig", 

21 fields=[ 

22 ("id", models.AutoField(primary_key=True, serialize=False)), 

23 ( 

24 "environment", 

25 models.TextField( 

26 choices=[("qa", "QA"), ("prod", "Production")], 

27 help_text="A label to indicate which environment this configuration is for.", 

28 ), 

29 ), 

30 ( 

31 "api_key", 

32 models.TextField(blank=True, default="", help_text="The API key used to access the Switchio API."), 

33 ), 

34 ( 

35 "api_secret_name", 

36 benefits.core.models.common.SecretNameField( 

37 blank=True, 

38 default="", 

39 help_text="The name of the secret containing the api_secret value used to access the Switchio API.", 

40 max_length=127, 

41 validators=[benefits.secrets.SecretNameValidator()], 

42 ), 

43 ), 

44 ( 

45 "ca_certificate", 

46 models.ForeignKey( 

47 blank=True, 

48 default=None, 

49 help_text="The CA certificate chain for accessing the Switchio API.", 

50 null=True, 

51 on_delete=django.db.models.deletion.PROTECT, 

52 related_name="+", 

53 to="core.pemdata", 

54 ), 

55 ), 

56 ( 

57 "client_certificate", 

58 models.ForeignKey( 

59 blank=True, 

60 default=None, 

61 help_text="The client certificate for accessing the Switchio API.", 

62 null=True, 

63 on_delete=django.db.models.deletion.PROTECT, 

64 related_name="+", 

65 to="core.pemdata", 

66 ), 

67 ), 

68 ( 

69 "private_key", 

70 models.ForeignKey( 

71 blank=True, 

72 default=None, 

73 help_text="The private key for accessing the Switchio API.", 

74 null=True, 

75 on_delete=django.db.models.deletion.PROTECT, 

76 related_name="+", 

77 to="core.pemdata", 

78 ), 

79 ), 

80 ], 

81 ), 

82 ]