1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='AdyenLog',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('timestamp', models.DateTimeField(auto_now_add=True)),
('pspReference', models.CharField(max_length=100, blank=True)),
('message', models.TextField()),
('error', models.BooleanField(default=False)),
('sent', models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='Notification',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('receivedat', models.DateTimeField(auto_now_add=True, unique=True)),
('eventDate', models.DateTimeField()),
('eventCode', models.CharField(max_length=100)),
('live', models.BooleanField()),
('success', models.BooleanField()),
('pspReference', models.CharField(max_length=100, blank=True)),
('originalReference', models.CharField(max_length=100, blank=True)),
('merchantReference', models.CharField(max_length=80, blank=True)),
('merchantAccountCode', models.CharField(max_length=100, blank=True)),
('paymentMethod', models.CharField(max_length=50, blank=True)),
('reason', models.CharField(max_length=1000, blank=True)),
('amount', models.IntegerField(null=True)),
('confirmed', models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='RawNotification',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('dat', models.DateTimeField(auto_now_add=True, unique=True)),
('contents', models.TextField()),
('confirmed', models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='Refund',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('receivedat', models.DateTimeField(auto_now_add=True)),
('refund_amount', models.IntegerField()),
('notification', models.ForeignKey(to='adyen.Notification', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
name='Report',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('receivedat', models.DateTimeField(auto_now_add=True)),
('url', models.CharField(max_length=1000)),
('downloadedat', models.DateTimeField(null=True, blank=True)),
('contents', models.TextField(null=True, blank=True)),
('processedat', models.DateTimeField(null=True, blank=True)),
('notification', models.ForeignKey(to='adyen.Notification', on_delete=models.CASCADE)),
],
),
migrations.CreateModel(
name='ReturnAuthorizationStatus',
fields=[
('pspReference', models.CharField(max_length=100, serialize=False, primary_key=True)),
('seencount', models.IntegerField(default=0)),
],
),
migrations.CreateModel(
name='TransactionStatus',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('pspReference', models.CharField(unique=True, max_length=100)),
('authorizedat', models.DateTimeField()),
('capturedat', models.DateTimeField(null=True, blank=True)),
('settledat', models.DateTimeField(null=True, blank=True)),
('amount', models.IntegerField()),
('settledamount', models.DecimalField(null=True, max_digits=20, decimal_places=2)),
('method', models.CharField(max_length=100, null=True, blank=True)),
('notes', models.CharField(max_length=1000, null=True, blank=True)),
('accounting_object', models.CharField(max_length=30, null=True, blank=True)),
('notification', models.ForeignKey(to='adyen.Notification', on_delete=models.CASCADE)),
],
options={
'verbose_name_plural': 'Transaction statuses',
},
),
migrations.AddField(
model_name='refund',
name='transaction',
field=models.OneToOneField(to='adyen.TransactionStatus', on_delete=models.CASCADE),
),
migrations.AddField(
model_name='notification',
name='rawnotification',
field=models.ForeignKey(blank=True, to='adyen.RawNotification', null=True, on_delete=models.CASCADE),
),
migrations.AlterUniqueTogether(
name='notification',
unique_together=set([('pspReference', 'eventCode', 'merchantAccountCode')]),
),
]
|