示例#1
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=250)),
                ('slug', models.SlugField(unique=True)),
                ('author', models.CharField(max_length=250)),
                ('guess', models.CharField(max_length=150)),
                ('photograph', models.CharField(max_length=150)),
                ('date', models.DateTimeField(blank=True, null=True)),
                ('resume', models.TextField()),
                ('content', models.TextField()),
                ('facebookUrl', models.TextField(blank=True, null=True)),
                ('twitterUrl', models.TextField(blank=True, null=True)),
                ('whatsappUrl', models.TextField(blank=True, null=True)),
                ('mailUrl', models.TextField(blank=True, null=True)),
                ('coverImage', models.FileField(blank=True, null=True, upload_to=backend.models.articles_image_path)),
                ('articleImage', models.FileField(blank=True, null=True, upload_to=backend.models.articles_image_path)),
                ('cover', models.BooleanField(default=False)),
                ('mainMenu', models.BooleanField(default=False)),
                ('created_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile')),
                ('modified_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
    ]
示例#2
0
class Migration(migrations.Migration):

    dependencies = [
        ('backend', '0002_auth_authscript1'),
    ]

    operations = [
        migrations.AddField(
            model_name='authscript1',
            name='jar_pkg',
            field=models.FileField(blank=True, max_length=255, null=True, upload_to=backend.models.upload_to, verbose_name='jar\u5305'),
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='suite_libs',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(blank=True, max_length=255)),
                ('descr', models.TextField(blank=True, null=True)),
                ('docs', models.TextField(blank=True,
                                          editable=False,
                                          null=True)),
                ('lib_name', models.CharField(blank=True, max_length=255)),
                ('status',
                 models.CharField(default='PENDING',
                                  editable=False,
                                  max_length=10)),
                ('f_lib',
                 models.FileField(
                     blank=True,
                     upload_to='libs/',
                     validators=[
                         django.core.validators.FileExtensionValidator(['py']),
                         backend.models.validate_fsize
                     ],
                     verbose_name='File ( .py Max 150Kb )')),
                ('notes', models.TextField(blank=True, null=True)),
                ('dt',
                 models.DateTimeField(auto_now=True, verbose_name='Created')),
            ],
            options={
                'verbose_name': 'LIBRARIES',
                'verbose_name_plural': 'LIBRARIES',
                'ordering': ('name', 'lib_name', 'status'),
            },
        ),
        migrations.AlterField(
            model_name='temp_library',
            name='l_val',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='li_val',
                to='backend.suite_libs',
                verbose_name='Library'),
        ),
    ]
示例#4
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('ref', models.CharField(blank=True, max_length=10, null=True)),
                ('total', models.IntegerField(default=0)),
                ('status', models.CharField(default='Open', max_length=25)),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Catalog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=50)),
                ('slug', models.SlugField(unique=True)),
                ('picture', models.FileField(null=True, upload_to='catalogs')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=50)),
                ('slug', models.SlugField(unique=True)),
                ('picture', models.FileField(null=True, upload_to='categories')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Collection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=50)),
                ('slug', models.SlugField(unique=True)),
                ('picture', models.FileField(null=True, upload_to='collections')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Color',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=200)),
                ('slug', models.SlugField(unique=True)),
                ('picture', models.FileField(null=True, upload_to='motifs')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('title', models.CharField(max_length=100)),
                ('slug', models.SlugField(unique=True)),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('ref', models.CharField(max_length=12)),
                ('title', models.CharField(max_length=50)),
                ('slug', models.SlugField(unique=True)),
                ('price', models.IntegerField()),
                ('description', models.TextField(default='')),
                ('material', models.CharField(blank=True, max_length=150, null=True)),
                ('is_feature', models.BooleanField(default=False)),
                ('is_discount', models.BooleanField(default=False)),
                ('catalog', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Catalog')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Category')),
                ('collection', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Collection')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='Size',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('name', models.CharField(max_length=50)),
                ('size_system', models.CharField(default='', max_length=20)),
                ('quantity', models.IntegerField(default=0)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Category')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gender', models.CharField(max_length=10)),
                ('title', models.CharField(blank=True, max_length=4, null=True)),
                ('phone_number', models.CharField(blank=True, max_length=50, null=True)),
                ('first_name', models.CharField(blank=True, max_length=100, null=True)),
                ('last_name', models.CharField(blank=True, max_length=100, null=True)),
                ('city', models.CharField(blank=True, max_length=100, null=True)),
                ('country', models.CharField(blank=True, max_length=100, null=True)),
                ('address', models.CharField(blank=True, default='', max_length=250, null=True)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('user', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='userprofile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Variety',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('quantity', models.IntegerField(default=0)),
                ('picture1', models.FileField(blank=True, null=True, upload_to=backend.models.product_variety_image_path)),
                ('picture2', models.FileField(blank=True, null=True, upload_to=backend.models.product_variety_image_path)),
                ('picture3', models.FileField(blank=True, null=True, upload_to=backend.models.product_variety_image_path)),
                ('picture4', models.FileField(blank=True, null=True, upload_to=backend.models.product_variety_image_path)),
                ('color', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Color')),
                ('created_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile')),
                ('modified_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Product')),
                ('size', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Size')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.AddField(
            model_name='size',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='size',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='product',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='product',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Group'),
        ),
        migrations.AddField(
            model_name='product',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='group',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='group',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='color',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='color',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='collection',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='collection',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='category',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='category',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='catalog',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='catalog',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.CreateModel(
            name='CartItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_archived', models.BooleanField(blank=True, default=False)),
                ('is_published', models.BooleanField(blank=True, default=True)),
                ('created_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False)),
                ('modified_date', models.DateTimeField(blank=True, editable=False, null=True)),
                ('quantity', models.IntegerField(default=1)),
                ('line_total', models.IntegerField(default=1)),
                ('cart', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Cart')),
                ('created_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile')),
                ('modified_by', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile')),
                ('variety', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Variety')),
            ],
            options={
                'abstract': False,
                'ordering': ['-created_date'],
            },
        ),
        migrations.AddField(
            model_name='cart',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
        migrations.AddField(
            model_name='cart',
            name='modified_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='backend.UserProfile'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

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

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='StoredFile',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('filename',
                 models.CharField(blank=True, db_index=True, max_length=128)),
                ('metadata',
                 django.contrib.postgres.fields.jsonb.JSONField(blank=True,
                                                                null=True)),
                ('kind',
                 models.CharField(blank=True, default='', max_length=128)),
                ('mime_type',
                 models.CharField(blank=True, default='', max_length=128)),
                ('location',
                 django.contrib.gis.db.models.fields.PointField(blank=True,
                                                                null=True,
                                                                srid=4326)),
                ('size_bytes', models.IntegerField(db_index=True, default=0)),
                ('content',
                 models.FileField(db_index=True,
                                  max_length=1024,
                                  unique=True,
                                  upload_to=backend.models._get_upload_path)),
                ('content_sha',
                 models.CharField(blank=True,
                                  db_index=True,
                                  default='',
                                  editable=False,
                                  max_length=64)),
                ('start',
                 models.DateTimeField(blank=True,
                                      db_index=True,
                                      help_text='For Time-Series Files',
                                      null=True)),
                ('end',
                 models.DateTimeField(blank=True,
                                      db_index=True,
                                      help_text='For Time-Series Files',
                                      null=True)),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      help_text='DB Insertion Time')),
                ('modified',
                 models.DateTimeField(auto_now=True,
                                      help_text='DB Modification Time')),
                ('columns',
                 django.contrib.postgres.fields.jsonb.JSONField(blank=True,
                                                                null=True)),
                ('processor_metadata',
                 django.contrib.postgres.fields.jsonb.JSONField(blank=True,
                                                                null=True)),
                ('related_files',
                 models.ManyToManyField(
                     blank=True,
                     related_name='_storedfile_related_files_+',
                     to='backend.StoredFile')),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(db_index=True, max_length=64, unique=True)),
            ],
        ),
        migrations.AddField(
            model_name='storedfile',
            name='tags',
            field=models.ManyToManyField(blank=True, to='backend.Tag'),
        ),
        migrations.AddField(
            model_name='storedfile',
            name='user',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

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