nk20/note/migrations/0001_initial.py

124 lines
5.9 KiB
Python
Raw Normal View History

2019-07-16 11:54:32 +00:00
# Generated by Django 2.2.3 on 2019-07-16 11:53
2019-07-08 14:11:53 +00:00
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
2019-07-16 10:43:23 +00:00
import django.utils.timezone
2019-07-08 14:11:53 +00:00
class Migration(migrations.Migration):
initial = True
dependencies = [
2019-07-16 11:50:05 +00:00
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
2019-07-16 11:54:32 +00:00
('member', '0001_initial'),
2019-07-08 14:11:53 +00:00
]
operations = [
migrations.CreateModel(
2019-07-16 10:43:23 +00:00
name='Note',
2019-07-08 14:11:53 +00:00
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2019-07-16 10:43:23 +00:00
('balance', models.IntegerField(help_text='in centimes, money credited for this instance', verbose_name='account balance')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this note should be treated as active. Unselect this instead of deleting notes.', verbose_name='active')),
2019-07-08 14:11:53 +00:00
],
2019-07-16 11:50:05 +00:00
options={
'verbose_name': 'note',
'verbose_name_plural': 'notes',
},
2019-07-08 14:11:53 +00:00
),
migrations.CreateModel(
2019-07-16 10:43:23 +00:00
name='Transaction',
2019-07-08 14:11:53 +00:00
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2019-07-16 10:43:23 +00:00
('datetime', models.DateTimeField(default=django.utils.timezone.now, verbose_name='destination')),
('quantity', models.PositiveSmallIntegerField(verbose_name='quantity')),
('amount', models.PositiveIntegerField(verbose_name='amount')),
('transaction_type', models.CharField(max_length=31, verbose_name='type')),
('description', models.TextField(verbose_name='description')),
('valid', models.NullBooleanField(verbose_name='valid')),
('destination', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='note.Note', verbose_name='destination')),
('source', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='note.Note', verbose_name='source')),
2019-07-08 14:11:53 +00:00
],
2019-07-16 11:50:05 +00:00
options={
'verbose_name': 'transaction',
'verbose_name_plural': 'transactions',
},
2019-07-08 14:11:53 +00:00
),
migrations.CreateModel(
2019-07-16 10:43:23 +00:00
name='NoteSpecial',
fields=[
('note_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='note.Note')),
('special_type', models.CharField(max_length=255, unique=True, verbose_name='type')),
],
2019-07-16 11:50:05 +00:00
options={
'verbose_name': 'special note',
'verbose_name_plural': 'special notes',
},
2019-07-16 10:43:23 +00:00
bases=('note.note',),
),
migrations.CreateModel(
name='TransactionTemplate',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='name')),
('amount', models.PositiveIntegerField(verbose_name='amount')),
('template_type', models.CharField(max_length=31, verbose_name='type')),
('destination', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='note.Note', verbose_name='destination')),
],
2019-07-16 11:50:05 +00:00
options={
'verbose_name': 'transaction template',
'verbose_name_plural': 'transaction templates',
},
2019-07-16 10:43:23 +00:00
),
migrations.CreateModel(
name='Alias',
2019-07-08 14:11:53 +00:00
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2019-07-16 10:43:23 +00:00
('name', models.CharField(max_length=255, unique=True, verbose_name='name')),
('note', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='note.Note')),
],
2019-07-16 11:50:05 +00:00
options={
'verbose_name': 'alias',
'verbose_name_plural': 'aliases',
},
2019-07-16 10:43:23 +00:00
),
migrations.CreateModel(
name='NoteUser',
fields=[
('note_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='note.Note')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='note', to=settings.AUTH_USER_MODEL)),
2019-07-08 14:11:53 +00:00
],
options={
2019-07-16 07:17:46 +00:00
'verbose_name': "one's note",
'verbose_name_plural': 'users note',
2019-07-08 14:11:53 +00:00
},
2019-07-16 10:43:23 +00:00
bases=('note.note',),
2019-07-08 14:11:53 +00:00
),
migrations.CreateModel(
2019-07-16 10:43:23 +00:00
name='NoteClub',
2019-07-08 14:11:53 +00:00
fields=[
2019-07-16 10:43:23 +00:00
('note_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='note.Note')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='note', to='member.Club')),
],
options={
'verbose_name': 'club note',
'verbose_name_plural': 'clubs notes',
},
bases=('note.note',),
),
migrations.CreateModel(
name='MembershipTransaction',
fields=[
('transaction_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='note.Transaction')),
('membership', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='transaction', to='member.Membership')),
2019-07-08 14:11:53 +00:00
],
2019-07-16 11:50:05 +00:00
options={
'verbose_name': 'membership transaction',
'verbose_name_plural': 'membership transactions',
},
2019-07-16 10:43:23 +00:00
bases=('note.transaction',),
2019-07-08 14:11:53 +00:00
),
]