upgrade
[wolnelektury.git] / src / messaging / migrations / 0001_initial.py
1 # Generated by Django 2.2.5 on 2019-09-30 13:11
2
3 from django.db import migrations, models
4 import django.db.models.deletion
5
6
7 class Migration(migrations.Migration):
8
9     initial = True
10
11     dependencies = [
12     ]
13
14     operations = [
15         migrations.CreateModel(
16             name='EmailTemplate',
17             fields=[
18                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
19                 ('state', models.CharField(choices=[('club-membership-expiring', 'club membership expiring'), ('club-payment-unfinished', 'club payment unfinished')], help_text='?', max_length=128, verbose_name='state')),
20                 ('subject', models.CharField(max_length=1024, verbose_name='subject')),
21                 ('body', models.TextField(verbose_name='body')),
22                 ('days', models.SmallIntegerField(blank=True, null=True, verbose_name='days')),
23                 ('hour', models.IntegerField(blank=True, null=True, verbose_name='hour')),
24             ],
25             options={
26                 'verbose_name': 'email template',
27                 'verbose_name_plural': 'email templates',
28             },
29         ),
30         migrations.CreateModel(
31             name='EmailSent',
32             fields=[
33                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
34                 ('hash_value', models.CharField(max_length=1024)),
35                 ('timestamp', models.DateTimeField(auto_now_add=True)),
36                 ('email', models.CharField(max_length=1024, verbose_name='e-mail')),
37                 ('subject', models.CharField(max_length=1024, verbose_name='subject')),
38                 ('body', models.TextField(verbose_name='body')),
39                 ('template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='messaging.EmailTemplate')),
40             ],
41             options={
42                 'verbose_name': 'email sent',
43                 'verbose_name_plural': 'emails sent',
44                 'ordering': ('-timestamp',),
45             },
46         ),
47     ]