# Generated by Django 2.0 on 2018-03-02 08:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Report',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, null=True, upload_to='static/report')),
                ('description', models.CharField(blank=True, max_length=200)),
                ('time', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_status', models.IntegerField(blank=True, choices=[(0, '未被接取'), (1, '已被接取'), (2, '已完成')], default=0)),
                ('task_title', models.CharField(max_length=20)),
                ('image', models.ImageField(blank=True, null=True, upload_to='static/img')),
                ('description', models.CharField(blank=True, max_length=200)),
                ('tag', models.CharField(max_length=10, null=True)),
                ('time', models.DateTimeField(auto_now=True)),
                ('price', models.CharField(max_length=10, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=20)),
                ('password', models.CharField(max_length=20)),
                ('phone', models.CharField(blank=True, max_length=20, null=True)),
                ('credit', models.IntegerField(blank=True, default=0, null=True)),
                ('head_img', models.ImageField(blank=True, upload_to='static/head_img')),
            ],
        ),
        migrations.AddField(
            model_name='task',
            name='like',
            field=models.ManyToManyField(related_name='like_user', to='myapp.User'),
        ),
        migrations.AddField(
            model_name='task',
            name='publisher',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='myapp.User'),
        ),
        migrations.AddField(
            model_name='task',
            name='taker',
            field=models.ManyToManyField(related_name='take_user', to='myapp.User'),
        ),
        migrations.AddField(
            model_name='report',
            name='reporter',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='myapp.User'),
        ),
        migrations.AddField(
            model_name='report',
            name='task',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='myapp.Task'),
        ),
    ]
