|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +from __future__ import unicode_literals |
| 3 | + |
| 4 | +from django.db import migrations, models |
| 5 | +from django.conf import settings |
| 6 | +import django.contrib.auth.models |
| 7 | +import uuid |
| 8 | + |
| 9 | + |
| 10 | +class Migration(migrations.Migration): |
| 11 | + |
| 12 | + dependencies = [ |
| 13 | + ('auth', '0006_require_contenttypes_0002'), |
| 14 | + ] |
| 15 | + |
| 16 | + operations = [ |
| 17 | + migrations.CreateModel( |
| 18 | + name='BasicUser', |
| 19 | + fields=[ |
| 20 | + ('user_ptr', models.OneToOneField(primary_key=True, parent_link=True, to=settings.AUTH_USER_MODEL, serialize=False, auto_created=True)), |
| 21 | + ], |
| 22 | + options={ |
| 23 | + 'abstract': False, |
| 24 | + 'verbose_name': 'user', |
| 25 | + 'verbose_name_plural': 'users', |
| 26 | + }, |
| 27 | + bases=('auth.user',), |
| 28 | + managers=[ |
| 29 | + ('objects', django.contrib.auth.models.UserManager()), |
| 30 | + ], |
| 31 | + ), |
| 32 | + migrations.CreateModel( |
| 33 | + name='Logs', |
| 34 | + fields=[ |
| 35 | + ('id', models.UUIDField(editable=False, default=uuid.uuid4, serialize=False, primary_key=True)), |
| 36 | + ('creation_date', models.DateTimeField(auto_now=True)), |
| 37 | + ('n_pages', models.CharField(max_length=3)), |
| 38 | + ], |
| 39 | + ), |
| 40 | + migrations.CreateModel( |
| 41 | + name='Printer', |
| 42 | + fields=[ |
| 43 | + ('id', models.UUIDField(editable=False, default=uuid.uuid4, serialize=False, primary_key=True)), |
| 44 | + ('name', models.CharField(max_length=50)), |
| 45 | + ('uri', models.URLField()), |
| 46 | + ('color', models.BooleanField(default=False)), |
| 47 | + ('paper_size', models.CharField(max_length=5)), |
| 48 | + ('description', models.TextField()), |
| 49 | + ], |
| 50 | + ), |
| 51 | + migrations.CreateModel( |
| 52 | + name='Quota', |
| 53 | + fields=[ |
| 54 | + ('id', models.UUIDField(editable=False, default=uuid.uuid4, serialize=False, primary_key=True)), |
| 55 | + ('quota', models.CharField(max_length=4)), |
| 56 | + ('printer', models.OneToOneField(to='APImpServ.Printer')), |
| 57 | + ], |
| 58 | + ), |
| 59 | + migrations.CreateModel( |
| 60 | + name='UserQuota', |
| 61 | + fields=[ |
| 62 | + ('id', models.UUIDField(editable=False, default=uuid.uuid4, serialize=False, primary_key=True)), |
| 63 | + ('quota', models.CharField(max_length=4)), |
| 64 | + ('mes', models.CharField(default=12, max_length=2)), |
| 65 | + ('año', models.CharField(default=2015, max_length=4)), |
| 66 | + ('printer', models.ForeignKey(to='APImpServ.Printer', related_name='printers')), |
| 67 | + ('user', models.OneToOneField(to='APImpServ.BasicUser')), |
| 68 | + ], |
| 69 | + ), |
| 70 | + migrations.CreateModel( |
| 71 | + name='UserType', |
| 72 | + fields=[ |
| 73 | + ('id', models.UUIDField(editable=False, default=uuid.uuid4, serialize=False, primary_key=True)), |
| 74 | + ('type_name', models.CharField(max_length=50)), |
| 75 | + ('default', models.BooleanField(default=False)), |
| 76 | + ], |
| 77 | + ), |
| 78 | + migrations.AddField( |
| 79 | + model_name='quota', |
| 80 | + name='user_type', |
| 81 | + field=models.ForeignKey(to='APImpServ.UserType', related_name='Quotas'), |
| 82 | + ), |
| 83 | + migrations.AddField( |
| 84 | + model_name='logs', |
| 85 | + name='printer', |
| 86 | + field=models.ForeignKey(to='APImpServ.Printer'), |
| 87 | + ), |
| 88 | + migrations.AddField( |
| 89 | + model_name='logs', |
| 90 | + name='user', |
| 91 | + field=models.ForeignKey(to='APImpServ.BasicUser'), |
| 92 | + ), |
| 93 | + migrations.AddField( |
| 94 | + model_name='basicuser', |
| 95 | + name='user_type', |
| 96 | + field=models.ForeignKey(to='APImpServ.UserType', related_name='users'), |
| 97 | + ), |
| 98 | + ] |
0 commit comments