Esempio n. 1
0
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0011_analysis_completed_at'),
    ]

    operations = [
        migrations.AlterField(
            model_name='analysis',
            name='notebook',
            field=models.FileField(
                blank=True,
                help_text=
                'Upload your Jupiter Notebook or any other document helping to understand your analysis',
                max_length=255,
                upload_to=apps.core.models.Analysis.notebook_upload_to,
                verbose_name='Notebook'),
        ),
        migrations.AlterField(
            model_name='analysis',
            name='secondary_data',
            field=models.FileField(
                max_length=255,
                upload_to=apps.core.models.Analysis.secondary_data_upload_to,
                verbose_name='Secondary data'),
        ),
        migrations.AlterField(
            model_name='pixelset',
            name='pixels_file',
            field=models.FileField(
                max_length=255,
                upload_to=apps.core.models.PixelSet.pixelset_upload_to,
                verbose_name='Pixels file'),
        ),
    ]
Esempio n. 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0007_auto_20171106_1318'),
    ]

    operations = [
        migrations.CreateModel(
            name='PixelSet',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('pixels_file',
                 models.FileField(
                     upload_to=apps.core.models.PixelSet.pixelset_upload_to,
                     verbose_name='Pixels file')),
                ('description',
                 models.TextField(blank=True, verbose_name='Description')),
                ('analysis',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='pixelsets',
                                   related_query_name='pixelset',
                                   to='core.Analysis')),
            ],
            bases=(apps.core.mixins.UUIDModelMixin, models.Model),
        ),
    ]
Esempio n. 3
0
class Migration(migrations.Migration):

    dependencies = [
        ('core', '0002_study_study_date'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProcessingResult',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('expire_date', models.DateTimeField()),
                ('image',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=apps.core.models.processed_image_path,
                     verbose_name='Image')),
                ('json', jsonfield.fields.JSONField(verbose_name='JSON')),
                ('session_token', models.CharField(max_length=255)),
            ],
            options={
                'db_table': 'processing_results',
            },
        ),
        migrations.AddField(
            model_name='dicomnode',
            name='protocol',
            field=models.CharField(default='DICOMWEB',
                                   max_length=20,
                                   verbose_name='Protocol Type'),
        ),
    ]
Esempio n. 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='File',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 django_extensions.db.fields.CreationDateTimeField(
                     auto_now_add=True, verbose_name='created')),
                ('modified',
                 django_extensions.db.fields.ModificationDateTimeField(
                     auto_now=True, verbose_name='modified')),
                ('name',
                 models.CharField(max_length=255,
                                  null=True,
                                  verbose_name='Name')),
                ('file',
                 models.FileField(
                     null=True,
                     upload_to=apps.core.models.BaseModel.file_upload_path,
                     verbose_name='File')),
                ('category',
                 models.CharField(blank=True,
                                  choices=[('music', 'Music'),
                                           ('gtp', 'Guitar PRO'),
                                           ('text', 'Text'),
                                           ('video', 'Video')],
                                  default='music',
                                  max_length=255,
                                  null=True,
                                  verbose_name='Category')),
            ],
            options={
                'verbose_name': 'File',
                'verbose_name_plural': 'Files',
            },
        ),
        migrations.CreateModel(
            name='Track',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 django_extensions.db.fields.CreationDateTimeField(
                     auto_now_add=True, verbose_name='created')),
                ('modified',
                 django_extensions.db.fields.ModificationDateTimeField(
                     auto_now=True, verbose_name='modified')),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='Is active')),
                ('name',
                 models.CharField(max_length=255,
                                  null=True,
                                  verbose_name='Name')),
                ('year',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='Year')),
                ('slug',
                 autoslug.fields.AutoSlugField(editable=False,
                                               populate_from='name',
                                               unique_with=('name', ),
                                               verbose_name='Slug')),
                ('image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=apps.core.models.BaseModel.file_upload_path,
                     verbose_name='Image')),
                ('description',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='Description')),
                ('file',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='tracks',
                                   to='music.File',
                                   verbose_name='File')),
            ],
            options={
                'verbose_name': 'Track',
                'verbose_name_plural': 'Tracks',
                'ordering': ('-created', ),
            },
        ),
        migrations.CreateModel(
            name='TrackFile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sort_order',
                 models.PositiveIntegerField(default=0,
                                             verbose_name='Sort order')),
                ('file',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='related_tracks',
                                   to='music.File',
                                   verbose_name='File')),
                ('track',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='extra_files',
                                   to='music.Track',
                                   verbose_name='Track')),
            ],
            options={
                'verbose_name': 'Track File',
                'verbose_name_plural': 'Track Files',
                'ordering': ('sort_order', ),
            },
        ),
    ]
Esempio n. 5
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='AssignedProductAttribute',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='AssignedVariantAttribute',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Attribute',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('private_metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('slug', models.SlugField(max_length=250, unique=True)),
                ('name', models.CharField(max_length=255)),
                ('input_type',
                 models.CharField(choices=[('dropdown', 'Dropdown'),
                                           ('multiselect', 'Multi Select')],
                                  default='dropdown',
                                  max_length=50)),
                ('value_required',
                 models.BooleanField(blank=True, default=False)),
                ('is_variant_only',
                 models.BooleanField(blank=True, default=False)),
                ('visible_in_storefront',
                 models.BooleanField(blank=True, default=True)),
                ('filterable_in_storefront',
                 models.BooleanField(blank=True, default=True)),
                ('filterable_in_dashboard',
                 models.BooleanField(blank=True, default=True)),
                ('storefront_search_position',
                 models.IntegerField(blank=True, default=0)),
                ('available_in_grid',
                 models.BooleanField(blank=True, default=True)),
            ],
            options={
                'ordering': ('storefront_search_position', 'slug'),
            },
        ),
        migrations.CreateModel(
            name='AttributeValue',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sort_order',
                 models.IntegerField(db_index=True, editable=False,
                                     null=True)),
                ('name', models.CharField(max_length=250)),
                ('value',
                 models.CharField(blank=True, default='', max_length=100)),
                ('slug', models.SlugField(max_length=255)),
                ('attribute',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='values',
                                   to='product.attribute')),
            ],
            options={
                'ordering': ('sort_order', 'id'),
                'unique_together': {('slug', 'attribute')},
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('private_metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('name', models.CharField(max_length=250)),
                ('slug', models.SlugField(max_length=255, unique=True)),
                ('description', models.TextField(blank=True)),
                ('description_json', models.JSONField(blank=True,
                                                      default=dict)),
                ('background_image',
                 versatileimagefield.fields.VersatileImageField(
                     blank=True, null=True, upload_to='category-backgrounds')),
                ('background_image_alt',
                 models.CharField(blank=True, max_length=128)),
                ('lft', models.PositiveIntegerField(editable=False)),
                ('rght', models.PositiveIntegerField(editable=False)),
                ('tree_id',
                 models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(editable=False)),
                ('parent',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='children',
                                   to='product.category')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Collection',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('publication_date', models.DateField(blank=True, null=True)),
                ('is_published', models.BooleanField(default=False)),
                ('private_metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('name', models.CharField(max_length=250, unique=True)),
                ('slug', models.SlugField(max_length=255, unique=True)),
                ('background_image',
                 versatileimagefield.fields.VersatileImageField(
                     blank=True, null=True,
                     upload_to='collection-backgrounds')),
                ('background_image_alt',
                 models.CharField(blank=True, max_length=128)),
                ('description', models.TextField(blank=True)),
                ('description_json', models.JSONField(blank=True,
                                                      default=dict)),
            ],
            options={
                'ordering': ('slug', ),
            },
        ),
        migrations.CreateModel(
            name='DigitalContent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('private_metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('use_default_settings', models.BooleanField(default=True)),
                ('automatic_fulfillment', models.BooleanField(default=False)),
                ('content_type',
                 models.CharField(choices=[('file', 'digital_product')],
                                  default='file',
                                  max_length=128)),
                ('content_file',
                 models.FileField(blank=True, upload_to='digital_contents')),
                ('max_downloads', models.IntegerField(blank=True, null=True)),
                ('url_valid_days', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('publication_date', models.DateField(blank=True, null=True)),
                ('is_published', models.BooleanField(default=False)),
                ('private_metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('name', models.CharField(max_length=250)),
                ('slug', models.SlugField(max_length=255, unique=True)),
                ('description', models.TextField(blank=True)),
                ('description_json',
                 apps.core.models.SanitizedJSONField(
                     blank=True,
                     default=dict,
                     sanitizer=draftjs_sanitizer.clean_draft_js)),
                ('price_amount',
                 models.DecimalField(decimal_places=2, max_digits=12)),
                ('minimal_variant_price_amount',
                 models.DecimalField(decimal_places=2, max_digits=12)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
                ('charge_taxes', models.BooleanField(default=True)),
                ('category',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='products',
                     to='product.category')),
            ],
            options={
                'ordering': ('name', ),
                'permissions': (('manage_products', 'Manage products.'), ),
            },
        ),
        migrations.CreateModel(
            name='ProductImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sort_order',
                 models.IntegerField(db_index=True, editable=False,
                                     null=True)),
                ('image',
                 versatileimagefield.fields.VersatileImageField(
                     upload_to='products')),
                ('ppoi',
                 versatileimagefield.fields.PPOIField(default='0.5x0.5',
                                                      editable=False,
                                                      max_length=20)),
                ('alt', models.CharField(blank=True, max_length=128)),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='images',
                                   to='product.product')),
            ],
            options={
                'ordering': ('sort_order', ),
            },
        ),
        migrations.CreateModel(
            name='ProductType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('private_metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('name', models.CharField(max_length=250)),
                ('slug', models.SlugField(max_length=255, unique=True)),
                ('has_variants', models.BooleanField(default=True)),
                ('is_shipping_required', models.BooleanField(default=True)),
                ('is_digital', models.BooleanField(default=False)),
            ],
            options={
                'ordering': ('slug', ),
            },
        ),
        migrations.CreateModel(
            name='ProductVariant',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('private_metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('metadata',
                 models.JSONField(
                     blank=True,
                     default=dict,
                     encoder=apps.core.utils.json_serializer.CustomJsonEncoder,
                     null=True)),
                ('sku', models.CharField(max_length=255, unique=True)),
                ('name', models.CharField(blank=True, max_length=255)),
                ('price_override_amount',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     max_digits=12,
                                     null=True)),
                ('track_inventory', models.BooleanField(default=True)),
                ('cost_price_amount',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     max_digits=12,
                                     null=True)),
            ],
            options={
                'ordering': ('sku', ),
            },
        ),
        migrations.CreateModel(
            name='VariantImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='variant_images',
                                   to='product.productimage')),
                ('variant',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='variant_images',
                                   to='product.productvariant')),
            ],
        ),
        migrations.AddField(
            model_name='productvariant',
            name='images',
            field=models.ManyToManyField(through='product.VariantImage',
                                         to='product.ProductImage'),
        ),
        migrations.AddField(
            model_name='productvariant',
            name='product',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='variants',
                to='product.product'),
        ),
        migrations.AddField(
            model_name='product',
            name='product_type',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='products',
                to='product.producttype'),
        ),
        migrations.CreateModel(
            name='DigitalContentUrl',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('token', models.UUIDField(editable=False, unique=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('download_num', models.IntegerField(default=0)),
                ('content',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='urls',
                                   to='product.digitalcontent')),
                ('line',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='digital_content_url',
                     to='order.orderline')),
            ],
        ),
        migrations.AddField(
            model_name='digitalcontent',
            name='product_variant',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='digital_content',
                to='product.productvariant'),
        ),
        migrations.CreateModel(
            name='CollectionProduct',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sort_order',
                 models.IntegerField(db_index=True, editable=False,
                                     null=True)),
                ('collection',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='collectionproduct',
                                   to='product.collection')),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='collectionproduct',
                                   to='product.product')),
            ],
            options={
                'unique_together': {('collection', 'product')},
            },
        ),
        migrations.AddField(
            model_name='collection',
            name='products',
            field=models.ManyToManyField(blank=True,
                                         related_name='collections',
                                         through='product.CollectionProduct',
                                         to='product.Product'),
        ),
        migrations.CreateModel(
            name='AttributeVariant',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sort_order',
                 models.IntegerField(db_index=True, editable=False,
                                     null=True)),
                ('assigned_variants',
                 models.ManyToManyField(
                     blank=True,
                     related_name='attributesrelated',
                     through='product.AssignedVariantAttribute',
                     to='product.ProductVariant')),
                ('attribute',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='attributevariant',
                                   to='product.attribute')),
                ('product_type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='attributevariant',
                                   to='product.producttype')),
            ],
            options={
                'ordering': ('sort_order', ),
                'unique_together': {('attribute', 'product_type')},
            },
        ),
        migrations.CreateModel(
            name='AttributeProduct',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sort_order',
                 models.IntegerField(db_index=True, editable=False,
                                     null=True)),
                ('assigned_products',
                 models.ManyToManyField(
                     blank=True,
                     related_name='attributesrelated',
                     through='product.AssignedProductAttribute',
                     to='product.Product')),
                ('attribute',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='attributeproduct',
                                   to='product.attribute')),
                ('product_type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='attributeproduct',
                                   to='product.producttype')),
            ],
            options={
                'ordering': ('sort_order', ),
                'unique_together': {('attribute', 'product_type')},
            },
        ),
        migrations.AddField(
            model_name='attribute',
            name='product_types',
            field=models.ManyToManyField(blank=True,
                                         related_name='product_attributes',
                                         through='product.AttributeProduct',
                                         to='product.ProductType'),
        ),
        migrations.AddField(
            model_name='attribute',
            name='product_variant_types',
            field=models.ManyToManyField(blank=True,
                                         related_name='variant_attributes',
                                         through='product.AttributeVariant',
                                         to='product.ProductType'),
        ),
        migrations.AddField(
            model_name='assignedvariantattribute',
            name='assignment',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='variantassignments',
                to='product.attributevariant'),
        ),
        migrations.AddField(
            model_name='assignedvariantattribute',
            name='values',
            field=models.ManyToManyField(to='product.AttributeValue'),
        ),
        migrations.AddField(
            model_name='assignedvariantattribute',
            name='variant',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='attributes',
                to='product.productvariant'),
        ),
        migrations.AddField(
            model_name='assignedproductattribute',
            name='assignment',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='productassignments',
                to='product.attributeproduct'),
        ),
        migrations.AddField(
            model_name='assignedproductattribute',
            name='product',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='attributes',
                to='product.product'),
        ),
        migrations.AddField(
            model_name='assignedproductattribute',
            name='values',
            field=models.ManyToManyField(to='product.AttributeValue'),
        ),
        migrations.CreateModel(
            name='AttributeValueTranslation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('language_code', models.CharField(max_length=10)),
                ('name', models.CharField(max_length=100)),
                ('attribute_value',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='translations',
                                   to='product.attributevalue')),
            ],
            options={
                'unique_together': {('language_code', 'attribute_value')},
            },
        ),
        migrations.CreateModel(
            name='AttributeTranslation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('language_code', models.CharField(max_length=10)),
                ('name', models.CharField(max_length=100)),
                ('attribute',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='translations',
                                   to='product.attribute')),
            ],
            options={
                'unique_together': {('language_code', 'attribute')},
            },
        ),
        migrations.AlterUniqueTogether(
            name='assignedvariantattribute',
            unique_together={('variant', 'assignment')},
        ),
        migrations.AlterUniqueTogether(
            name='assignedproductattribute',
            unique_together={('product', 'assignment')},
        ),
    ]
Esempio n. 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Affectation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('is_removed', models.BooleanField(default=False)),
                ('comment', models.TextField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('is_removed', models.BooleanField(default=False)),
                ('date', models.DateField()),
                ('duration_hours', models.IntegerField(blank=True, null=True)),
                ('duration_minutes', models.IntegerField(blank=True,
                                                         null=True)),
            ],
            options={
                'verbose_name_plural': 'Events',
                'verbose_name': 'Event',
            },
        ),
        migrations.CreateModel(
            name='Feature',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('menu_item_name',
                 models.CharField(max_length=100, verbose_name='Item Name')),
                ('url', models.CharField(max_length=100, verbose_name='Url')),
                ('icon', models.CharField(max_length=100,
                                          verbose_name='Icon')),
                ('position',
                 models.PositiveIntegerField(blank=True,
                                             null=True,
                                             verbose_name='Position')),
                ('child',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='child_feature',
                     to='core.Feature')),
                ('permission', models.ManyToManyField(to='auth.Permission')),
            ],
            options={
                'verbose_name_plural': 'Features',
                'verbose_name': 'Feature',
            },
        ),
        migrations.CreateModel(
            name='Holiday',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('is_removed', models.BooleanField(default=False)),
                ('day', models.DateField()),
            ],
            options={
                'verbose_name_plural': 'Holidays',
                'verbose_name': 'Holiday',
            },
        ),
        migrations.CreateModel(
            name='Hour',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('is_removed', models.BooleanField(default=False)),
                ('start_time', models.TimeField()),
                ('end_time', models.TimeField(blank=True, null=True)),
            ],
            options={
                'verbose_name_plural': 'Hours',
                'verbose_name': 'Hour',
            },
        ),
        migrations.CreateModel(
            name='MotiveAffectation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=150)),
            ],
            options={
                'verbose_name_plural': 'MotiveAffectations',
                'verbose_name': 'MotiveAffectation',
            },
        ),
        migrations.CreateModel(
            name='NonWorkingDay',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('is_removed', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=20)),
                ('number_day', models.IntegerField()),
            ],
            options={
                'verbose_name_plural': 'NonWorkingDays',
                'verbose_name': 'NonWorkingDay',
            },
        ),
        migrations.CreateModel(
            name='Profession',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('is_removed', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=200)),
                ('abbreviation', models.CharField(max_length=10)),
            ],
            options={
                'verbose_name_plural': 'Professions',
                'verbose_name': 'Profession',
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('is_removed', models.BooleanField(default=False)),
                ('phone', models.CharField(blank=True,
                                           max_length=15,
                                           null=True)),
                ('color', models.CharField(blank=True, max_length=7,
                                           null=True)),
                ('admin', models.NullBooleanField()),
                ('avatar',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=apps.core.models.get_path_avatar)),
                ('profession',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='core.Profession')),
                ('user',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Profiles',
                'verbose_name': 'Profile',
            },
        ),
        migrations.CreateModel(
            name='Status',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name_plural': 'Statuses',
                'verbose_name': 'Status',
            },
        ),
        migrations.CreateModel(
            name='Turn',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('is_removed', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=100)),
                ('duration_hours', models.IntegerField(blank=True, null=True)),
                ('duration_minutes', models.IntegerField(blank=True,
                                                         null=True)),
                ('hour',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='core.Hour')),
            ],
            options={
                'ordering': ['hour__start_time'],
                'verbose_name_plural': 'Turns',
                'verbose_name': 'Turn',
            },
        ),
        migrations.AddField(
            model_name='event',
            name='profile',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='core.Profile'),
        ),
        migrations.AddField(
            model_name='event',
            name='status',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='core.Status'),
        ),
        migrations.AddField(
            model_name='event',
            name='turn',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='core.Turn'),
        ),
        migrations.AddField(
            model_name='affectation',
            name='hour',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='core.Hour'),
        ),
        migrations.AddField(
            model_name='affectation',
            name='motive',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='core.MotiveAffectation'),
        ),
    ]
Esempio n. 7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('data', '0001_initial'),
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Pixeler',
            fields=[
                ('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=30, 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')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Analysis',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('secondary_data', models.FileField(upload_to=apps.core.models.Analysis.secondary_data_upload_to, verbose_name='Secondary data')),
                ('notebook', models.FileField(blank=True, help_text='Upload your Jupiter Notebook or any other document helping to understand your analysis', upload_to=apps.core.models.Analysis.notebook_upload_to, verbose_name='Notebook')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('saved_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Analysis',
                'verbose_name_plural': 'Analyses',
            },
        ),
        migrations.CreateModel(
            name='Experiment',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('released_at', models.DateField(verbose_name='Release date')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('saved_at', models.DateTimeField(auto_now=True)),
                ('entries', models.ManyToManyField(related_name='experiments', related_query_name='experiment', to='data.Entry')),
            ],
            options={
                'verbose_name': 'Experiment',
                'verbose_name_plural': 'Experiments',
            },
        ),
        migrations.CreateModel(
            name='OmicsArea',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100, unique=True, verbose_name='Name')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=False)),
                ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='core.OmicsArea')),
            ],
            options={
                'verbose_name': 'Omics area',
                'verbose_name_plural': 'Omics areas',
            },
        ),
        migrations.CreateModel(
            name='OmicsUnit',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('status', models.PositiveSmallIntegerField(choices=[(1, 'Dubious'), (2, 'Exists'), (3, 'Invalid'), (4, 'Validated')], default=1, verbose_name='Status')),
                ('reference', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data.Entry')),
            ],
            options={
                'verbose_name': 'Omics Unit',
                'verbose_name_plural': 'Omics Units',
            },
        ),
        migrations.CreateModel(
            name='OmicsUnitType',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100, unique=True, verbose_name='Name')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
            ],
            options={
                'verbose_name': 'Omics unit type',
                'verbose_name_plural': 'Omics unit types',
            },
        ),
        migrations.CreateModel(
            name='Pixel',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('value', models.FloatField(help_text='The pixel value', verbose_name='Value')),
                ('quality_score', models.FloatField(blank=True, help_text='Could be a p-value, confidence index, etc.', null=True, verbose_name='Quality score')),
                ('analysis', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pixels', related_query_name='pixel', to='core.Analysis')),
                ('omics_unit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pixels', related_query_name='pixel', to='core.OmicsUnit')),
            ],
            options={
                'verbose_name': 'Pixel',
                'verbose_name_plural': 'Pixels',
            },
        ),
        migrations.CreateModel(
            name='Species',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100, unique=True, verbose_name='Name')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('reference', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='species', related_query_name='species', to='data.Entry')),
            ],
            options={
                'verbose_name': 'Species',
                'verbose_name_plural': 'Species',
            },
        ),
        migrations.CreateModel(
            name='Strain',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100, verbose_name='Name')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('species', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='strains', related_query_name='strain', to='core.Species')),
            ],
            options={
                'verbose_name': 'Strain',
                'verbose_name_plural': 'Strains',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('slug', models.SlugField()),
                ('count', models.IntegerField(default=0, help_text='Internal counter of how many times this tag is in use')),
                ('protected', models.BooleanField(default=False, help_text='Will not be deleted when the count reaches 0')),
            ],
            options={
                'ordering': ('name',),
                'abstract': False,
            },
            bases=(tagulous.models.models.BaseTagModel, models.Model),
        ),
        migrations.AlterUniqueTogether(
            name='tag',
            unique_together=set([('slug',)]),
        ),
        migrations.AddField(
            model_name='omicsunit',
            name='strain',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='omics_units', related_query_name='omics_unit', to='core.Strain'),
        ),
        migrations.AddField(
            model_name='omicsunit',
            name='type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='omics_units', related_query_name='omics_unit', to='core.OmicsUnitType'),
        ),
        migrations.AddField(
            model_name='experiment',
            name='omics_area',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='experiments', related_query_name='experiment', to='core.OmicsArea'),
        ),
        migrations.AddField(
            model_name='experiment',
            name='tags',
            field=tagulous.models.fields.TagField(_set_tag_meta=True, help_text='Enter a comma-separated tag string', to='core.Tag'),
        ),
        migrations.AddField(
            model_name='analysis',
            name='experiments',
            field=models.ManyToManyField(related_name='analyses', related_query_name='analysis', to='core.Experiment'),
        ),
        migrations.AddField(
            model_name='analysis',
            name='pixeler',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='analyses', related_query_name='analysis', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='analysis',
            name='tags',
            field=tagulous.models.fields.TagField(_set_tag_meta=True, help_text='Enter a comma-separated tag string', to='core.Tag'),
        ),
        migrations.AlterUniqueTogether(
            name='strain',
            unique_together=set([('name', 'species')]),
        ),
        migrations.AlterUniqueTogether(
            name='omicsunit',
            unique_together=set([('reference', 'strain', 'type')]),
        ),
    ]
Esempio n. 8
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Users',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='Почта')),
                ('account_type',
                 models.IntegerField(choices=[(0, 'Root'),
                                              (1, 'Администратор'),
                                              (2, 'Учитель'), (3, 'Ученик')],
                                     default=3,
                                     verbose_name='Тип аккаунта')),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='Активный')),
                ('is_staff',
                 models.BooleanField(default=False,
                                     verbose_name='Администратор')),
                ('first_name',
                 models.CharField(max_length=100, verbose_name='Имя')),
                ('second_name',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=100,
                                  verbose_name='Отчество')),
                ('surname',
                 models.CharField(max_length=100, verbose_name='Фамилия')),
                ('registration_date',
                 models.DateField(auto_now_add=True,
                                  null=True,
                                  verbose_name='Дата регистрации')),
            ],
            options={
                'verbose_name':
                'Пользователь',
                'verbose_name_plural':
                'Пользователи',
                'permissions':
                [('edit_news', 'Может редактировать статьи в новостном блоке.')
                 ],
            },
            managers=[
                ('objects', apps.core.users.manager.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='AdminMessages',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Время отправки')),
                ('subject',
                 models.CharField(max_length=100,
                                  verbose_name='Тема сообщения')),
                ('content',
                 models.TextField(max_length=4000,
                                  verbose_name='Текст сообщения')),
                ('is_read',
                 models.BooleanField(default=False,
                                     verbose_name='Прочитанное')),
            ],
            options={
                'verbose_name': 'Сообщение администратору',
                'verbose_name_plural': 'Сообщения администратору',
                'ordering': ['date', 'subject'],
            },
        ),
        migrations.CreateModel(
            name='AverageValues',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('weights_x_values',
                 models.IntegerField(
                     verbose_name='Сумма произведений весов и значений оценок')
                 ),
                ('weights_sum',
                 models.IntegerField(verbose_name='Сумма весов оценок')),
                ('grades_number',
                 models.IntegerField(verbose_name='Количество оценок')),
                ('grades_sum',
                 models.IntegerField(verbose_name='Сумма значений оценок')),
                ('missed',
                 models.IntegerField(
                     default=0, verbose_name='Количество пропущенных уроков')),
            ],
            options={
                'verbose_name': 'Данные об оценках учеников',
            },
        ),
        migrations.CreateModel(
            name='Controls',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=150, verbose_name='Вид работы')),
                ('weight',
                 models.FloatField(default=1, verbose_name='Коэффицент')),
                ('notify',
                 models.BooleanField(default=False,
                                     verbose_name='Оповещать учеников')),
                ('default',
                 models.BooleanField(default=False,
                                     verbose_name='Вид работы по умолчанию')),
            ],
            options={
                'verbose_name': 'Вид работы',
                'verbose_name_plural': 'Виды работ',
            },
        ),
        migrations.CreateModel(
            name='Groups',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
            options={
                'verbose_name': 'Группа',
                'verbose_name_plural': 'Группы',
            },
        ),
        migrations.CreateModel(
            name='Homework',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content', models.TextField(blank=True,
                                             verbose_name='Задание')),
            ],
            options={
                'verbose_name': 'Домашнее задание',
                'verbose_name_plural': 'Домашние задания',
            },
        ),
        migrations.CreateModel(
            name='Quarters',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('number',
                 models.IntegerField(choices=[(1, 'I'), (2, 'II'), (3, 'III'),
                                              (4, 'IV')],
                                     unique=True,
                                     verbose_name='Четверть')),
                ('begin', models.DateField(verbose_name='Начало четверти')),
                ('end', models.DateField(verbose_name='Конец четверти')),
            ],
            options={
                'verbose_name': 'Четверть',
                'verbose_name_plural': 'Четверти',
                'ordering': ['number'],
            },
        ),
        migrations.CreateModel(
            name='Subjects',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100,
                                  unique=True,
                                  verbose_name='Название')),
                ('icon',
                 models.ImageField(blank=True,
                                   upload_to='subject_icons/',
                                   verbose_name='Иконка')),
            ],
            options={
                'verbose_name': 'Предмет',
                'verbose_name_plural': 'Предметы',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Admins',
            fields=[
                ('account',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='admin',
                     serialize=False,
                     to='core.users',
                     verbose_name='Пользователь')),
            ],
            options={
                'verbose_name': 'Администратор',
                'verbose_name_plural': 'Администраторы',
            },
        ),
        migrations.CreateModel(
            name='Students',
            fields=[
                ('account',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='student',
                     serialize=False,
                     to='core.users',
                     verbose_name='Пользователь')),
                ('president',
                 models.BooleanField(default=False, verbose_name='Староста')),
            ],
            options={
                'verbose_name': 'Ученик',
                'verbose_name_plural': 'Ученики',
                'ordering': ['klass'],
            },
        ),
        migrations.CreateModel(
            name='Teachers',
            fields=[
                ('account',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='teacher',
                     serialize=False,
                     to='core.users',
                     verbose_name='Пользователь')),
            ],
            options={
                'verbose_name': 'Учитель',
                'verbose_name_plural': 'Учителя',
            },
        ),
        migrations.CreateModel(
            name='Lessons',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateField(verbose_name='Дата')),
                ('theme',
                 models.CharField(blank=True,
                                  max_length=120,
                                  verbose_name='Тема')),
                ('is_planned',
                 models.BooleanField(default=False,
                                     verbose_name='Запланирован')),
                ('control',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='core.controls',
                                   verbose_name='Контроль')),
                ('group',
                 models.ForeignKey(default=None,
                                   null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='core.groups',
                                   verbose_name='Группа')),
                ('quarter',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='core.quarters',
                                   verbose_name='Четверть')),
            ],
            options={
                'verbose_name': 'Урок',
                'verbose_name_plural': 'Уроки',
                'ordering': ['date'],
            },
        ),
        migrations.CreateModel(
            name='Klasses',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('number',
                 models.IntegerField(choices=[(1, 1), (2, 2), (3, 3), (4, 4),
                                              (5, 5), (6, 6), (7, 7), (8, 8),
                                              (9, 9), (10, 10), (11, 11)],
                                     verbose_name='Класс')),
                ('letter',
                 models.CharField(choices=[('А', 'А'), ('Б', 'Б'), ('В', 'В'),
                                           ('Г', 'Г'), ('Д', 'Д'), ('Е', 'Е'),
                                           ('Ж', 'Ж'), ('З', 'З'), ('И', 'И'),
                                           ('К', 'К')],
                                  max_length=2,
                                  verbose_name='Буква')),
                ('subjects',
                 models.ManyToManyField(to='core.Subjects',
                                        verbose_name='Предметы')),
            ],
            options={
                'verbose_name': 'Класс',
                'verbose_name_plural': 'Классы',
                'ordering': ['number', 'letter'],
            },
        ),
        migrations.CreateModel(
            name='HomeworkFiles',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('file',
                 models.FileField(upload_to=apps.core.models.homework_upload,
                                  verbose_name='Файл')),
                ('homework',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='files',
                                   to='core.homework')),
            ],
        ),
        migrations.AddField(
            model_name='homework',
            name='lesson',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='core.lessons',
                verbose_name='Урок'),
        ),
        migrations.AddField(
            model_name='groups',
            name='klass',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='core.klasses',
                verbose_name='Класс'),
        ),
        migrations.AddField(
            model_name='groups',
            name='subject',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='core.subjects',
                verbose_name='Предмет'),
        ),
        migrations.CreateModel(
            name='Grades',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('amount',
                 models.IntegerField(default=None,
                                     null=True,
                                     verbose_name='Балл')),
                ('comment',
                 models.TextField(blank=True,
                                  default='',
                                  verbose_name='Комментарий')),
                ('lesson',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.lessons',
                                   verbose_name='Урок')),
            ],
            options={
                'verbose_name_plural': 'Оценки',
                'ordering': ['lesson'],
            },
        ),
        migrations.AddConstraint(
            model_name='controls',
            constraint=models.UniqueConstraint(
                condition=models.Q(default=True),
                fields=('default', ),
                name='unique_default_control'),
        ),
        migrations.AddField(
            model_name='averagevalues',
            name='subject',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='core.subjects'),
        ),
        migrations.AddField(
            model_name='adminmessages',
            name='sender',
            field=models.ForeignKey(
                default=None,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='Отправитель'),
        ),
        migrations.AddField(
            model_name='users',
            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='users',
            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'),
        ),
        migrations.AddField(
            model_name='teachers',
            name='subjects',
            field=models.ManyToManyField(to='core.Subjects',
                                         verbose_name='Предметы'),
        ),
        migrations.AddField(
            model_name='students',
            name='klass',
            field=models.ForeignKey(
                blank=True,
                default=None,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='core.klasses',
                verbose_name='Класс'),
        ),
        migrations.AddField(
            model_name='klasses',
            name='head_teacher',
            field=models.OneToOneField(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name='klass',
                to='core.teachers',
                verbose_name='Классный руководитель'),
        ),
        migrations.AddField(
            model_name='klasses',
            name='teachers',
            field=models.ManyToManyField(related_name='klasses',
                                         to='core.Teachers',
                                         verbose_name='Учителя'),
        ),
        migrations.AddField(
            model_name='groups',
            name='students',
            field=models.ManyToManyField(to='core.Students',
                                         verbose_name='Отображаемые ученики'),
        ),
        migrations.AddField(
            model_name='grades',
            name='student',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='core.students',
                verbose_name='Ученик'),
        ),
        migrations.AddField(
            model_name='averagevalues',
            name='student',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='average',
                to='core.students'),
        ),
        migrations.AlterUniqueTogether(
            name='klasses',
            unique_together={('number', 'letter')},
        ),
        migrations.AlterUniqueTogether(
            name='groups',
            unique_together={('klass', 'subject')},
        ),
        migrations.AlterUniqueTogether(
            name='averagevalues',
            unique_together={('student', 'subject')},
        ),
    ]
Esempio n. 9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='DicomNode',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='Name')),
                ('aet_title',
                 models.CharField(max_length=100, verbose_name='AET Title')),
                ('peer_aet_title',
                 models.CharField(max_length=100,
                                  verbose_name='Peer AET Title')),
                ('peer_host',
                 models.CharField(max_length=100, verbose_name='Peer Host')),
                ('peer_port', models.IntegerField(verbose_name='Peer Port')),
            ],
            options={
                'db_table': 'dicom_nodes',
            },
        ),
        migrations.CreateModel(
            name='Instance',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sop_instance_uid',
                 models.CharField(max_length=80,
                                  unique=True,
                                  verbose_name='SOP Instance UID')),
                ('instance_number',
                 models.IntegerField(verbose_name='Instance Number')),
                ('rows', models.IntegerField(verbose_name='Rows')),
                ('columns', models.IntegerField(verbose_name='Columns')),
                ('color_space',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='Color Space')),
                ('photometric_interpretation',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='Photometric Interpretation')),
                ('smallest_image_pixel_value',
                 models.PositiveIntegerField(
                     blank=True,
                     null=True,
                     verbose_name='Smallest Image Pixel Value')),
                ('largest_image_pixel_value',
                 models.PositiveIntegerField(
                     blank=True,
                     null=True,
                     verbose_name='Largest Image Pixel Value')),
                ('pixel_aspect_ratio',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='Pixel Aspect Ratio')),
                ('pixel_spacing',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='Pixel Spacing')),
                ('image',
                 models.FileField(upload_to=apps.core.models.image_file_path)),
            ],
            options={
                'db_table': 'instances',
            },
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('patient_name',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Patient')),
                ('patient_id',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Patient ID')),
                ('patient_sex',
                 models.CharField(blank=True,
                                  max_length=10,
                                  null=True,
                                  verbose_name='Patient Sex')),
                ('patient_age',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='Patient Age')),
                ('patient_birthdate',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Patient Birthdate')),
            ],
            options={
                'db_table': 'patients',
            },
        ),
        migrations.CreateModel(
            name='Plugin',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Name')),
                ('version',
                 models.CharField(max_length=20, verbose_name='Version')),
                ('author',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Author')),
                ('info',
                 models.CharField(blank=True,
                                  max_length=500,
                                  null=True,
                                  verbose_name='Information')),
                ('docs',
                 models.TextField(blank=True,
                                  max_length=500,
                                  null=True,
                                  verbose_name='Documentation')),
                ('modalities',
                 jsonfield.fields.JSONField(blank=True,
                                            null=True,
                                            verbose_name='Modalities')),
                ('tags',
                 jsonfield.fields.JSONField(blank=True,
                                            null=True,
                                            verbose_name='Tags')),
                ('params',
                 jsonfield.fields.JSONField(blank=True,
                                            null=True,
                                            verbose_name='Parameters')),
                ('result', jsonfield.fields.JSONField(verbose_name='Result')),
                ('plugin',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=apps.core.models.plugin_file_path)),
            ],
            options={
                'db_table': 'plugins',
            },
        ),
        migrations.CreateModel(
            name='Series',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('series_instance_uid',
                 models.CharField(max_length=80,
                                  unique=True,
                                  verbose_name='Series Instance UID')),
                ('protocol_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  null=True,
                                  verbose_name='Protocol Name')),
                ('modality',
                 models.CharField(max_length=80, verbose_name='Modality')),
                ('series_number',
                 models.CharField(blank=True,
                                  max_length=80,
                                  null=True,
                                  verbose_name='Series Number')),
                ('patient_position',
                 models.CharField(max_length=30,
                                  verbose_name='Patient Position')),
                ('body_part_examined',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='Body Part Examined')),
            ],
            options={
                'verbose_name': 'Series',
                'verbose_name_plural': 'Series',
                'db_table': 'series',
            },
        ),
        migrations.CreateModel(
            name='Study',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('study_instance_uid',
                 models.CharField(max_length=80,
                                  unique=True,
                                  verbose_name='Study Instance UID')),
                ('study_id',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Study ID')),
                ('study_description',
                 models.CharField(blank=True,
                                  max_length=300,
                                  null=True,
                                  verbose_name='Study Description')),
                ('referring_physician_name',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Referring Physician')),
                ('patient',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='studies',
                                   to='core.Patient')),
            ],
            options={
                'verbose_name_plural': 'Studies',
                'db_table': 'studies',
            },
        ),
        migrations.AddField(
            model_name='series',
            name='study',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='series',
                to='core.Study'),
        ),
        migrations.AddField(
            model_name='instance',
            name='series',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='instances',
                to='core.Series'),
        ),
    ]
Esempio n. 10
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='File',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('file',
                 models.FileField(
                     upload_to=apps.core.models.md5hash_filename)),
                ('mime', models.CharField(blank=True, max_length=32)),
                ('file_hash', models.CharField(blank=True, max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('timestamp',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('text',
                 models.CharField(blank=True, db_index=True, max_length=1024)),
                ('readed_by',
                 models.TextField(
                     validators=[apps.core.models.space_separated])),
                ('edited', models.BooleanField(default=False)),
                ('files', models.ManyToManyField(blank=True, to='core.File')),
                ('forwarded',
                 models.ManyToManyField(blank=True, to='core.Message')),
            ],
            options={
                'ordering': ['-timestamp'],
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('fullname', models.CharField(blank=True, max_length=128)),
                ('bio', models.CharField(blank=True, max_length=128)),
                ('last_activity',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('avatar',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='core.File')),
                ('friend_requests',
                 models.ManyToManyField(blank=True, to='core.Profile')),
                ('friends',
                 models.ManyToManyField(blank=True,
                                        related_name='_profile_friends_+',
                                        to='core.Profile')),
            ],
        ),
        migrations.CreateModel(
            name='Puddle',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=128)),
                ('is_channel', models.BooleanField(default=False)),
                ('avatar',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='core.File')),
                ('creator',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='creator',
                     to='core.Profile')),
                ('messages',
                 models.ManyToManyField(blank=True, to='core.Message')),
            ],
        ),
        migrations.AddField(
            model_name='profile',
            name='puddles',
            field=models.ManyToManyField(blank=True, to='core.Puddle'),
        ),
        migrations.AddField(
            model_name='profile',
            name='user',
            field=models.OneToOneField(
                blank=True,
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='message',
            name='hidden_from',
            field=models.ManyToManyField(blank=True,
                                         related_name='hidden_from',
                                         to='core.Profile'),
        ),
        migrations.AddField(
            model_name='message',
            name='sender',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='core.Profile'),
        ),
        migrations.AddField(
            model_name='message',
            name='target_puddle',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='core.Puddle'),
        ),
        migrations.AddField(
            model_name='file',
            name='owner',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='core.Profile'),
        ),
    ]
Esempio n. 11
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('email',
                 models.CharField(max_length=30,
                                  unique=True,
                                  verbose_name='Email')),
                ('name', models.CharField(max_length=30, verbose_name='Name')),
                ('surname',
                 models.CharField(max_length=30, verbose_name='Surname')),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff',
                 models.BooleanField(default=False, verbose_name='Admin?')),
                ('date_joined',
                 models.DateTimeField(default=datetime.datetime(
                     2018, 6, 8, 19, 46, 49, 947801, tzinfo=utc))),
                ('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',
                'db_table': 'users',
            },
            managers=[
                ('objects', apps.core.managers.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='DicomNode',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='Name')),
                ('peer_url',
                 models.CharField(max_length=255, verbose_name='Peer URL')),
                ('instances_url',
                 models.CharField(default='/instances',
                                  max_length=255,
                                  verbose_name='WADO Instances URL')),
                ('instance_file_url',
                 models.CharField(default='/instances/{id}/file',
                                  max_length=255,
                                  verbose_name='WADO Instance Image URL')),
            ],
            options={
                'db_table': 'dicom_nodes',
            },
        ),
        migrations.CreateModel(
            name='Instance',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sop_instance_uid',
                 models.CharField(max_length=80,
                                  unique=True,
                                  verbose_name='SOP Instance UID')),
                ('instance_number',
                 models.IntegerField(verbose_name='Instance Number')),
                ('rows', models.IntegerField(verbose_name='Rows')),
                ('columns', models.IntegerField(verbose_name='Columns')),
                ('color_space',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='Color Space')),
                ('photometric_interpretation',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='Photometric Interpretation')),
                ('smallest_image_pixel_value',
                 models.PositiveIntegerField(
                     blank=True,
                     null=True,
                     verbose_name='Smallest Image Pixel Value')),
                ('largest_image_pixel_value',
                 models.PositiveIntegerField(
                     blank=True,
                     null=True,
                     verbose_name='Largest Image Pixel Value')),
                ('pixel_aspect_ratio',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='Pixel Aspect Ratio')),
                ('pixel_spacing',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='Pixel Spacing')),
                ('image',
                 models.FileField(upload_to=apps.core.models.image_file_path)),
            ],
            options={
                'db_table': 'instances',
            },
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('patient_name',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Patient')),
                ('patient_id',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Patient ID')),
                ('patient_sex',
                 models.CharField(blank=True,
                                  max_length=10,
                                  null=True,
                                  verbose_name='Patient Sex')),
                ('patient_age',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='Patient Age')),
                ('patient_birthdate',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Patient Birthdate')),
            ],
            options={
                'db_table': 'patients',
            },
        ),
        migrations.CreateModel(
            name='Plugin',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100,
                                  unique=True,
                                  verbose_name='Name')),
                ('display_name',
                 models.CharField(default='',
                                  max_length=150,
                                  verbose_name='Display Name')),
                ('version',
                 models.CharField(max_length=20, verbose_name='Version')),
                ('author',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Author')),
                ('info',
                 models.CharField(blank=True,
                                  max_length=500,
                                  null=True,
                                  verbose_name='Information')),
                ('docs',
                 models.TextField(blank=True,
                                  max_length=500,
                                  null=True,
                                  verbose_name='Documentation')),
                ('modalities',
                 jsonfield.fields.JSONField(blank=True,
                                            null=True,
                                            verbose_name='Modalities')),
                ('tags',
                 jsonfield.fields.JSONField(blank=True,
                                            null=True,
                                            verbose_name='Tags')),
                ('params',
                 jsonfield.fields.JSONField(blank=True,
                                            null=True,
                                            verbose_name='Parameters')),
                ('result', jsonfield.fields.JSONField(verbose_name='Result')),
                ('type',
                 models.CharField(default='ANALYZER',
                                  max_length=40,
                                  verbose_name='Type')),
                ('plugin',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=apps.core.models.plugin_file_path)),
                ('is_installed',
                 models.BooleanField(default=False,
                                     verbose_name='Is installed')),
            ],
            options={
                'db_table': 'plugins',
            },
        ),
        migrations.CreateModel(
            name='ProcessingResult',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('expire_date', models.DateTimeField()),
                ('image',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=apps.core.models.processed_image_path,
                     verbose_name='Image')),
                ('json', jsonfield.fields.JSONField(verbose_name='JSON')),
                ('session_token', models.CharField(max_length=255)),
            ],
            options={
                'db_table': 'processing_results',
            },
        ),
        migrations.CreateModel(
            name='Series',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('series_instance_uid',
                 models.CharField(max_length=80,
                                  unique=True,
                                  verbose_name='Series Instance UID')),
                ('protocol_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  null=True,
                                  verbose_name='Protocol Name')),
                ('modality',
                 models.CharField(max_length=80, verbose_name='Modality')),
                ('series_number',
                 models.CharField(blank=True,
                                  max_length=80,
                                  null=True,
                                  verbose_name='Series Number')),
                ('patient_position',
                 models.CharField(max_length=30,
                                  verbose_name='Patient Position')),
                ('body_part_examined',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='Body Part Examined')),
            ],
            options={
                'verbose_name': 'Series',
                'verbose_name_plural': 'Series',
                'db_table': 'series',
            },
        ),
        migrations.CreateModel(
            name='Study',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('study_instance_uid',
                 models.CharField(max_length=80,
                                  unique=True,
                                  verbose_name='Study Instance UID')),
                ('study_id',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Study ID')),
                ('study_date',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Study Date')),
                ('study_description',
                 models.CharField(blank=True,
                                  max_length=300,
                                  null=True,
                                  verbose_name='Study Description')),
                ('referring_physician_name',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Referring Physician')),
                ('patient',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='studies',
                                   to='core.Patient')),
            ],
            options={
                'verbose_name_plural': 'Studies',
                'db_table': 'studies',
            },
        ),
        migrations.AddField(
            model_name='series',
            name='study',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='series',
                to='core.Study'),
        ),
        migrations.AddField(
            model_name='instance',
            name='series',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='instances',
                to='core.Series'),
        ),
    ]