# Generated by Django 4.1.1 on 2022-09-13 09:26

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import drf_fileupload.models


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='FileModel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to=drf_fileupload.models.get_upload_to, verbose_name='the file object')),
                ('size', models.IntegerField(editable=False, verbose_name='the filesize')),
                ('name', models.CharField(editable=False, max_length=50, verbose_name='the filename')),
                ('md5', models.CharField(db_index=True, editable=False, max_length=32, unique=True, verbose_name='the md5 of the file')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='the created time of the file')),
                ('mimetype', models.CharField(editable=False, max_length=20, verbose_name='the mime type of the file')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='the owner of the file')),
            ],
            options={
                'ordering': ('-id',),
            },
        ),
    ]
