1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 from django.db import models, migrations
5 import django.db.models.deletion
8 class Migration(migrations.Migration):
11 ('polls', '0001_initial'),
12 ('catalogue', '0001_initial'),
16 migrations.CreateModel(
19 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
20 ('name', models.CharField(max_length=127, verbose_name='name', blank=True)),
21 ('email', models.EmailField(db_index=True, max_length=75, verbose_name='email', blank=True)),
22 ('amount', models.DecimalField(verbose_name='amount', max_digits=10, decimal_places=2)),
23 ('payed_at', models.DateTimeField(db_index=True, null=True, verbose_name='payed at', blank=True)),
24 ('language_code', models.CharField(max_length=2, null=True, blank=True)),
25 ('notifications', models.BooleanField(default=True, db_index=True, verbose_name='notifications')),
26 ('notify_key', models.CharField(max_length=32)),
29 'ordering': ['-payed_at'],
30 'verbose_name': 'funding',
31 'verbose_name_plural': 'fundings',
33 bases=(models.Model,),
35 migrations.CreateModel(
38 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
39 ('author', models.CharField(max_length=255, verbose_name='author')),
40 ('title', models.CharField(max_length=255, verbose_name='Title')),
41 ('slug', models.SlugField(verbose_name='Slug')),
42 ('description', models.TextField(verbose_name='Description', blank=True)),
43 ('target', models.DecimalField(verbose_name='target', max_digits=10, decimal_places=2)),
44 ('start', models.DateField(verbose_name='start', db_index=True)),
45 ('end', models.DateField(verbose_name='end', db_index=True)),
46 ('redakcja_url', models.URLField(verbose_name='redakcja URL', blank=True)),
47 ('cover', models.ImageField(upload_to='funding/covers', verbose_name='Cover')),
48 ('notified_near', models.DateTimeField(null=True, verbose_name='Near-end notifications sent', blank=True)),
49 ('notified_end', models.DateTimeField(null=True, verbose_name='End notifications sent', blank=True)),
50 ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, blank=True, to='catalogue.Book', help_text='Published book.', null=True)),
51 ('poll', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='polls.Poll', help_text='Poll', null=True)),
55 'verbose_name': 'offer',
56 'verbose_name_plural': 'offers',
58 bases=(models.Model,),
60 migrations.CreateModel(
63 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
64 ('price', models.DecimalField(verbose_name='price', max_digits=10, decimal_places=2)),
65 ('name', models.CharField(max_length=255, verbose_name='name')),
66 ('long_name', models.CharField(max_length=255, verbose_name='long name')),
67 ('end_date', models.DateField(null=True, verbose_name='end date', blank=True)),
68 ('offer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='offer', blank=True, to='funding.Offer', null=True)),
71 'ordering': ['-price'],
72 'verbose_name': 'perk',
73 'verbose_name_plural': 'perks',
75 bases=(models.Model,),
77 migrations.CreateModel(
80 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
81 ('amount', models.DecimalField(verbose_name='amount', max_digits=10, decimal_places=2)),
82 ('timestamp', models.DateField(verbose_name='when')),
83 ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalogue.Book')),
86 'ordering': ['-timestamp'],
87 'verbose_name': 'money spent on a book',
88 'verbose_name_plural': 'money spent on books',
90 bases=(models.Model,),
95 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='offer', to='funding.Offer'),
96 preserve_default=True,
101 field=models.ManyToManyField(to='funding.Perk', verbose_name='perks', blank=True),
102 preserve_default=True,