# Generated by Django 3.1.7 on 2021-04-02 12:59

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='MyFiles',
            fields=[
                ('fid', models.AutoField(primary_key=True, serialize=False)),
                ('fname', models.CharField(default='', max_length=64)),
                ('furlName', models.CharField(max_length=64)),
                ('furl', models.FileField(upload_to='files')),
                ('fmd5', models.CharField(max_length=64)),
                ('level', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='MyPictures',
            fields=[
                ('pid', models.AutoField(primary_key=True, serialize=False)),
                ('pname', models.CharField(max_length=64)),
                ('purlName', models.CharField(max_length=64)),
                ('purl', models.ImageField(upload_to='imgs')),
                ('pmd5', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Users',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=64, unique=True)),
                ('password', models.CharField(max_length=64)),
                ('email', models.EmailField(blank=True, max_length=254)),
                ('avatarName', models.CharField(max_length=64)),
                ('avatarUrl', models.ImageField(blank=True, null=True, upload_to='avatars')),
                ('intro', models.CharField(max_length=10)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Practice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day', models.DateField(auto_now_add=True)),
                ('beginTime', models.TimeField(null=True)),
                ('endTime', models.TimeField(null=True)),
                ('intervar', models.IntegerField()),
                ('accuracy', models.IntegerField()),
                ('melody', models.IntegerField()),
                ('rhythm', models.IntegerField()),
                ('emotion', models.IntegerField()),
                ('total_score', models.IntegerField()),
                ('last_time', models.DateTimeField(auto_now_add=True)),
                ('fid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='upload_pic.myfiles')),
                ('uid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='upload_pic.users')),
            ],
        ),
        migrations.CreateModel(
            name='Favorite',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_time', models.DateTimeField(auto_now=True)),
                ('fid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='upload_pic.myfiles')),
                ('uid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='upload_pic.users')),
            ],
        ),
        migrations.CreateModel(
            name='Score',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('accuracy', models.IntegerField()),
                ('total_score', models.IntegerField()),
                ('melody', models.IntegerField()),
                ('rhythm', models.IntegerField()),
                ('emotion', models.IntegerField()),
                ('last_time', models.DateTimeField(auto_now=True)),
                ('fid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='upload_pic.myfiles')),
                ('uid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='upload_pic.users')),
            ],
            options={
                'unique_together': {('uid', 'fid')},
            },
        ),
    ]
