Style fix
[wolnelektury.git] / src / club / migrations / 0002_auto_20190416_1024.py
1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
3 #
4 from django.db import migrations, models
5 import django.db.models.deletion
6
7
8 class Migration(migrations.Migration):
9
10     dependencies = [
11         ('club', '0001_initial'),
12     ]
13
14     operations = [
15         migrations.CreateModel(
16             name='PayUCardToken',
17             fields=[
18                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
19                 ('disposable_token', models.CharField(max_length=255, unique=True)),
20                 ('reusable_token', models.CharField(blank=True, max_length=255, null=True, unique=True)),
21                 ('created_at', models.DateTimeField(auto_now_add=True)),
22             ],
23             options={
24                 'abstract': False,
25             },
26         ),
27         migrations.CreateModel(
28             name='PayUNotification',
29             fields=[
30                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
31                 ('body', models.TextField()),
32                 ('received_at', models.DateTimeField(auto_now_add=True)),
33             ],
34             options={
35                 'abstract': False,
36             },
37         ),
38         migrations.CreateModel(
39             name='PayUOrder',
40             fields=[
41                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
42                 ('pos_id', models.CharField(max_length=255)),
43                 ('customer_ip', models.GenericIPAddressField()),
44                 ('amount', models.PositiveIntegerField()),
45                 ('order_id', models.CharField(blank=True, max_length=255)),
46                 ('status', models.CharField(blank=True, choices=[('PENDING', 'Pending'), ('WAITING_FOR_CONFIRMATION', 'Waiting for confirmation'), ('COMPLETED', 'Completed'), ('CANCELED', 'Canceled'), ('REJECTED', 'Rejected')], max_length=128)),
47             ],
48             options={
49                 'abstract': False,
50             },
51         ),
52         migrations.RemoveField(
53             model_name='payment',
54             name='schedule',
55         ),
56         migrations.AddField(
57             model_name='membership',
58             name='honorary',
59             field=models.BooleanField(default=False),
60         ),
61         migrations.AddField(
62             model_name='plan',
63             name='active',
64             field=models.BooleanField(default=True, verbose_name='active'),
65         ),
66         migrations.AlterField(
67             model_name='schedule',
68             name='method',
69             field=models.CharField(choices=[('payu-re', 'PayU Recurring'), ('paypal-re', 'PayPal Recurring')], max_length=255, verbose_name='method'),
70         ),
71         migrations.DeleteModel(
72             name='Payment',
73         ),
74         migrations.AddField(
75             model_name='payuorder',
76             name='schedule',
77             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='club.Schedule'),
78         ),
79         migrations.AddField(
80             model_name='payunotification',
81             name='order',
82             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='club.PayUOrder'),
83         ),
84         migrations.AddField(
85             model_name='payucardtoken',
86             name='schedule',
87             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='club.Schedule'),
88         ),
89     ]