text: # -*- coding: utf-8 -*-
  # Generated by Django 1.10.4 on 2018-09-16 17:12
  from __future__ import unicode_literals
  
  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='Item',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('label', models.CharField(max_length=20, unique=True)),
                  ('available', models.BooleanField(default=True)),
                  ('comments', models.TextField(blank=True, null=True)),
              ],
          ),
          migrations.CreateModel(
              name='ItemType',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=50, unique=True)),
                  ('image', models.FileField(upload_to='hw_images/')),
                  ('description', models.TextField()),
              ],
          ),
          migrations.CreateModel(
              name='Lending',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('picked_up_time', models.DateTimeField(auto_now_add=True)),
                  ('return_time', models.DateTimeField(blank=True, null=True)),
                  ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hardware.Item')),
                  ('lending_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hardware_admin_lending', to=settings.AUTH_USER_MODEL)),
                  ('return_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='hardware_admin_return', to=settings.AUTH_USER_MODEL)),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='Request',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('request_time', models.DateTimeField(auto_now_add=True)),
                  ('item_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hardware.ItemType')),
                  ('lending', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='hardware.Lending')),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.AddField(
              model_name='item',
              name='item_type',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hardware.ItemType'),
          ),
      ]
  