From 074f789a1ea522153f7d0fe2720d4963af464b8f Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Wed, 6 Dec 2017 20:22:36 +0100 Subject: [PATCH] Add member profile for shackspace --- byro_shackspace/migrations/0001_initial.py | 33 ++++++++++++++++++++++ byro_shackspace/migrations/__init__.py | 0 byro_shackspace/models.py | 19 +++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 byro_shackspace/migrations/0001_initial.py create mode 100644 byro_shackspace/migrations/__init__.py create mode 100644 byro_shackspace/models.py diff --git a/byro_shackspace/migrations/0001_initial.py b/byro_shackspace/migrations/0001_initial.py new file mode 100644 index 0000000..ac22f40 --- /dev/null +++ b/byro_shackspace/migrations/0001_initial.py @@ -0,0 +1,33 @@ +# Generated by Django 2.0 on 2017-12-06 19:22 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('members', '0005_auto_20171206_1919'), + ] + + operations = [ + migrations.CreateModel( + name='ShackProfile', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('has_loeffelhardt_account', models.BooleanField(default=False)), + ('has_matomat_key', models.BooleanField(default=False)), + ('has_metro_card', models.BooleanField(default=False)), + ('has_safe_key', models.BooleanField(default=False)), + ('has_selgros_card', models.BooleanField(default=False)), + ('has_shack_iron_key', models.BooleanField(default=False)), + ('has_snackomat_key', models.BooleanField(default=False)), + ('is_keyholder', models.BooleanField(default=False)), + ('signed_DSV', models.BooleanField(default=False)), + ('ssh_public_key', models.TextField(blank=True, null=True)), + ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='profile_shack', to='members.Member')), + ], + ), + ] diff --git a/byro_shackspace/migrations/__init__.py b/byro_shackspace/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/byro_shackspace/models.py b/byro_shackspace/models.py new file mode 100644 index 0000000..621970a --- /dev/null +++ b/byro_shackspace/models.py @@ -0,0 +1,19 @@ +from django.db import models + + +class ShackProfile(models.Model): + member = models.ForeignKey( + to='members.Member', + on_delete=models.CASCADE, + related_name='profile_shack', + ) + has_loeffelhardt_account = models.BooleanField(default=False) + has_matomat_key = models.BooleanField(default=False) + has_metro_card = models.BooleanField(default=False) + has_safe_key = models.BooleanField(default=False) + has_selgros_card = models.BooleanField(default=False) + has_shack_iron_key = models.BooleanField(default=False) + has_snackomat_key = models.BooleanField(default=False) + is_keyholder = models.BooleanField(default=False) + signed_DSV = models.BooleanField(default=False) + ssh_public_key = models.TextField(null=True, blank=True)