Skip to content
Snippets Groups Projects
Commit d4d50a0a authored by Frank Poetzsch-Heffter's avatar Frank Poetzsch-Heffter
Browse files

initial migration

parent 3fe2ca26
No related branches found
No related tags found
No related merge requests found
# Generated by Django 2.2.8 on 2019-12-27 06:08
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Account',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(default='', max_length=20)),
('income', models.BooleanField(default=False)),
('budget', models.DecimalField(decimal_places=2, default=0.0, max_digits=9)),
('saldo', models.DecimalField(decimal_places=2, default=0.0, max_digits=9)),
('rest', models.DecimalField(decimal_places=2, default=0.0, max_digits=9)),
],
options={
'permissions': [('manage_account', 'Can manage account')],
},
),
migrations.CreateModel(
name='Costcenter',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=30)),
('year', models.IntegerField(choices=[(2020, '2020'), (2021, '2021'), (2022, '2022'), (2023, '2023')], default=2019, verbose_name='Jahr')),
],
options={
'permissions': [('manage_costcenter', 'Can manage costcenter')],
},
),
migrations.CreateModel(
name='Booking',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('invoice_date', models.DateField(default='2000-12-31')),
('invoice_number', models.CharField(default='0', max_length=20)),
('firma', models.CharField(default='', max_length=30)),
('description', models.CharField(max_length=50)),
('amount', models.DecimalField(decimal_places=2, default=0.0, max_digits=9)),
('planned_amount', models.IntegerField()),
('submission_date', models.DateField(default='2000-12-31')),
('justification', models.CharField(blank=True, max_length=2000, null=True)),
('payout_number', models.IntegerField(default=0)),
('booking_date', models.DateField(default='2000-12-31')),
('maturity', models.DateField(default='2000-12-31')),
('upload', models.FileField(blank=True, default=None, null=True, upload_to='uploads/fibu/%Y/')),
('status', models.IntegerField(choices=[(0, 'beantragt'), (1, 'bewilligt'), (2, 'abgelehnt'), (3, 'bestellt'), (4, 'eingereicht'), (5, 'bezahlt')], default=0, verbose_name='Status')),
('account', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='fibu.Account')),
('contact', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='bookings', to=settings.AUTH_USER_MODEL, verbose_name='Erstellt von')),
],
options={
'permissions': [('manage_booking', 'Can manage bookings'), ('request_booking', 'Can request a booking')],
},
),
migrations.AddField(
model_name='account',
name='costcenter',
field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='fibu.Costcenter'),
),
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment