class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='ImageMetadata',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('filename', models.CharField(max_length=256)),
                ('image_path',
                 models.ImageField(upload_to=backend.models.new_image_path)),
                ('upload_time', models.DateTimeField(auto_now_add=True)),
                ('thumbnails_json',
                 models.CharField(blank=True,
                                  default=None,
                                  max_length=256,
                                  null=True)),
            ],
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('backend', '0051_auto_20201212_2258'),
    ]

    operations = [
        migrations.AlterField(
            model_name='expertise',
            name='name',
            field=models.CharField(help_text='Expertise description', max_length=100, unique=True),
        ),
        migrations.AlterField(
            model_name='expertisekeyword',
            name='name',
            field=models.CharField(help_text='Expertise keyword description', max_length=100, unique=True),
        ),
        migrations.AlterField(
            model_name='userinformation',
            name='avatar',
            field=models.ImageField(blank=True, help_text='Your profile picture.', null=True, upload_to='profiles', validators=[backend.models.UserInformation.validate_avatar]),
        ),
        migrations.AlterUniqueTogether(
            name='degree',
            unique_together={('level', 'domain', 'institution', 'user')},
        ),
    ]
Exemplo n.º 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='NULL', max_length=256,
                                  unique=True)),
                ('details', models.CharField(max_length=512)),
                ('image',
                 models.ImageField(upload_to=backend.models.upload_task)),
            ],
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(
                     upload_to=backend.models.upload_submission)),
                ('score', models.IntegerField(blank=True, null=True)),
                ('task',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.task')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('backend', '0008_auto_20200603_1404'),
    ]

    operations = [
        migrations.AlterField(
            model_name='image',
            name='image',
            field=models.ImageField(upload_to=backend.models.Image.upload_to),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('backend', '0041_userinformation_avatar'),
    ]

    operations = [
        migrations.AlterField(
            model_name='userinformation',
            name='avatar',
            field=models.ImageField(
                blank=True,
                help_text='Your profile picture.',
                upload_to='profiles',
                validators=[backend.models.UserInformation.validate_avatar]),
        ),
    ]
Exemplo n.º 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('backend', '0005_auto_20180803_0855'),
    ]

    operations = [
        migrations.CreateModel(
            name='UpcomingBook',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('author', models.CharField(blank=True, max_length=100)),
                ('image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=backend.models.upload_image_path)),
                ('created_date', models.DateField(verbose_name='Added Date')),
                ('updated_date',
                 models.DateField(verbose_name='Updated Date')),
                ('launched_date',
                 models.DateField(verbose_name='Launched Date')),
                ('category',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Category')),
            ],
            options={
                'ordering': ['title'],
            },
        ),
    ]
Exemplo n.º 7
0
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')),
                ('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=150, 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')),
                ('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', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Automobile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('auto_type', models.CharField(choices=[('S', 'SEDAN'), ('T', 'TRUCK'), ('M', 'MOTORCYCLE'), ('U', 'UNKNOWN')], default='U', max_length=2)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('city', models.CharField(blank=True, max_length=1023, null=True, verbose_name='City')),
                ('country', django_countries.fields.CountryField(blank=True, max_length=2, null=True)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Lead',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('author', models.CharField(max_length=100)),
                ('message', models.CharField(max_length=300)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='ServiceProvider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('payment', models.CharField(max_length=100)),
                ('city', models.CharField(blank=True, max_length=1023, null=True, verbose_name='City')),
                ('country', django_countries.fields.CountryField(blank=True, max_length=2, null=True)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Shop',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('shop_name', models.CharField(max_length=50, unique=True)),
                ('membership', models.CharField(choices=[('P', 'Premium'), ('B', 'Basic'), ('F', 'Free')], default='F', max_length=2)),
                ('longitude', models.DecimalField(decimal_places=6, default=-76.585664, max_digits=9)),
                ('latitude', models.DecimalField(decimal_places=6, default=2.449903, max_digits=9)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='my_shops', to='backend.serviceprovider')),
            ],
        ),
        migrations.CreateModel(
            name='ShopService',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.DecimalField(decimal_places=0, max_digits=10, verbose_name='Service Price')),
                ('services', multiselectfield.db.fields.MultiSelectField(choices=[('OC', 'OIL CHANGE'), ('OFC', 'FILTER CHANGE'), ('AIF', 'AIR_FILTER_CHANGE'), ('WB', 'WIPER BLADE REPLACEMENT'), ('TR', 'TIRE FIXING'), ('PW', 'PAINT WORK'), ('TA', 'PROFESSIONAL TECHNICAL ASSISTANCE'), ('MA', 'SCHEDULED MAINTENANCE'), ('CW', 'CAR WASHING'), ('BW', 'BRAKE WORK'), ('ETU', 'ENGINE TUNE UP'), ('WW', 'WHEELS ALIGNED/BALANCED'), ('NN', 'NO SERVICE LISTED')], default='NN', max_length=41)),
                ('description', models.CharField(default='', max_length=250)),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shop_services', to='backend.shop')),
                ('target_automobile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='related_services', to='backend.automobile')),
            ],
        ),
        migrations.CreateModel(
            name='ServiceCoverage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('coverage', models.CharField(choices=[('OC', 'OIL CHANGE'), ('OFC', 'FILTER CHANGE'), ('AIF', 'AIR_FILTER_CHANGE'), ('WB', 'WIPER BLADE REPLACEMENT'), ('TR', 'TIRE FIXING'), ('PW', 'PAINT WORK'), ('TA', 'PROFESSIONAL TECHNICAL ASSISTANCE'), ('MA', 'SCHEDULED MAINTENANCE'), ('CW', 'CAR WASHING'), ('BW', 'BRAKE WORK'), ('ETU', 'ENGINE TUNE UP'), ('WW', 'WHEELS ALIGNED/BALANCED'), ('NN', 'NO SERVICE LISTED')], default='NN', max_length=3)),
                ('shop_offer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='available_services', to='backend.shopservice')),
            ],
        ),
        migrations.CreateModel(
            name='CustomerPublication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=100)),
                ('longitude', models.DecimalField(decimal_places=6, default=-76.606422, max_digits=9)),
                ('latitude', models.DecimalField(decimal_places=6, default=2.44165, max_digits=9)),
                ('photo', models.ImageField(default=backend.models.get_random_name, upload_to='images/publication_images', verbose_name='Optional Image')),
                ('publisher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='service_inquiry', to='backend.customer')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    replaces = [('backend', '0035_auto_20201212_1810'),
                ('backend', '0036_auto_20201212_1826'),
                ('backend', '0037_auto_20201212_1831'),
                ('backend', '0038_auto_20201212_1831'),
                ('backend', '0039_auto_20201212_1831'),
                ('backend', '0040_auto_20201212_1840'),
                ('backend', '0041_userinformation_avatar'),
                ('backend', '0042_auto_20201212_1847'),
                ('backend', '0043_auto_20201212_2057'),
                ('backend', '0044_verifiedemail_user'),
                ('backend', '0045_remove_userinformation_emails'),
                ('backend', '0046_auto_20201212_2126'),
                ('backend', '0047_auto_20201212_2127'),
                ('backend', '0048_auto_20201212_2151'),
                ('backend', '0049_populate_emails'),
                ('backend', '0050_auto_20201212_2211'),
                ('backend', '0051_auto_20201212_2258'),
                ('backend', '0052_auto_20201212_2327'),
                ('backend', '0053_auto_20201212_2341'),
                ('backend', '0054_auto_20201212_2343'),
                ('backend', '0055_auto_20201213_0022'),
                ('backend', '0056_auto_20201213_0041'),
                ('backend', '0057_auto_20201213_0125'),
                ('backend', '0058_auto_20201213_0126'),
                ('backend', '0059_verifiableemail_domain')]

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('backend', '0034_auto_20201203_1151'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='userpreferences',
            name='description',
        ),
        migrations.CreateModel(
            name='Expertise',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text='Expertise description',
                                  max_length=100)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='ExpertiseKeyword',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text='Expertise keyword description',
                                  max_length=100)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='UserInformation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.TextField(blank=True,
                                  help_text='Your position',
                                  null=True)),
                ('bio',
                 models.TextField(
                     blank=True,
                     help_text='Self-description (degree, biography, ...)',
                     null=True)),
                ('comment_anonymously',
                 models.BooleanField(
                     default=False,
                     help_text='Comment anonymously by-default')),
                ('show_online_presence',
                 models.BooleanField(
                     default=False,
                     help_text='Show my online presence on Tournesol')),
                ('birth_year',
                 models.IntegerField(
                     blank=True,
                     help_text='Year of birth',
                     null=True,
                     validators=[
                         django.core.validators.MinValueValidator(1900),
                         django.core.validators.MaxValueValidator(2100)
                     ])),
                ('gender',
                 models.CharField(blank=True,
                                  help_text='Your gender',
                                  max_length=50,
                                  null=True)),
                ('nationality',
                 models.CharField(blank=True,
                                  help_text='Your nationality',
                                  max_length=50,
                                  null=True)),
                ('race',
                 models.CharField(blank=True,
                                  help_text='Your race',
                                  max_length=50,
                                  null=True)),
                ('political_affiliation',
                 models.CharField(blank=True,
                                  help_text='Your political affiliation',
                                  max_length=50,
                                  null=True)),
                ('religion',
                 models.CharField(blank=True,
                                  help_text='Your religion',
                                  max_length=50,
                                  null=True)),
                ('degree_of_political_engagement',
                 models.CharField(
                     blank=True,
                     help_text='Your degree of political engagement',
                     max_length=50,
                     null=True)),
                ('user',
                 models.OneToOneField(
                     help_text='DjangoUser that the info belong to',
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
                ('expertises',
                 models.ManyToManyField(blank=True,
                                        help_text='Your expertise.',
                                        related_name='expertises',
                                        to='backend.Expertise')),
                ('expertise_keywords',
                 models.ManyToManyField(blank=True,
                                        help_text='Your expertise keywords.',
                                        related_name='expertise_keywords',
                                        to='backend.ExpertiseKeyword')),
                ('first_name',
                 models.CharField(blank=True,
                                  help_text='First name',
                                  max_length=100,
                                  null=True)),
                ('google_scholar',
                 models.URLField(blank=True,
                                 help_text='Your Google Scholar URL',
                                 max_length=500,
                                 null=True)),
                ('last_name',
                 models.CharField(blank=True,
                                  help_text='Last name',
                                  max_length=100,
                                  null=True)),
                ('linkedin',
                 models.URLField(blank=True,
                                 help_text='Your LinkedIn URL',
                                 max_length=500,
                                 null=True)),
                ('orcid',
                 models.URLField(blank=True,
                                 help_text='Your ORCID',
                                 max_length=500,
                                 null=True)),
                ('twitter',
                 models.URLField(blank=True,
                                 help_text='Your Twitter handle',
                                 max_length=500,
                                 null=True)),
                ('website',
                 models.URLField(blank=True,
                                 help_text='Your website URL',
                                 max_length=500,
                                 null=True)),
                ('youtube',
                 models.URLField(blank=True,
                                 help_text='Your Youtube channel URL',
                                 max_length=500,
                                 null=True)),
                ('avatar',
                 models.ImageField(
                     blank=True,
                     help_text='Your profile picture.',
                     upload_to='profiles',
                     validators=[
                         backend.models.UserInformation.validate_avatar
                     ])),
            ],
        ),
        migrations.CreateModel(
            name='Degree',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('level',
                 models.CharField(help_text='Degree level', max_length=100)),
                ('domain',
                 models.CharField(help_text='Degree domain', max_length=100)),
                ('institution',
                 models.CharField(help_text='Degree institution',
                                  max_length=100)),
                ('user',
                 models.ForeignKey(
                     help_text='User that the degree belongs to.',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='backend.UserInformation')),
            ],
            options={
                'ordering': ['level', 'domain', 'institution'],
            },
        ),
        migrations.CreateModel(
            name='VerifiableEmail',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email',
                 models.EmailField(help_text='E-mail address',
                                   max_length=100,
                                   unique=True)),
                ('is_verified',
                 models.BooleanField(
                     default=False,
                     help_text='If true, this e-mail is verified')),
                ('token',
                 models.CharField(
                     blank=True,
                     help_text=
                     'The token that needs to be supplied to verify this e-mail address',
                     max_length=1000,
                     null=True)),
                ('user',
                 models.ForeignKey(
                     help_text='User that this e-mail belongs to',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='backend.UserInformation')),
            ],
        ),
        migrations.AlterField(
            model_name='verifiableemail',
            name='user',
            field=models.ForeignKey(
                default=None,
                help_text='User that this e-mail belongs to',
                on_delete=django.db.models.deletion.CASCADE,
                to='backend.UserInformation'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='degree',
            name='user',
            field=models.ForeignKey(
                help_text='User that the degree belongs to.',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='degrees',
                to='backend.UserInformation'),
        ),
        migrations.AlterField(
            model_name='verifiableemail',
            name='user',
            field=models.ForeignKey(
                help_text='User that this e-mail belongs to',
                on_delete=django.db.models.deletion.CASCADE,
                related_name='emails',
                to='backend.UserInformation'),
        ),
        migrations.AlterField(
            model_name='expertise',
            name='name',
            field=models.CharField(help_text='Expertise description',
                                   max_length=100,
                                   unique=True),
        ),
        migrations.AlterField(
            model_name='expertisekeyword',
            name='name',
            field=models.CharField(help_text='Expertise keyword description',
                                   max_length=100,
                                   unique=True),
        ),
        migrations.AlterField(
            model_name='userinformation',
            name='avatar',
            field=models.ImageField(
                blank=True,
                help_text='Your profile picture.',
                null=True,
                upload_to='profiles',
                validators=[backend.models.UserInformation.validate_avatar]),
        ),
        migrations.AlterUniqueTogether(
            name='degree',
            unique_together={('level', 'domain', 'institution', 'user')},
        ),
        migrations.RemoveField(
            model_name='userinformation',
            name='expertise_keywords',
        ),
        migrations.RemoveField(
            model_name='userinformation',
            name='expertises',
        ),
        migrations.AddField(
            model_name='expertise',
            name='user',
            field=models.ForeignKey(
                help_text='User for the expertise',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='expertises',
                to='backend.UserInformation'),
        ),
        migrations.AddField(
            model_name='expertisekeyword',
            name='user',
            field=models.ForeignKey(
                help_text='User for the expertise keywords',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='expertise_keywords',
                to='backend.UserInformation'),
        ),
        migrations.AlterField(
            model_name='expertise',
            name='name',
            field=models.CharField(help_text='Expertise description',
                                   max_length=100),
        ),
        migrations.AlterField(
            model_name='expertisekeyword',
            name='name',
            field=models.CharField(help_text='Expertise keyword description',
                                   max_length=100),
        ),
        migrations.AlterUniqueTogether(
            name='expertise',
            unique_together={('name', 'user')},
        ),
        migrations.AlterUniqueTogether(
            name='expertisekeyword',
            unique_together={('name', 'user')},
        ),
        migrations.AlterModelOptions(
            name='degree',
            options={'ordering': ['rank', 'level', 'domain', 'institution']},
        ),
        migrations.AlterModelOptions(
            name='expertise',
            options={'ordering': ['rank', 'name']},
        ),
        migrations.AlterModelOptions(
            name='expertisekeyword',
            options={'ordering': ['rank', 'name']},
        ),
        migrations.AlterModelOptions(
            name='verifiableemail',
            options={'ordering': ['rank']},
        ),
        migrations.AddField(
            model_name='degree',
            name='rank',
            field=models.IntegerField(default=0, help_text='Ordering field'),
        ),
        migrations.AddField(
            model_name='expertise',
            name='rank',
            field=models.IntegerField(default=0, help_text='Ordering field'),
        ),
        migrations.AddField(
            model_name='expertisekeyword',
            name='rank',
            field=models.IntegerField(default=0, help_text='Ordering field'),
        ),
        migrations.AddField(
            model_name='verifiableemail',
            name='rank',
            field=models.IntegerField(default=0, help_text='Ordering field'),
        ),
        migrations.AlterField(
            model_name='verifiableemail',
            name='email',
            field=models.EmailField(help_text='E-mail address',
                                    max_length=100),
        ),
        migrations.AlterUniqueTogether(
            name='verifiableemail',
            unique_together={('email', 'user')},
        ),
        migrations.AlterField(
            model_name='verifiableemail',
            name='user',
            field=models.ForeignKey(
                help_text='User that this e-mail belongs to',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='emails',
                to='backend.UserInformation'),
        ),
        migrations.AddField(
            model_name='verifiableemail',
            name='domain',
            field=computed_property.fields.ComputedCharField(
                compute_from='email_domain',
                default=uuid.uuid1,
                editable=False,
                help_text='Email domain with @',
                max_length=50),
        ),
    ]
Exemplo n.º 9
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Name')),
                ('email',
                 models.EmailField(max_length=50,
                                   null=True,
                                   verbose_name='Email')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=100, verbose_name='Book Name')),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('description', models.TextField(blank=True)),
                ('image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=backend.models.upload_image_path)),
                ('page', models.IntegerField(null=True, verbose_name='Page')),
                ('publish_date',
                 models.DateField(verbose_name='Published Date')),
                ('price', models.DecimalField(decimal_places=2,
                                              max_digits=10)),
                ('stock', models.PositiveIntegerField()),
                ('available', models.BooleanField(default=True)),
            ],
            options={
                'ordering': ['title'],
            },
        ),
        migrations.CreateModel(
            name='BookLinkAuthor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Author')),
                ('book',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Book')),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='title')),
                ('description', models.TextField()),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('slug', models.SlugField(blank=True, null=True, unique=True)),
            ],
            options={
                'verbose_name_plural': 'Categories',
                'ordering': ['title'],
            },
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('contact',
                 models.CharField(blank=True, max_length=14, null=True)),
                ('location', models.TextField(blank=True, null=True)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='customer_profile',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='book',
            name='category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='backend.Category',
                verbose_name='Category;'),
        ),
    ]
Exemplo n.º 10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Administrator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(default='', max_length=12, verbose_name='登录账号')),
                ('password', models.CharField(default='', max_length=50, verbose_name='密码')),
                ('grade', models.CharField(default='', max_length=50, verbose_name='管理年级')),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.CharField(max_length=12, primary_key=True, serialize=False, verbose_name='学号')),
                ('password', models.CharField(default='', max_length=50, verbose_name='密码')),
                ('name', models.CharField(default='', max_length=50, verbose_name='学生姓名')),
                ('gender', models.IntegerField(choices=[(0, '男'), (1, '女')], default=0, verbose_name='性别')),
                ('Avatar', models.ImageField(upload_to=backend.models.get_path, verbose_name='学生头像')),
                ('grade', models.CharField(default='', max_length=4, verbose_name='年级')),
                ('college', models.CharField(default='', max_length=50, verbose_name='学院名称')),
                ('subject', models.CharField(default='', max_length=50, verbose_name='专业名称')),
                ('class_name', models.CharField(default='', max_length=50, verbose_name='班级名称')),
                ('profile', models.TextField(default='', verbose_name='个人简介')),
                ('award', models.TextField(default='', verbose_name='获奖情况')),
                ('agree_distribution', models.BooleanField(default=False, verbose_name='接受分配')),
            ],
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id', models.CharField(max_length=12, primary_key=True, serialize=False, verbose_name='工号')),
                ('password', models.CharField(default='', max_length=50, verbose_name='密码')),
                ('name', models.CharField(default='', max_length=50, verbose_name='教师姓名')),
                ('gender', models.IntegerField(choices=[(0, '男'), (1, '女')], default=0, verbose_name='性别')),
                ('Avatar', models.ImageField(upload_to=backend.models.get_path, verbose_name='教师头像')),
                ('college', models.CharField(default='', max_length=50, verbose_name='学院名称')),
                ('subject', models.CharField(default='', max_length=50, verbose_name='导师方向')),
                ('profile', models.TextField(default='', verbose_name='个人简介')),
                ('award', models.TextField(default='', verbose_name='获奖情况')),
            ],
        ),
        migrations.CreateModel(
            name='Selection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_first', models.BooleanField(default=True, verbose_name='是否为第一志愿导师')),
                ('pass_status', models.IntegerField(choices=[(0, '待通过'), (1, '通过'), (2, '未通过')], verbose_name='通过情况')),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Student', verbose_name='学生')),
                ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Teacher', verbose_name='导师')),
            ],
        ),
        migrations.CreateModel(
            name='Publicity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade', models.CharField(default='', max_length=4, verbose_name='年级')),
                ('content', models.TextField(verbose_name='公示内容')),
                ('start_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='开始公示时间')),
                ('end_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='公示结束时间')),
                ('admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Administrator', verbose_name='发布者')),
            ],
        ),
        migrations.CreateModel(
            name='OpeningTime',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade', models.CharField(default='', max_length=4, verbose_name='年级')),
                ('start_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='开始开放时间')),
                ('end_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='公示开放时间')),
                ('admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Administrator', verbose_name='开放者')),
            ],
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='file')),
                ('publicity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Publicity', verbose_name='公示')),
            ],
        ),
    ]
Exemplo n.º 11
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            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')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('last_seen', models.DateTimeField(blank=True, null=True)),
                ('app_installed', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'Perfil de Usuario',
                'verbose_name_plural': 'Perfiles de usuario',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('token', models.CharField(max_length=16)),
                ('status',
                 models.IntegerField(choices=[(0, 'Creada'), (1, 'Activada'),
                                              (2, 'Bloqueada')],
                                     default=0)),
            ],
            options={
                'verbose_name': 'Cuenta',
                'verbose_name_plural': 'Cuentas',
            },
        ),
        migrations.CreateModel(
            name='Card',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('type',
                 models.IntegerField(choices=[(0, 'MasterCard'), (1, 'Visa')],
                                     default=0)),
                ('alias', models.CharField(max_length=40,
                                           verbose_name='Alias')),
                ('number',
                 models.CharField(max_length=16, verbose_name='Nº tarjeta')),
                ('cvv',
                 models.CharField(max_length=4,
                                  verbose_name='Código de Verificación')),
            ],
            options={
                'verbose_name': 'Tarjeta',
                'verbose_name_plural': 'Tarjetas',
            },
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=40,
                                          verbose_name='Nombre')),
                ('identifier',
                 models.CharField(max_length=16,
                                  verbose_name='Identificador')),
                ('icon',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=backend.models.get_image_path_company,
                     verbose_name='Imagen/Logo')),
            ],
            options={
                'verbose_name': 'Comercio',
                'verbose_name_plural': 'Comercios',
            },
        ),
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=40,
                                          verbose_name='Nombre')),
                ('identifier',
                 models.CharField(max_length=16,
                                  verbose_name='Identificador')),
            ],
            options={
                'verbose_name': 'Dispositivo',
                'verbose_name_plural': 'Dispositivos',
            },
        ),
        migrations.CreateModel(
            name='Emisor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=40,
                                          verbose_name='nombre')),
                ('identifier',
                 models.CharField(max_length=16,
                                  verbose_name='Identificador')),
            ],
            options={
                'verbose_name': 'Emisor',
                'verbose_name_plural': 'Emisores',
            },
        ),
        migrations.CreateModel(
            name='ExpirationDateCard',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('month',
                 models.IntegerField(choices=[(0, '2018'), (1, '2019'),
                                              (2, '2020'), (3, '2021'),
                                              (4, '2022'), (5, '2023'),
                                              (6, '2024')],
                                     default=0)),
                ('year',
                 models.IntegerField(choices=[(1, '01'), (2, '02'), (3, '03'),
                                              (4, '04'), (5, '05'), (6, '06'),
                                              (7, '07'), (8, '08'), (9, '09'),
                                              (10, '10'), (11, '11'),
                                              (12, '12')],
                                     default=0)),
            ],
        ),
        migrations.AddField(
            model_name='card',
            name='emisor',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='card_emisor',
                to='backend.Emisor'),
        ),
        migrations.AddField(
            model_name='card',
            name='expiration_date',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='expiration_date_card',
                to='backend.ExpirationDateCard'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='account',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='user_account',
                to='backend.Account'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='groups',
            field=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'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='user_permissions',
            field=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'),
        ),
    ]
Exemplo n.º 12
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserCustom',
            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')),
                ('perm',
                 models.CharField(choices=[
                     ('A', 'Бухгалтер'), ('GA', 'Главный бухгалтер'),
                     ('D', 'Default'), ('SM', 'Управляющий складом'),
                     ('GSM', 'Главный Управляющий складами'),
                     ('FM', 'Управляющий фабрикой'),
                     ('GFM', 'Главный управляющий фабриками'),
                     ('OM', 'Управляющий офисом'),
                     ('GOM', 'Главный управляющий офисами'),
                     ('FO', 'Основатель'), ('CFO', 'Компания основателей'),
                     ('SM', 'Менеджер по безопасности'),
                     ('GSM', 'Главный мнеджер по безопасности'),
                     ('H', 'Помощник - контролер'), ('S', 'Поставщик'),
                     ('F', 'Фирма'), ('PM', 'Отдел кадров'),
                     ('GPM', 'Начальник отдела кадров'), ('DIR', 'Директор'),
                     ('AAA', 'ADMIN')
                 ],
                                  max_length=10,
                                  verbose_name='Должность')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='Почта')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Логин')),
                ('is_staff',
                 models.BooleanField(default=False,
                                     verbose_name='staff status')),
                ('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='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('country',
                 models.CharField(max_length=100, verbose_name='Страна')),
                ('city', models.CharField(max_length=100,
                                          verbose_name='Город')),
                ('street',
                 models.CharField(max_length=100, verbose_name='Улица')),
                ('bilding',
                 models.CharField(max_length=100, verbose_name='Здание')),
                ('flat',
                 models.CharField(max_length=100,
                                  verbose_name='Квартира или офис')),
                ('type_org',
                 models.CharField(choices=[('O', 'Офис'), ('F', 'Фабрика'),
                                           ('S', 'Склад'), ('PH', 'Жилой дом'),
                                           ('FH', 'Многоквартирный дом'),
                                           ('EP', 'Рабочее место'),
                                           ('LP', 'Жилое мест')],
                                  max_length=10,
                                  verbose_name='Тип организации')),
            ],
            options={
                'verbose_name': 'Адрес',
                'verbose_name_plural': 'Адрес',
                'ordering': ['-country'],
            },
        ),
        migrations.CreateModel(
            name='DeliveryTransport',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('model_name',
                 models.CharField(max_length=50, verbose_name='Модель')),
                ('type_of_transport',
                 models.CharField(choices=[('S', 'Самолет'), ('V', 'Вертолет'),
                                           ('P', 'Поезд'), ('A', 'Автобус'),
                                           ('MA', 'Микроавтобус'),
                                           ('K', 'Корабль')],
                                  max_length=3,
                                  verbose_name='Тип транспорта')),
                ('year_constructed',
                 models.CharField(max_length=12, verbose_name='Год создания')),
                ('order_coast',
                 models.CharField(max_length=50,
                                  verbose_name='Стоимость перевозки')),
                ('ready',
                 models.BooleanField(db_index=True,
                                     verbose_name='Готовность')),
                ('time_delivery',
                 models.CharField(max_length=50,
                                  verbose_name='Время Доставки')),
                ('done_order',
                 models.CharField(max_length=50,
                                  verbose_name='Рейсов выполненно')),
            ],
            options={
                'verbose_name': 'Доставляющий транспорт',
                'verbose_name_plural': 'Доставляющий транспорт',
                'ordering': ['-type_of_transport'],
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name',
                 models.CharField(max_length=100, verbose_name='Имя')),
                ('second_name',
                 models.CharField(max_length=100,
                                  unique=True,
                                  verbose_name='Фамилия')),
                ('photo',
                 models.ImageField(blank=True,
                                   upload_to='',
                                   verbose_name='Фото')),
                ('mobile',
                 models.CharField(max_length=100, verbose_name='Телефон')),
                ('mail',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='Почта')),
                ('info', models.TextField(verbose_name='Информация')),
                ('he', models.BooleanField(verbose_name='Высшее образование')),
                ('salary',
                 models.CharField(max_length=30, verbose_name='Зарплата')),
                ('create_date',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата создания')),
                ('experience',
                 models.CharField(max_length=100, verbose_name='Опыт')),
                ('address',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Адрес_работы',
                                   to='backend.Address')),
            ],
            options={
                'verbose_name': 'Работник',
                'verbose_name_plural': 'Работник',
                'ordering': ['second_name'],
            },
            bases=(backend.models.Ret, models.Model),
        ),
        migrations.CreateModel(
            name='Factories',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('holding',
                 models.CharField(max_length=50, verbose_name='Холдинг')),
            ],
            options={
                'verbose_name': 'Фабрики',
                'verbose_name_plural': 'Фабрики',
                'ordering': ['-holding'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Firm',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Название')),
                ('mobile',
                 models.CharField(max_length=10, verbose_name='Телефон')),
                ('director',
                 models.CharField(max_length=100, verbose_name='Директор')),
                ('mail', models.EmailField(max_length=254,
                                           verbose_name='Почта')),
                ('connect_date_firm',
                 models.DateTimeField(
                     db_index=True,
                     verbose_name='Дата начало сотрудничества')),
                ('create_date_firm',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата создания')),
                ('firm_is_supplier',
                 models.BooleanField(verbose_name='Фирма это доставщик')),
                ('info',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='Описание')),
            ],
            options={
                'verbose_name': 'Фирма',
                'verbose_name_plural': 'Фирма',
                'ordering': ['name'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Founder',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name',
                 models.CharField(max_length=100, verbose_name='Имя')),
                ('second_name',
                 models.CharField(max_length=100, verbose_name='Фамилия')),
                ('age', models.IntegerField(verbose_name='Возраст')),
                ('namber',
                 models.CharField(max_length=10, verbose_name='Телефон')),
                ('mail', models.CharField(max_length=100,
                                          verbose_name='Почта')),
                ('info', models.TextField(verbose_name='Информация')),
            ],
            options={
                'verbose_name': 'Основатель',
                'verbose_name_plural': 'Основатель',
                'ordering': ['second_name'],
            },
        ),
        migrations.CreateModel(
            name='Founders',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('founders',
                 models.CharField(max_length=50, verbose_name='Компания')),
                ('founder',
                 models.ManyToManyField(related_name='Основатель',
                                        to='backend.Founder')),
            ],
            options={
                'verbose_name': 'Основатели',
                'verbose_name_plural': 'Основатели',
                'ordering': ['-founders'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='FoundersCompanyOrganization',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('companyname',
                 models.CharField(max_length=50, verbose_name='Имя компании')),
                ('factories',
                 models.ManyToManyField(blank=True,
                                        related_name='Фабрики_компании',
                                        to='backend.Factories',
                                        verbose_name='Фабрики')),
                ('founders',
                 models.ManyToManyField(related_name='Основатели',
                                        to='backend.Founders',
                                        verbose_name='Основатели')),
            ],
            options={
                'verbose_name': 'Таблица компаний',
                'verbose_name_plural': 'Таблица компаний',
                'ordering': ['-companyname'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Название')),
                ('create_date',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата создания')),
                ('firm',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Firm',
                                   verbose_name='Фирма')),
            ],
            options={
                'verbose_name': 'Вещь',
                'verbose_name_plural': 'Вещь',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Items',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name_group',
                 models.CharField(max_length=50,
                                  verbose_name='Название группы')),
                ('count', models.IntegerField(verbose_name='Количество')),
                ('item',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Item',
                                   verbose_name='Предмет')),
            ],
            options={
                'verbose_name': 'Вещи',
                'verbose_name_plural': 'Вещи',
                'ordering': ['name_group'],
            },
        ),
        migrations.CreateModel(
            name='ItemsSupplier',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name_group',
                 models.CharField(max_length=50,
                                  verbose_name='Название группы')),
                ('items',
                 models.ManyToManyField(
                     related_name='Вещи_доступные_поставщику',
                     to='backend.Items',
                     verbose_name='Вещи, доступные поставщику')),
            ],
            options={
                'verbose_name': 'Вещи, которые доступны от поставщика',
                'verbose_name_plural': 'Вещи, которые доступны от поставщика',
                'ordering': ['name_group'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Mesh',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('mesh',
                 models.CharField(max_length=100, verbose_name='Материал')),
                ('info_mesh',
                 models.TextField(verbose_name='Информация о материале')),
                ('additional_mesh',
                 models.CharField(max_length=100,
                                  verbose_name='Название доп. материала')),
                ('info_additional_mesh',
                 models.TextField(verbose_name='Информация о доп. материале')),
            ],
            options={
                'verbose_name': 'Материал',
                'verbose_name_plural': 'Материал',
                'ordering': ['mesh'],
            },
        ),
        migrations.CreateModel(
            name='Office',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='Название')),
                ('mobile',
                 models.CharField(max_length=20, verbose_name='Телефон')),
                ('mail', models.CharField(max_length=50,
                                          verbose_name='Почта')),
                ('info', models.TextField(verbose_name='Информация о офисе')),
                ('this_company_office',
                 models.BooleanField(
                     db_index=True, verbose_name='Принадлежит этой компании')),
                ('state_or_private',
                 models.BooleanField(db_index=True,
                                     verbose_name='Госсударственная?')),
                ('address',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Address',
                                   verbose_name='Адрес')),
            ],
            options={
                'verbose_name': 'Офис',
                'verbose_name_plural': 'Офис',
                'ordering': ['-name'],
            },
        ),
        migrations.CreateModel(
            name='Offices',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('holding',
                 models.CharField(max_length=50, verbose_name='Холдинг')),
                ('office',
                 models.ManyToManyField(related_name='Офисы',
                                        to='backend.Office',
                                        verbose_name='Офисы')),
            ],
            options={
                'verbose_name': 'Офисы',
                'verbose_name_plural': 'Офисы',
                'ordering': ['-holding'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Price',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('price', models.CharField(max_length=100,
                                           verbose_name='Цена')),
                ('sale_price',
                 models.CharField(max_length=100,
                                  verbose_name='Цена со скидкой')),
            ],
            options={
                'verbose_name': 'Цена',
                'verbose_name_plural': 'Цена',
                'ordering': ['price'],
            },
        ),
        migrations.CreateModel(
            name='RoleNow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Название')),
                ('countpeople',
                 models.IntegerField(
                     verbose_name='Количество людей в подчинении')),
                ('needHE',
                 models.BooleanField(
                     verbose_name='Необходимость высшего образования')),
            ],
            options={
                'verbose_name': 'Должность',
                'verbose_name_plural': 'Должность',
                'ordering': ['name'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Storage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='Название')),
                ('mobile',
                 models.CharField(max_length=20, verbose_name='Телефон')),
                ('mail', models.CharField(max_length=50,
                                          verbose_name='Почта')),
                ('info', models.TextField(verbose_name='Информация о складе')),
                ('full_content',
                 models.CharField(max_length=50,
                                  verbose_name='Полная вместимость')),
                ('content',
                 models.IntegerField(verbose_name='Заполненность в %')),
                ('this_company_storage',
                 models.BooleanField(
                     db_index=True, verbose_name='Принадлежит этой компании')),
                ('state_or_private',
                 models.BooleanField(db_index=True,
                                     verbose_name='Госсударственная?')),
                ('address',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Address',
                                   verbose_name='Адрес')),
            ],
            options={
                'verbose_name': 'Склад',
                'verbose_name_plural': 'Склад',
                'ordering': ['-name'],
            },
        ),
        migrations.CreateModel(
            name='Storages',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('holding',
                 models.CharField(max_length=50, verbose_name='Холдинг')),
                ('storage',
                 models.ManyToManyField(related_name='Склады',
                                        to='backend.Storage',
                                        verbose_name='Склады')),
            ],
            options={
                'verbose_name': 'Склады',
                'verbose_name_plural': 'Склады',
                'ordering': ['-holding'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='TotalRole',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Название')),
                ('role_now',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Должность',
                                   to='backend.RoleNow',
                                   verbose_name='Занимаемая должность')),
            ],
            options={
                'verbose_name': 'Должность',
                'verbose_name_plural': 'Должность',
                'ordering': [],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='SupplierInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('count_storages',
                 models.IntegerField(verbose_name='Количество складов')),
                ('average_time_delivery',
                 models.TextField(verbose_name='Среднее время доставки')),
                ('text', models.TextField(verbose_name='Доп. информация')),
                ('delivery_transport',
                 models.ManyToManyField(
                     related_name='Доставляющий_транспорт',
                     to='backend.DeliveryTransport',
                     verbose_name='Доставляющий транспорт')),
                ('factories',
                 models.ManyToManyField(related_name='Фабрики_поставщика',
                                        to='backend.Factories',
                                        verbose_name='Фабрики поставщика')),
                ('offices',
                 models.ManyToManyField(related_name='Офисы_поставщика',
                                        to='backend.Offices',
                                        verbose_name='Офисы поставщика')),
                ('storages',
                 models.ManyToManyField(related_name='Склады_поставщика',
                                        to='backend.Storages',
                                        verbose_name='Склады поставщика')),
            ],
            options={
                'verbose_name': 'Информация о поставщике',
                'verbose_name_plural': 'Информация о поставщике',
                'ordering': ['count_storages'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='Название')),
                ('mobile',
                 models.CharField(max_length=50, verbose_name='Телефон')),
                ('director', models.TextField(verbose_name='Директор')),
                ('mail', models.EmailField(max_length=254,
                                           verbose_name='Почта')),
                ('create_date',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата создания')),
                ('connect_date',
                 models.DateTimeField(
                     db_index=True,
                     verbose_name='Дата начала сотрудничества')),
                ('founderscompanyorganization',
                 models.ManyToManyField(
                     related_name='Компании_организаторы',
                     to='backend.FoundersCompanyOrganization',
                     verbose_name='Компании-организаторы')),
                ('items_supplier',
                 models.ManyToManyField(related_name='Постовляемые_вещи',
                                        to='backend.ItemsSupplier',
                                        verbose_name='Поставляемые вещи')),
                ('supplier_info',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Информация_о_поставщике',
                                   to='backend.SupplierInfo',
                                   verbose_name='Информация о поставщике')),
            ],
            options={
                'verbose_name': 'Поставщик',
                'verbose_name_plural': 'Поставщик',
                'ordering': ['name'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Ready',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('order_status',
                 models.CharField(choices=[('R', 'Ready'), ('W', 'Wait'),
                                           ('R-P', 'Ready-part')],
                                  max_length=4,
                                  verbose_name='Статус')),
                ('total_price',
                 models.CharField(max_length=100,
                                  verbose_name='Полная стоимость')),
                ('address',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Адрес_доставки_товаров',
                                   related_query_name='Адрес_доставки_товаров',
                                   to='backend.Address',
                                   verbose_name='Адрес доставки товаров')),
                ('employee',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Заказавший_работник',
                                   related_query_name='Работник',
                                   to='backend.Employee',
                                   verbose_name='Заказавший работник')),
                ('items',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Вещи_на_доставку',
                                   related_query_name='Вещи_на_доставку',
                                   to='backend.Items',
                                   verbose_name='Вещи на доставку')),
            ],
            options={
                'verbose_name': 'Статус заказа',
                'verbose_name_plural': 'Статус заказа',
                'ordering': ['order_status'],
            },
        ),
        migrations.CreateModel(
            name='Param',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('height',
                 models.CharField(max_length=20, verbose_name='Высота')),
                ('width', models.CharField(max_length=20,
                                           verbose_name='Ширина')),
                ('thickness',
                 models.CharField(max_length=20, verbose_name='Толщина')),
                ('weight', models.CharField(max_length=20,
                                            verbose_name='Вес')),
                ('diagonal',
                 models.CharField(max_length=20, verbose_name='Диагональ')),
                ('mesh',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Mesh',
                                   verbose_name='Материал')),
            ],
            options={
                'verbose_name': 'Параметры',
                'verbose_name_plural': 'Параметры',
                'ordering': ['-weight'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='OrderTable',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  verbose_name='Название заказа')),
                ('wornot', models.BooleanField(verbose_name='Доставлен')),
                ('create_date',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата создания')),
                ('get_date',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата получения')),
                ('address',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Адрес',
                                   to='backend.Address')),
                ('items',
                 models.ManyToManyField(related_name='Вещи',
                                        to='backend.Items')),
            ],
            options={
                'verbose_name': 'Таблица заказа',
                'verbose_name_plural': 'Таблица заказа',
                'ordering': ['address'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='Orderes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('total_price',
                 models.CharField(max_length=50,
                                  verbose_name='Полная стоимость')),
                ('send', models.BooleanField(verbose_name='Отправлено')),
                ('received',
                 models.CharField(choices=[('Y', 'Да'), ('N', 'Нет'),
                                           ('N\\A', 'Не определено')],
                                  max_length=3,
                                  verbose_name='Получено?')),
                ('pos_one_get',
                 models.CharField(choices=[('Y', 'Да'), ('N', 'Нет'),
                                           ('N\\A', 'Не определено')],
                                  max_length=3,
                                  verbose_name='Возможность одной доставки')),
                ('date_send',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата отправки')),
                ('date_get',
                 models.DateTimeField(db_index=True,
                                      verbose_name='Дата получения')),
                ('orderes',
                 models.ManyToManyField(related_name='Заказы',
                                        related_query_name='Заказы',
                                        to='backend.Ready',
                                        verbose_name='Заказы')),
                ('storage',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Склад_получатель',
                                   related_query_name='Склад_получатель',
                                   to='backend.Storage',
                                   verbose_name='Склад-получатель')),
                ('supplier',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Поставщик_товара',
                                   related_query_name='Поставщик_товара',
                                   to='backend.Supplier',
                                   verbose_name='Поставщик')),
            ],
            options={
                'verbose_name': 'Заказы',
                'verbose_name_plural': 'Заказы',
                'ordering': ['total_price'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.CreateModel(
            name='ItemsInStorage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('items',
                 models.ManyToManyField(
                     related_name='Предметы',
                     to='backend.Items',
                     verbose_name='Группы вещей на складе')),
                ('storage',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Storage',
                                   verbose_name='Склад')),
            ],
            options={
                'verbose_name': 'Вещи на складе',
                'verbose_name_plural': 'Вещи на складе',
                'ordering': ['storage'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
        migrations.AddField(
            model_name='item',
            name='param',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='backend.Param',
                verbose_name='Параметры'),
        ),
        migrations.AddField(
            model_name='item',
            name='price',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='backend.Price',
                verbose_name='Цена'),
        ),
        migrations.AddField(
            model_name='founderscompanyorganization',
            name='offices',
            field=models.ManyToManyField(blank=True,
                                         related_name='Офисы_компании',
                                         to='backend.Offices',
                                         verbose_name='Офисы'),
        ),
        migrations.AddField(
            model_name='founderscompanyorganization',
            name='storages',
            field=models.ManyToManyField(blank=True,
                                         related_name='Склады_компании',
                                         to='backend.Storages',
                                         verbose_name='Склады'),
        ),
        migrations.AddField(
            model_name='firm',
            name='founderscompanyorganization',
            field=models.ManyToManyField(
                related_name='Организаторы',
                to='backend.FoundersCompanyOrganization',
                verbose_name='Основатели'),
        ),
        migrations.CreateModel(
            name='Factory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50, verbose_name='Название')),
                ('mobile',
                 models.CharField(max_length=20, verbose_name='Телефон')),
                ('mail', models.CharField(max_length=50,
                                          verbose_name='Почта')),
                ('info',
                 models.TextField(verbose_name='Информация о фабрике')),
                ('count_empl',
                 models.IntegerField(verbose_name='Колличество сотрудников')),
                ('this_company_factory',
                 models.BooleanField(
                     db_index=True, verbose_name='Принадлежит этой компании')),
                ('state_or_private',
                 models.BooleanField(db_index=True,
                                     verbose_name='Госсударственная?')),
                ('address',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Address',
                                   verbose_name='Адрес')),
            ],
            options={
                'verbose_name': 'Фабрикa',
                'verbose_name_plural': 'Фабрикa',
                'ordering': ['-name'],
            },
        ),
        migrations.AddField(
            model_name='factories',
            name='factory',
            field=models.ManyToManyField(related_name='Фабрики',
                                         to='backend.Factory',
                                         verbose_name='Фабрики'),
        ),
        migrations.AddField(
            model_name='employee',
            name='orderes',
            field=models.ManyToManyField(blank=True,
                                         related_name='Заказы_работника',
                                         to='backend.OrderTable'),
        ),
        migrations.AddField(
            model_name='employee',
            name='trole',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='Права',
                to='backend.TotalRole'),
        ),
        migrations.AddField(
            model_name='employee',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='Логин',
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='DeliveryInAWay',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('items',
                 models.ManyToManyField(related_name='Вещи_в_пути',
                                        to='backend.Items',
                                        verbose_name='Вещи в пути')),
                ('transport',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='Транспорт_доставки',
                                   to='backend.DeliveryTransport',
                                   verbose_name='Транспорт доставки')),
            ],
            options={
                'verbose_name': 'Транспорт с грузом',
                'verbose_name_plural': 'Транспорт с грузом',
                'ordering': ['transport'],
            },
            bases=(models.Model, backend.models.Ret),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Cidade',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50, verbose_name='nome')),
            ],
        ),
        migrations.CreateModel(
            name='Endereco',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cep', models.IntegerField(max_length=8, verbose_name='cep')),
                ('tipo', models.CharField(max_length=20, verbose_name='tipo')),
                ('logradouro', models.CharField(max_length=50, verbose_name='logradouro')),
                ('complemento', models.CharField(max_length=100, verbose_name='complemento')),
                ('bairro', models.CharField(max_length=50, verbose_name='bairro')),
                ('cidade', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Cidade')),
            ],
        ),
        migrations.CreateModel(
            name='Estado',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50, verbose_name='nome')),
                ('uf', models.CharField(max_length=2, verbose_name='uf')),
            ],
        ),
        migrations.CreateModel(
            name='Evento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=100, verbose_name='nome')),
                ('sigla', models.CharField(max_length=20, verbose_name='sigla')),
                ('numero', models.IntegerField(max_length=4, verbose_name='numero')),
                ('ano', models.IntegerField(max_length=4, verbose_name='ano')),
                ('descricao', models.TextField()),
                ('palavras_chave', models.CharField(max_length=100, verbose_name='palavras_chave')),
                ('data_inicio', models.DateTimeField()),
                ('data_fim', models.DateTimeField()),
                ('endereco', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Endereco')),
            ],
        ),
        migrations.CreateModel(
            name='Inscricao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', models.DateTimeField()),
                ('ticket', models.IntegerField(verbose_name=backend.models.Ticket)),
                ('evento', models.IntegerField(verbose_name=backend.models.Evento)),
            ],
        ),
        migrations.CreateModel(
            name='Pessoa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=100, verbose_name='nome')),
                ('sexo', models.CharField(max_length=1, verbose_name='sexo')),
                ('dataNascimento', models.DateField()),
                ('imagem', models.ImageField(upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=100, verbose_name='nome')),
                ('descricao', models.TextField()),
                ('preco', models.FloatField()),
                ('vagas', models.IntegerField()),
                ('evento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Evento')),
            ],
        ),
        migrations.CreateModel(
            name='PessoaFisica',
            fields=[
                ('pessoa_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='backend.Pessoa')),
                ('cpf', models.CharField(max_length=14, verbose_name='cpf')),
            ],
            bases=('backend.pessoa',),
        ),
        migrations.AddField(
            model_name='pessoa',
            name='endereco',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Endereco'),
        ),
        migrations.AddField(
            model_name='pessoa',
            name='usuario',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='evento',
            name='realizador',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Pessoa'),
        ),
        migrations.AddField(
            model_name='cidade',
            name='estado',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Estado'),
        ),
        migrations.AddField(
            model_name='inscricao',
            name='pessoaFisica',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.PessoaFisica'),
        ),
    ]
Exemplo n.º 14
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id',
                 models.CharField(default=backend.models.generate_uuid,
                                  editable=False,
                                  max_length=100,
                                  primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('friends', models.BooleanField(default=False)),
                ('followee',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='followee',
                                   to='backend.author')),
                ('follower',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='follower',
                                   to='backend.author')),
            ],
        ),
        migrations.RemoveField(
            model_name='comment',
            name='post_author_id',
        ),
        migrations.RemoveField(
            model_name='post',
            name='count',
        ),
        migrations.AddField(
            model_name='comment',
            name='image_conetnt',
            field=models.ImageField(null=True, upload_to=''),
        ),
        migrations.AddField(
            model_name='comment',
            name='post_author',
            field=models.ForeignKey(
                default=None,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='post_author',
                to='backend.author'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='post',
            name='image_content',
            field=models.ImageField(null=True, upload_to=''),
        ),
        migrations.AlterField(
            model_name='comment',
            name='author',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='author',
                to='backend.author'),
        ),
        migrations.CreateModel(
            name='Inbox',
            fields=[
                ('id',
                 models.CharField(default=backend.models.generate_uuid,
                                  editable=False,
                                  max_length=100,
                                  primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.author')),
                ('follow',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='follow',
                                   to='backend.follow')),
                ('like',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='like',
                                   to='backend.like')),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post',
                                   to='backend.post')),
            ],
        ),
    ]
Exemplo n.º 15
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.CharField(max_length=200)),
                ('url', models.CharField(max_length=1000)),
                ('image',
                 models.ImageField(
                     upload_to=backend.models.user_directory_path)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.BigAutoField(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=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(blank=True, max_length=100)),
                ('name', models.CharField(max_length=200)),
                ('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', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Exemplo n.º 16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    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')),
                ('email', models.EmailField(max_length=255, unique=True)),
                ('email_confirmed', models.BooleanField(default=False)),
                ('active', models.BooleanField(default=True)),
                ('staff', models.BooleanField(default=False)),
                ('admin', models.BooleanField(default=False)),
                ('created',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('last_login',
                 models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('slug', models.CharField(max_length=100)),
                ('icon', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Channel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('channel_id',
                 models.CharField(blank=True, editable=False, max_length=11)),
                ('created',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('last_login',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('avatar',
                 models.ImageField(blank=True, null=True, upload_to='')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='channels',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(default='UNTITLED VIDEO', max_length=100)),
                ('description', models.TextField(blank=True, null=True)),
                ('watch_id',
                 models.CharField(blank=True, max_length=11, null=True)),
                ('visibility',
                 models.CharField(choices=[('PRIVATE', 'Private'),
                                           ('PUBLIC', 'Public'),
                                           ('UNLISTED', 'Unlisted')],
                                  default='PUBLIC',
                                  max_length=8)),
                ('views', models.BigIntegerField(default=0)),
                ('created',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('uploaded_file',
                 models.FileField(
                     null=True,
                     storage=django.core.files.storage.FileSystemStorage(
                         location='/home/danjo/Projects/tracle/uploads'),
                     upload_to=backend.models.get_video_location)),
                ('thumbnail', models.CharField(max_length=255, null=True)),
                ('video_status',
                 models.CharField(choices=[('queued', 'Queued'),
                                           ('draft', 'Draft'),
                                           ('started', 'Processing'),
                                           ('finished', 'Done'),
                                           ('failed', 'Error')],
                                  db_column='video_status',
                                  default='draft',
                                  max_length=255)),
                ('job_id',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('category',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Category')),
                ('channel',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='videos',
                                   to='backend.Channel')),
            ],
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('from_channel',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Channel')),
                ('to_channel',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='subscriptions',
                                   to='backend.Channel')),
            ],
        ),
        migrations.CreateModel(
            name='Likes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('channel',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Channel')),
                ('video',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='likes',
                                   to='backend.Video')),
            ],
        ),
        migrations.CreateModel(
            name='Dislikes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('channel',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Channel')),
                ('video',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='dislikes',
                                   to='backend.Video')),
            ],
        ),
    ]
Exemplo n.º 17
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=64)),
                ('description',
                 models.CharField(blank=True, max_length=256, null=True)),
                ('price', models.DecimalField(decimal_places=2, max_digits=6)),
                ('available', models.BooleanField(default=True)),
                ('image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=backend.models.get_upload_name_item)),
            ],
        ),
        migrations.CreateModel(
            name='ItemOrder',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('quantity', models.IntegerField()),
                ('completed', models.BooleanField(default=False)),
                ('notes',
                 models.CharField(blank=True, max_length=256, null=True)),
                ('item',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Table',
            fields=[
                ('table_number',
                 models.IntegerField(primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=32)),
                ('icon',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=backend.models.get_upload_name_tag)),
            ],
        ),
        migrations.CreateModel(
            name='Session',
            fields=[
                ('sessId',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('start_time',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('end_time', models.DateTimeField(blank=True, null=True)),
                ('table',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='backend.Table')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('submitted',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('items',
                 models.ManyToManyField(through='backend.ItemOrder',
                                        to='backend.Item')),
                ('session',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Session')),
            ],
        ),
        migrations.CreateModel(
            name='Menu',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=64)),
                ('description',
                 models.CharField(blank=True, max_length=256, null=True)),
                ('available', models.BooleanField(default=True)),
                ('url_name', models.SlugField(editable=False, max_length=64)),
                ('image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=backend.models.get_upload_name_menu)),
                ('start_time', models.TimeField(blank=True, null=True)),
                ('end_time', models.TimeField(blank=True, null=True)),
                ('start_day',
                 models.IntegerField(blank=True,
                                     choices=[(0, 'Monday'), (1, 'Tuesday'),
                                              (2, 'Wednesday'),
                                              (3, 'Thursday'), (4, 'Friday'),
                                              (5, 'Saturday'), (6, 'Sunday')],
                                     null=True)),
                ('end_day',
                 models.IntegerField(blank=True,
                                     choices=[(0, 'Monday'), (1, 'Tuesday'),
                                              (2, 'Wednesday'),
                                              (3, 'Thursday'), (4, 'Friday'),
                                              (5, 'Saturday'), (6, 'Sunday')],
                                     null=True)),
                ('items', models.ManyToManyField(blank=True,
                                                 to='backend.Item')),
                ('super_menu',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='backend.Menu')),
            ],
        ),
        migrations.AddField(
            model_name='itemorder',
            name='order',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='backend.Order'),
        ),
        migrations.AddField(
            model_name='item',
            name='tags',
            field=models.ManyToManyField(blank=True, to='backend.Tag'),
        ),
    ]