Beispiel #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0074_auto_20180403_1149'),
    ]

    operations = [
        migrations.AddField(
            model_name='imcountry',
            name='update_date',
            field=models.DateField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='imregion',
            name='update_date',
            field=models.DateField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='imcity',
            name='update_date',
            field=models.DateField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='immosaic',
            name='update_date',
            field=models.DateField(blank=True, null=True),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Album',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(default='New album', max_length=80)),
                ('creation_date', models.DateField(auto_now_add=True)),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='albums',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['creation_date'],
            },
        ),
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(default='New photo', max_length=80)),
                ('image',
                 models.ImageField(upload_to=api.models.get_image_path,
                                   verbose_name=models.CharField(
                                       default='New photo', max_length=80))),
                ('creation_date', models.DateField(auto_now_add=True)),
                ('album',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='photos',
                                   to='api.Album')),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user_photos',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['creation_date'],
            },
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0002_auto_20200421_1741'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('username', models.CharField(max_length=100)),
                ('password', models.CharField(max_length=100)),
                ('email', models.CharField(max_length=150)),
            ],
        ),
        migrations.AlterModelOptions(
            name='product',
            options={'ordering': ['id']},
        ),
        migrations.AddField(
            model_name='category',
            name='image',
            field=models.ImageField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='category',
            name='imageUrl',
            field=models.CharField(default='', max_length=100),
        ),
        migrations.AlterUniqueTogether(
            name='product',
            unique_together={('name', 'price', 'description')},
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('price', models.FloatField(default='0.0')),
                ('orderDate', models.DateField()),
                ('discount', models.FloatField()),
                ('address', models.TextField()),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Product')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='orders',
                                   to='api.User')),
            ],
        ),
    ]
Beispiel #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('firstname', models.CharField(max_length=30)),
                ('lastname', models.CharField(max_length=30)),
                ('birthdate', models.DateField()),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('phoneNumbers',
                 jsonfield.fields.JSONField(
                     default=api.models.Person.phone_number_default,
                     verbose_name='PhoneNumber')),
                ('emailAddresses',
                 jsonfield.fields.JSONField(
                     default=api.models.Person.email_address_default,
                     verbose_name='EmailAddress')),
                ('addresses',
                 jsonfield.fields.JSONField(
                     default=api.models.Person.address_default,
                     verbose_name='Address')),
            ],
        ),
    ]
Beispiel #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='UserData',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user_id', models.IntegerField()),
                ('first_name', models.TextField()),
                ('last_name', models.TextField()),
                ('verified', models.BooleanField()),
                ('birthday', models.DateField()),
                ('photo',
                 models.ImageField(upload_to=api.models.user_directory_path)),
                ('photo_url', models.URLField()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0003_auto_20180602_1046'),
    ]

    operations = [
        migrations.CreateModel(
            name='TreatmentFiles',
            fields=[
                ('file_key', models.AutoField(primary_key=True,
                                              serialize=False)),
                ('files',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=api.models.get_upload_to)),
                ('created', models.DateField(null=True)),
                ('updated', models.DateTimeField(auto_now=True, null=True)),
                ('treatment',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Treatments')),
            ],
            options={
                'verbose_name_plural': 'TreatmentFiles',
            },
        ),
    ]
Beispiel #7
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0057_auto_20180407_2032'),
    ]

    operations = [
        migrations.AddField(
            model_name='user',
            name='dob',
            field=models.DateField(default=api.models.current_timestamp),
        ),
        migrations.AlterField(
            model_name='facility',
            name='facility_type',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='api.FacilityType'),
        ),
        migrations.AlterField(
            model_name='user',
            name='question',
            field=models.ForeignKey(
                default=1,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='api.Question'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Room',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code',
                 models.CharField(default=api.models.gernate_unique_code,
                                  max_length=8,
                                  unique=True)),
                ('host', models.CharField(max_length=50, unique=True)),
                ('guest_can_pause', models.BooleanField(default=False)),
                ('vote_to_skip', models.IntegerField(default=1)),
                ('created_at', models.DateField(auto_now_add=True)),
            ],
        ),
    ]
Beispiel #9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Asset',
            fields=[
                ('assetid', models.CharField(default=api.models.get_uuid, editable=False, max_length=255, primary_key=True, serialize=False)),
                ('assetname', models.CharField(max_length=255)),
                ('date_of_purchase', models.DateField()),
                ('price', models.FloatField()),
                ('date_of_last_maintainence', models.DateTimeField()),
            ],
            options={
                'verbose_name': 'Asset',
                'verbose_name_plural': 'Assets',
            },
        ),
        migrations.CreateModel(
            name='Worker',
            fields=[
                ('workerid', models.CharField(default=api.models.get_uuid, editable=False, max_length=255, primary_key=True, serialize=False)),
                ('workername', models.CharField(max_length=255)),
                ('worker_address', models.TextField()),
                ('join_date', models.DateField()),
                ('date_of_birth', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('taskid', models.CharField(default=api.models.get_uuid, editable=False, max_length=255, primary_key=True, serialize=False)),
                ('taskname', models.CharField(max_length=255)),
                ('task_description', models.TextField()),
                ('time_of_allocation', models.DateTimeField()),
                ('time_to_be_performed_by', models.DateTimeField()),
                ('asset', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Asset')),
                ('worker', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.Worker')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('email', models.EmailField(max_length=50, unique=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nickName', models.CharField(max_length=20)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('img', models.ImageField(blank=True, null=True, upload_to=api.models.upload_avatar_path)),
                ('userProfile', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='userProfile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('created_on', models.DateField(auto_now_add=True)),
                ('img', models.ImageField(blank=True, null=True, upload_to=api.models.upload_post_path)),
                ('liked', models.ManyToManyField(blank=True, related_name='liked', to=settings.AUTH_USER_MODEL)),
                ('userPost', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='userPost', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(max_length=50)),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Post')),
                ('userComment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='userComment', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='FileHostingModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=32)),
                ('slug',
                 models.CharField(blank=True, max_length=64, unique=True)),
                ('created_time', models.DateField(auto_now_add=True)),
                ('file_upload',
                 models.FileField(upload_to=api.models.user_file_path)),
            ],
        ),
        migrations.CreateModel(
            name='ImageHostingModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=32)),
                ('slug',
                 models.CharField(blank=True, max_length=64, unique=True)),
                ('created_time', models.DateField(auto_now_add=True)),
                ('image_upload',
                 models.ImageField(upload_to=api.models.user_image_path)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Drug',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('code', models.IntegerField(max_length=10, unique=True)),
                ('description', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name': 'Drug',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Vaccination',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('rut',
                 models.CharField(max_length=12,
                                  validators=[api.models.validate_rut])),
                ('dose',
                 models.DecimalField(decimal_places=2,
                                     max_digits=3,
                                     validators=[api.models.validate_dose])),
                ('date', models.DateField()),
                ('drug',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Drug')),
            ],
            options={
                'verbose_name': 'Vaccination',
                'ordering': ['id'],
            },
        ),
    ]
Beispiel #13
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0040_auto_20180328_1936'),
    ]

    operations = [
        migrations.AddField(
            model_name='provider',
            name='active_from',
            field=models.DateField(default=api.models.current_timestamp),
        ),
        migrations.AddField(
            model_name='provider',
            name='address',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='api.Address'),
        ),
        migrations.AddField(
            model_name='provider',
            name='parent_provider',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='api.Provider'),
        ),
        migrations.AddField(
            model_name='provider',
            name='poc',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='api.User'),
        ),
        migrations.AddField(
            model_name='provider',
            name='type',
            field=models.CharField(choices=[('clinic', 'clinic'),
                                            ('hospital', 'hospital'),
                                            ('diagnostic_centre',
                                             'diagnostic center')],
                                   default='hospital',
                                   max_length=30),
        ),
    ]
Beispiel #14
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(max_length=255, unique=True)),
                ('username', models.CharField(max_length=50, unique=True)),
                ('password', models.CharField(max_length=50)),
                ('date_joined', models.DateField()),
                ('last_login', models.DateTimeField()),
                ('rapid_rating', models.IntegerField(default=600)),
                ('blitz_rating', models.IntegerField(default=600)),
                ('bullet_rating', models.IntegerField(default=600)),
                ('is_active', models.BooleanField(default=True)),
                ('staff', models.BooleanField(default=False)),
                ('admin', models.BooleanField(default=False)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fen', models.TextField()),
                ('black', models.ForeignKey(on_delete=models.SET(api.models.get_deleted_user), related_name='black_games', to=settings.AUTH_USER_MODEL)),
                ('white', models.ForeignKey(on_delete=models.SET(api.models.get_deleted_user), related_name='white_games', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Beispiel #15
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country_code', models.CharField(max_length=225)),
                ('full_name', models.CharField(max_length=225)),
                ('phone_number', models.CharField(max_length=10)),
                ('is_favorite', models.BooleanField(default=False)),
                ('custom_id', models.PositiveIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('email', models.EmailField(max_length=225, unique=True)),
                ('full_name', models.CharField(max_length=225)),
                ('date_joined', models.DateField(auto_now_add=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('contacts', models.ManyToManyField(to='api.Contact')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', api.models.UserManager()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0011_auto_20191221_0320'),
    ]

    operations = [
        migrations.AddField(
            model_name='match',
            name='match_date',
            field=models.DateField(auto_now_add=True,
                                   default=django.utils.timezone.now),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='replay',
            name='file',
            field=models.FileField(upload_to=api.models.upload_replay_to),
        ),
    ]
Beispiel #17
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0091_auto_20180507_0321'),
    ]

    operations = [
        migrations.AddField(
            model_name='seeker',
            name='dob',
            field=models.DateField(default=api.models.current_timestamp),
        ),
        migrations.AlterField(
            model_name='facility',
            name='facility_type',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='api.FacilityType'),
        ),
    ]
Beispiel #18
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Countdown',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('time', models.DateTimeField()),
                ('key',
                 models.CharField(default=api.models.generateKey,
                                  max_length=64)),
                ('created_at',
                 models.DateField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='CountdownEvent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('text', models.CharField(max_length=256)),
                ('time_delta', models.DurationField()),
                ('countdown',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Countdown')),
            ],
        ),
    ]
Beispiel #19
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Receipt',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('static_id', models.CharField(max_length=10)),
                ('date_added', models.DateField(auto_now=True)),
                ('image',
                 models.ImageField(blank=True,
                                   max_length=254,
                                   null=True,
                                   upload_to=api.models.recieptsFile)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='reciepts',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterField(
            model_name='pitem',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='pitems',
                to=settings.AUTH_USER_MODEL),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Agent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('status', models.BooleanField(default=False)),
                ('env', models.CharField(max_length=20)),
                ('version', models.CharField(max_length=5)),
                ('address', models.GenericIPAddressField(protocol='IPv4')),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('level',
                 models.CharField(choices=[('CRITICAL', 'CRITICAL'),
                                           ('DEBUG', 'DEBUG'),
                                           ('ERROR', 'ERROR'),
                                           ('WARNING', 'WARNING'),
                                           ('INFO', 'INFO')],
                                  max_length=20,
                                  validators=[api.models.validate_level])),
                ('data', models.TextField()),
                ('arquivado', models.BooleanField(default=False)),
                ('date', models.DateField(auto_now=True)),
                ('agent',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='api.Agent')),
            ],
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='GroupUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('group_id',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='api.Group')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('last_login', models.DateTimeField(auto_now=True)),
                ('email',
                 models.CharField(
                     max_length=254,
                     validators=[django.core.validators.EmailValidator()])),
                ('password',
                 models.CharField(
                     max_length=50,
                     validators=[django.core.validators.EmailValidator()])),
            ],
        ),
        migrations.AddField(
            model_name='groupuser',
            name='user_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.DO_NOTHING, to='api.User'),
        ),
        migrations.AddField(
            model_name='event',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.DO_NOTHING, to='api.User'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Agent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.TextField(max_length=50)),
                ('status', models.BooleanField(default=True)),
                ('env', models.TextField(max_length=50)),
                ('version', models.TextField(max_length=5)),
                ('address',
                 models.TextField(
                     max_length=39,
                     validators=[django.core.validators.validate_ipv4_address
                                 ])),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.TextField(max_length=50)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.TextField(max_length=50)),
                ('last_login', models.DateField(auto_now=True)),
                ('email',
                 models.TextField(
                     max_length=254,
                     validators=[django.core.validators.EmailValidator()])),
                ('password',
                 models.TextField(
                     max_length=50,
                     validators=[django.core.validators.MinLengthValidator(6)
                                 ])),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='GroupUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('group',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Group')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.User')),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('level',
                 models.TextField(
                     choices=[(0, 'INFO'), (1, 'DEBUG'), (2, 'WARNING'),
                              (3, 'ERROR'), (4, 'CRITICAL')],
                     max_length=20,
                     validators=[api.models.Event.level_validator])),
                ('data', models.TextField(max_length=20)),
                ('arquivado', models.BooleanField(default=False)),
                ('date', models.DateField(auto_now=True)),
                ('agent',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Agent')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.User')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('phone_number',
                 phonenumber_field.modelfields.PhoneNumberField(max_length=128,
                                                                region=None,
                                                                unique=True)),
                ('full_name', models.CharField(default='', max_length=60)),
                ('dob', models.DateField(default=None, null=True)),
                ('bio', models.TextField(blank=True, default='')),
                ('address', models.CharField(default='', max_length=120)),
                ('location',
                 django.contrib.gis.db.models.fields.PointField(
                     default=django.contrib.gis.geos.point.Point(0, 0),
                     srid=4326)),
                ('is_location', models.BooleanField(default=False)),
                ('photo', models.FileField(null=True, upload_to='')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', api.models.PhoneNumberUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='PhoneToken',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('phone_number',
                 phonenumber_field.modelfields.PhoneNumberField(editable=False,
                                                                max_length=128,
                                                                region=None)),
                ('otp', models.CharField(editable=False, max_length=40)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('attempts', models.IntegerField(default=0)),
                ('used', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'OTP Token',
                'verbose_name_plural': 'OTP Tokens',
            },
        ),
        migrations.CreateModel(
            name='VoiceMessage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('file', models.FileField(upload_to='')),
                ('from_user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='sender',
                                   to=settings.AUTH_USER_MODEL)),
                ('to_user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='receiver',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='LikeMessage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('updated', models.DateTimeField(auto_now=True)),
                ('is_like', models.BooleanField(default=True)),
                ('message',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='likes',
                                   to='api.VoiceMessage')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='likes',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='CallInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('status', models.CharField(default='', max_length=60)),
                ('duration', models.IntegerField(default=0)),
                ('from_user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='call_sender',
                                   to=settings.AUTH_USER_MODEL)),
                ('to_user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='call_receiver',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Beispiel #23
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="Category",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100,
                                          verbose_name="Name")),
            ],
            options={
                "verbose_name": "Kategorie",
                "verbose_name_plural": "Kategorien",
            },
        ),
        migrations.CreateModel(
            name="Location",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100,
                                          verbose_name="Name")),
                (
                    "number",
                    models.IntegerField(blank=True,
                                        null=True,
                                        unique=True,
                                        verbose_name="Schranknummer"),
                ),
            ],
            options={
                "verbose_name": "Ort",
                "verbose_name_plural": "Orte",
            },
        ),
        migrations.CreateModel(
            name="Person",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=200,
                                          verbose_name="Name")),
                (
                    "email",
                    models.EmailField(blank=True,
                                      max_length=254,
                                      verbose_name="E-Mail"),
                ),
                ("notes", models.TextField(blank=True,
                                           verbose_name="Notizen")),
                (
                    "is_within_school",
                    models.BooleanField(default=False,
                                        verbose_name="Schulintern?"),
                ),
                (
                    "is_technician",
                    models.BooleanField(default=False,
                                        verbose_name="Aktiver Techniker?"),
                ),
            ],
            options={
                "verbose_name": "Person",
                "verbose_name_plural": "Personen",
            },
        ),
        migrations.CreateModel(
            name="Preset",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name",
                 models.CharField(max_length=200, verbose_name="Bezeichnung")),
                (
                    "manufacturer",
                    models.CharField(blank=True,
                                     max_length=100,
                                     verbose_name="Hersteller"),
                ),
                (
                    "description",
                    models.TextField(blank=True, verbose_name="Beschreibung"),
                ),
                (
                    "image",
                    models.ImageField(blank=True,
                                      upload_to="images/presets/",
                                      verbose_name="Bild"),
                ),
                (
                    "category",
                    models.ForeignKey(
                        default=api.models.default_category,
                        on_delete=django.db.models.deletion.SET_DEFAULT,
                        related_name="presets",
                        to="api.Category",
                        verbose_name="Kategorie",
                    ),
                ),
            ],
            options={
                "verbose_name": "Preset",
                "verbose_name_plural": "Presets",
            },
        ),
        migrations.CreateModel(
            name="Item",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name",
                 models.CharField(max_length=200, verbose_name="Bezeichnung")),
                (
                    "barcode",
                    models.CharField(
                        blank=True,
                        help_text=
                        "Frei lassen, um Barcode automatisch zu generieren",
                        max_length=15,
                        null=True,
                        unique=True,
                        verbose_name="Barcode",
                    ),
                ),
                ("notes", models.TextField(blank=True,
                                           verbose_name="Notizen")),
                (
                    "last_time_seen_at",
                    models.DateTimeField(
                        auto_now=True, verbose_name="Letztes Mal gesehen am"),
                ),
                (
                    "category",
                    models.ForeignKey(
                        default=api.models.default_category,
                        on_delete=django.db.models.deletion.SET_DEFAULT,
                        related_name="items",
                        to="api.Category",
                        verbose_name="Kategorie",
                    ),
                ),
                (
                    "location",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="items",
                        to="api.Location",
                        verbose_name="Ort",
                    ),
                ),
                (
                    "preset",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="items",
                        to="api.Preset",
                        verbose_name="Preset",
                    ),
                ),
            ],
            options={
                "verbose_name": "Objekt",
                "verbose_name_plural": "Objekte",
            },
        ),
        migrations.CreateModel(
            name="CheckOutProcess",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "checked_out_at",
                    models.DateTimeField(auto_now_add=True,
                                         verbose_name="Check-Out-Zeitpunkt"),
                ),
                (
                    "is_check_out_in_process",
                    models.BooleanField(default=True,
                                        verbose_name="Check-Out im Prozess?"),
                ),
                (
                    "check_in_until",
                    models.DateField(blank=True,
                                     null=True,
                                     verbose_name="Check-In bis"),
                ),
                (
                    "borrowing_person",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="check_outs",
                        to="api.Person",
                        verbose_name="Ausleihende Person",
                    ),
                ),
                (
                    "lending_user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="check_outs",
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="Verleihender Nutzer",
                    ),
                ),
            ],
            options={
                "verbose_name": "Check-Out-Vorgang",
                "verbose_name_plural": "Check-Out-Vorgänge",
            },
        ),
        migrations.CreateModel(
            name="Check",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "checked_in",
                    models.BooleanField(default=False,
                                        verbose_name="Check-In durchgeführt?"),
                ),
                (
                    "checked_in_at",
                    models.DateTimeField(blank=True,
                                         null=True,
                                         verbose_name="Check-In-Zeitpunkt"),
                ),
                (
                    "check_out",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="checks",
                        to="api.CheckOutProcess",
                        verbose_name="Check-Out-Vorgang",
                    ),
                ),
                (
                    "checked_in_by",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="check_ins",
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="Check-In durchgeführt von",
                    ),
                ),
                (
                    "item",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="checks",
                        to="api.Item",
                        verbose_name="Objekt",
                    ),
                ),
            ],
            options={
                "verbose_name": "Check",
                "verbose_name_plural": "Checks",
            },
        ),
    ]
Beispiel #24
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('email',
                 models.EmailField(max_length=254,
                                   null=True,
                                   verbose_name='email address')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='last name')),
                ('code', models.IntegerField(blank=True,
                                             null=True,
                                             unique=True)),
                ('cell', models.CharField(blank=True, max_length=15,
                                          null=True)),
                ('role',
                 models.CharField(choices=[('SR', 'sales representative'),
                                           ('SO', 'sales officer'),
                                           ('SM', 'sales manager'),
                                           ('AM', 'area manager')],
                                  max_length=25,
                                  null=True)),
                ('date_joined',
                 models.DateField(null=True, verbose_name='date joined')),
                ('date_expire',
                 models.DateField(null=True, verbose_name='date expire')),
                ('avatar',
                 models.ImageField(blank=True,
                                   default='static/avatars/default.jpg',
                                   null=True,
                                   upload_to='static/avatars/')),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='active')),
                ('is_admin', models.BooleanField(default=False)),
                ('lft',
                 models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght',
                 models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id',
                 models.PositiveIntegerField(db_index=True, editable=False)),
                ('level',
                 models.PositiveIntegerField(db_index=True, editable=False)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('parent',
                 mptt.fields.TreeForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     related_name='user',
                     to=settings.AUTH_USER_MODEL)),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', api.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('client_name', models.CharField(max_length=200)),
                ('client_number', models.CharField(max_length=200)),
                ('client_dob', models.DateField(auto_now_add=True)),
                ('status', models.CharField(max_length=200)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='BusService',
            fields=[
                ('id',
                 models.CharField(max_length=100,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('route',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=100),
                     blank=True,
                     default=api.models.BusService.default_array_field,
                     size=None)),
                ('timing',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=20),
                     blank=True,
                     default=api.models.BusService.default_array_field,
                     size=None)),
                ('boarding_point',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(blank=True, max_length=100),
                     blank=True,
                     default=api.models.BusService.default_array_field,
                     size=None)),
                ('price', models.IntegerField(default=0)),
                ('bus_number',
                 models.CharField(blank=True, default='', max_length=20)),
                ('is_ready', models.BooleanField(default=False)),
                ('provider',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(max_length=100),
                     default=api.models.BusService.default_array_field,
                     size=None)),
                ('seats', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='HotelBooking',
            fields=[
                ('id',
                 models.CharField(max_length=100,
                                  primary_key=True,
                                  serialize=False)),
                ('service_id', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=100)),
                ('in_date', models.DateField()),
                ('out_date', models.DateField()),
                ('booking_date',
                 models.DateField(default=django.utils.timezone.now)),
                ('rooms', models.IntegerField(default=0)),
                ('bill', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='HotelService',
            fields=[
                ('id',
                 models.CharField(max_length=100,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('city',
                 models.CharField(blank=True, default='', max_length=100)),
                ('description',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=1000,
                                  null=True)),
                ('area',
                 models.CharField(blank=True, default='', max_length=100)),
                ('address',
                 models.CharField(blank=True, default='', max_length=200)),
                ('check_in', models.TimeField(blank=True, null=True)),
                ('check_out', models.TimeField(blank=True, null=True)),
                ('price', models.IntegerField(default=0)),
                ('is_ready', models.BooleanField(default=False)),
                ('provider',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.CharField(max_length=100),
                     default=api.models.HotelService.default_array_field,
                     size=None)),
                ('rooms', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('email',
                 models.EmailField(max_length=100,
                                   primary_key=True,
                                   serialize=False)),
                ('password', models.CharField(max_length=500)),
                ('token', models.CharField(max_length=500)),
                ('type',
                 models.CharField(choices=[('U', 'Standard User'),
                                           ('A', 'Admin'),
                                           ('S', 'Service Provider')],
                                  max_length=1)),
                ('activated', models.BooleanField(default=False)),
            ],
        ),
    ]
Beispiel #26
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Business',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Business Name')),
                ('county', models.CharField(max_length=200)),
                ('city', models.CharField(max_length=200)),
                ('street', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Product Category')),
                ('business', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Business')),
            ],
            options={
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_name', models.CharField(max_length=255, verbose_name='Product Name')),
                ('product_code', models.CharField(max_length=25, unique=True)),
                ('description', models.TextField(default='')),
                ('unit_price', models.DecimalField(decimal_places=2, max_digits=8)),
                ('purchase_date', models.DateField(default=django.utils.timezone.now)),
                ('total_inital_units', models.PositiveIntegerField()),
                ('end_on', models.DateTimeField(blank=True, null=True)),
                ('expires_on', models.DateField()),
                ('available_units', models.PositiveIntegerField()),
                ('sold_unit', models.PositiveIntegerField(default=0)),
                ('damaged_units', models.PositiveIntegerField(default=0)),
                ('business', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Business')),
                ('product_category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='category', to='api.Category')),
            ],
        ),
        migrations.CreateModel(
            name='Receipt',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sold_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('receipt_number', models.CharField(max_length=150)),
                ('total_selling_price', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
                ('business', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Business')),
                ('served_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ReceiptItems',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('selling_price_per_unit', models.DecimalField(decimal_places=2, default=0, max_digits=8)),
                ('units', models.DecimalField(decimal_places=2, max_digits=4)),
                ('items_return', models.DecimalField(decimal_places=2, default=0, max_digits=8)),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Product')),
                ('receipt', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Receipt')),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone_number', models.CharField(blank=True, max_length=20, null=True)),
                ('avatar', django_resized.forms.ResizedImageField(blank=True, null=True, upload_to=api.models.get_UserProfile_avatar_path)),
                ('national_id', models.CharField(blank=True, max_length=100, null=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='business',
            name='owner',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='api.UserProfile'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='Email')),
                ('patronymic',
                 models.CharField(max_length=100, verbose_name='Отчество')),
                ('position',
                 models.CharField(max_length=100, verbose_name='Должность')),
                ('department',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Подразделение')),
                ('date_of_birth',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Дата рождения')),
                ('education',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Образование')),
                ('experience',
                 models.PositiveIntegerField(blank=True,
                                             null=True,
                                             verbose_name='Стаж')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'Пользователь',
                'verbose_name_plural': 'Пользователи',
            },
            managers=[
                ('objects', api.models.UserManager()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Admin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('password', models.CharField(max_length=400)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='FootballMatchCommentary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('current_play_time_status', models.CharField(blank=True, choices=[('FIRST_HALF', 'FIRST_HALF'), ('SECOND_HALF', 'FIRST_HALF'), ('EXTRA_TIME', 'EXTRA TIME'), ('INJURY_TIME', 'INJURY_TIME')], max_length=200, null=True)),
                ('commentary_heading', models.TextField(blank=True, null=True)),
                ('commentary_content', models.TextField()),
                ('is_key_event', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='FootBallMatchDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('match_starting_date', models.DateField(blank=True, db_index=True, null=True)),
                ('match_finishing_date', models.DateField(blank=True, null=True)),
                ('match_starting_time', models.TimeField(blank=True, null=True)),
                ('match_finishing_time', models.TimeField(blank=True, null=True)),
                ('match_status', models.CharField(choices=[('UPCOMING', 'MATCH_STATUS'), ('STARTED', 'STARTED'), ('FINISHED', 'FINISHED'), ('POSTPONED', 'POSTPONED'), ('DELAYED', 'DELAYED'), ('DRAW', 'DRAW')], db_index=True, max_length=200)),
                ('match_status_text', models.CharField(blank=True, max_length=200, null=True)),
                ('match_facts', models.TextField(blank=True, null=True)),
                ('match_description', models.TextField(blank=True, null=True)),
                ('venue', models.TextField()),
                ('postponed_date', models.DateField(blank=True, null=True)),
                ('postponed_time', models.TimeField(blank=True, null=True)),
                ('sport', models.CharField(choices=[('FOOTBALL', 'FOOTBALL')], max_length=200)),
                ('team_one_score', models.IntegerField(default=0)),
                ('team_two_score', models.IntegerField(default=0)),
                ('should_show_on_home_page', models.BooleanField(default=False)),
                ('identifier', models.CharField(blank=True, max_length=100, null=True)),
            ],
            options={
                'ordering': ('created_at',),
            },
        ),
        migrations.CreateModel(
            name='GuestNews',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('news_date', models.DateField(db_index=True)),
                ('content', models.TextField()),
                ('source', models.CharField(max_length=200)),
                ('title', models.TextField()),
                ('sport', models.CharField(choices=[('FOOTBALL', 'FOOTBALL')], max_length=200)),
                ('number_of_likes', models.IntegerField(default=0)),
                ('number_of_dislikes', models.IntegerField(default=0)),
                ('display_order', models.IntegerField(default=0)),
                ('is_admin_approved', models.BooleanField(default=False)),
            ],
            options={
                'ordering': ('created_at',),
            },
        ),
        migrations.CreateModel(
            name='MatchPlayer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=200)),
                ('jersey_number', models.IntegerField(blank=True, null=True)),
                ('player_role', models.CharField(choices=[('CAPTAIN', 'CAPTAIN'), ('VICE_CAPTAIN', 'VICE_CAPTION'), ('GOAL_KEEPER', 'GOAL_KEEPER'), ('NORMAL', 'NORMAL')], default='NORMAL', max_length=200)),
                ('position', models.CharField(blank=True, max_length=200, null=True)),
                ('order', models.IntegerField(default=0)),
                ('match', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='players', to='api.FootBallMatchDetails')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MatchSeries',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('display_name', models.CharField(max_length=200)),
                ('identifier', models.CharField(max_length=200, unique=True)),
                ('country', models.CharField(blank=True, max_length=200, null=True)),
                ('starting_date', models.DateField(blank=True, null=True)),
                ('ending_date', models.DateField(blank=True, null=True)),
                ('sport', models.CharField(choices=[('FOOTBALL', 'FOOTBALL')], db_index=True, max_length=200)),
            ],
            options={
                'ordering': ('display_name',),
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('news_date', models.DateField(db_index=True)),
                ('content', models.TextField()),
                ('source', models.CharField(max_length=200)),
                ('title', models.TextField()),
                ('news_tags', models.TextField(blank=True, null=True)),
                ('sport', models.CharField(choices=[('FOOTBALL', 'FOOTBALL')], max_length=200)),
                ('is_trending', models.BooleanField(default=False)),
                ('trend_scale', models.IntegerField(default=0)),
                ('number_of_likes', models.IntegerField(default=0)),
                ('number_of_dislikes', models.IntegerField(default=0)),
                ('number_of_views', models.IntegerField(default=0)),
                ('display_order', models.IntegerField(default=0)),
                ('image', models.ImageField(blank=True, null=True, upload_to=api.models.get_news_image_path)),
                ('identifier', models.IntegerField(blank=True, null=True, unique=True)),
            ],
            options={
                'ordering': ('created_at',),
            },
        ),
        migrations.CreateModel(
            name='NewsRelationsShip',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('relation_index', models.IntegerField(default=0)),
                ('common_tags', models.TextField(default='[]')),
                ('news', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='api.News')),
                ('related_news', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='api.News')),
            ],
        ),
        migrations.CreateModel(
            name='NewsTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('tag_name', models.CharField(max_length=200, unique=True)),
            ],
            options={
                'ordering': ('tag_name',),
            },
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=200)),
                ('sport', models.CharField(choices=[('FOOTBALL', 'FOOTBALL')], db_index=True, max_length=200)),
                ('biography', models.TextField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SportsMatch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('match_starting_date', models.DateField(db_index=True)),
                ('match_starting_time', models.TimeField()),
                ('match_finishing_date', models.DateField()),
                ('match_finishing_time', models.TimeField()),
                ('status', models.CharField(choices=[('UPCOMING', 'MATCH_STATUS'), ('STARTED', 'STARTED'), ('FINISHED', 'FINISHED'), ('POSTPONED', 'POSTPONED'), ('DELAYED', 'DELAYED'), ('DRAW', 'DRAW')], db_index=True, max_length=200)),
                ('match_facts', models.TextField(null=True)),
                ('match_description', models.TextField()),
                ('venue', models.TextField()),
                ('postponed_date', models.DateField()),
                ('postponed_time', models.TimeField()),
                ('concise_summary_text', models.TextField()),
                ('sport', models.CharField(choices=[('FOOTBALL', 'FOOTBALL')], db_index=True, max_length=200)),
            ],
            options={
                'ordering': ('created_at',),
            },
        ),
        migrations.CreateModel(
            name='SportsTeam',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('display_name', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, null=True)),
                ('sport', models.CharField(choices=[('FOOTBALL', 'FOOTBALL')], db_index=True, max_length=200)),
                ('team_identifier', models.CharField(max_length=200)),
            ],
            options={
                'ordering': ('display_name',),
            },
        ),
        migrations.AddField(
            model_name='sportsmatch',
            name='team_one',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='api.SportsTeam'),
        ),
        migrations.AddField(
            model_name='sportsmatch',
            name='team_two',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='api.SportsTeam'),
        ),
        migrations.AddField(
            model_name='sportsmatch',
            name='team_won',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='api.SportsTeam'),
        ),
        migrations.AddField(
            model_name='news',
            name='related_news',
            field=models.ManyToManyField(blank=True, related_name='_news_related_news_+', through='api.NewsRelationsShip', to='api.News'),
        ),
        migrations.AddField(
            model_name='news',
            name='related_tags',
            field=models.ManyToManyField(blank=True, related_name='_news_related_tags_+', to='api.NewsTag'),
        ),
        migrations.AddField(
            model_name='footballmatchdetails',
            name='match_series',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='matches', to='api.MatchSeries'),
        ),
        migrations.AddField(
            model_name='footballmatchdetails',
            name='team_one',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='api.SportsTeam'),
        ),
        migrations.AddField(
            model_name='footballmatchdetails',
            name='team_two',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='api.SportsTeam'),
        ),
        migrations.AddField(
            model_name='footballmatchdetails',
            name='team_won',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='api.SportsTeam'),
        ),
        migrations.AddField(
            model_name='footballmatchcommentary',
            name='football_match',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='commentaries', to='api.FootBallMatchDetails'),
        ),
        migrations.AlterUniqueTogether(
            name='newsrelationsship',
            unique_together=set([('news', 'related_news')]),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='athlete',
            options={
                'verbose_name': 'Sporcu',
                'verbose_name_plural': 'Sporcular'
            },
        ),
        migrations.AlterModelOptions(
            name='category',
            options={
                'verbose_name': 'Kategori',
                'verbose_name_plural': 'Kategoriler'
            },
        ),
        migrations.AlterModelOptions(
            name='controlpoint',
            options={
                'verbose_name': 'Kontrol Noktası',
                'verbose_name_plural': 'Kontrol Noktaları'
            },
        ),
        migrations.AlterModelOptions(
            name='event',
            options={
                'verbose_name': 'Etkinlik',
                'verbose_name_plural': 'Etkinlikler'
            },
        ),
        migrations.AlterModelOptions(
            name='record',
            options={
                'verbose_name': 'Kayıt',
                'verbose_name_plural': 'Kayıtlar'
            },
        ),
        migrations.AlterField(
            model_name='athlete',
            name='card_id',
            field=models.IntegerField(verbose_name='Kart NO'),
        ),
        migrations.AlterField(
            model_name='athlete',
            name='category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='api.category',
                verbose_name='Kategori'),
        ),
        migrations.AlterField(
            model_name='athlete',
            name='name',
            field=models.CharField(blank=True,
                                   max_length=100,
                                   null=True,
                                   verbose_name='Ad Soyad'),
        ),
        migrations.AlterField(
            model_name='category',
            name='control_points',
            field=models.JSONField(
                default=list,
                validators=[api.models.validate_control_points],
                verbose_name='Kontrol Noktaları'),
        ),
        migrations.AlterField(
            model_name='category',
            name='event',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='api.event',
                verbose_name='Etkinlik'),
        ),
        migrations.AlterField(
            model_name='category',
            name='name',
            field=models.CharField(max_length=100,
                                   verbose_name='Kategori Adı'),
        ),
        migrations.AlterField(
            model_name='controlpoint',
            name='desc',
            field=models.TextField(blank=True,
                                   null=True,
                                   verbose_name='Açıklama'),
        ),
        migrations.AlterField(
            model_name='controlpoint',
            name='name',
            field=models.CharField(max_length=100,
                                   unique=True,
                                   verbose_name='Adı'),
        ),
        migrations.AlterField(
            model_name='event',
            name='date',
            field=models.DateField(unique=True, verbose_name='Tarih'),
        ),
        migrations.AlterField(
            model_name='event',
            name='name',
            field=models.CharField(max_length=100,
                                   verbose_name='Etkinlik Adı'),
        ),
        migrations.AlterField(
            model_name='record',
            name='athlete',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                to='api.athlete',
                verbose_name='Sporcu'),
        ),
        migrations.AlterField(
            model_name='record',
            name='results',
            field=models.JSONField(default=list, verbose_name='Sonuçlar'),
        ),
        migrations.AlterUniqueTogether(
            name='athlete',
            unique_together={('category', 'card_id')},
        ),
        migrations.AlterUniqueTogether(
            name='category',
            unique_together={('event', 'name'), ('event', 'control_points')},
        ),
    ]
Beispiel #30
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('is_donor_or_hospital', models.BooleanField(default=False)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', api.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email_confirmed', models.BooleanField(default=False)),
                ('phone_number', models.CharField(max_length=15, null=True)),
                ('location', models.CharField(max_length=15, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Donor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('bloodGroup', models.CharField(max_length=2, null=True)),
                ('birth_date', models.DateField(null=True)),
                ('last_donated_date', models.DateField(null=True)),
                ('capable', models.BooleanField(default=True)),
                ('gender', models.CharField(max_length=10, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]