# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-24 22:52
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('accounts', '0003_auto_20170119_1119'),
        ('address', '0003_auto_20170125_0237'),
    ]

    operations = [
        migrations.CreateModel(
            name='CardClaim',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('is_sent', models.BooleanField(default=False)),
                ('is_received', models.BooleanField(default=False)),
                ('claimer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.MyProfile')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('post_title', models.CharField(max_length=200, verbose_name='发片令标题')),
                ('post_description', models.TextField(verbose_name='描述')),
                ('post_quantity', models.PositiveIntegerField(verbose_name='发片数量')),
                ('card_left', models.IntegerField(default=0, verbose_name='待领取')),
                ('post_picture', models.ImageField(blank=True, null=True, upload_to=posts.models.post_directory_path, verbose_name='上传一张图片')),
                ('post_city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='city', to='address.District', verbose_name='寄片的城市')),
                ('post_country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='address.Country', verbose_name='寄片的国家与地区')),
                ('post_district', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='district', to='address.District', verbose_name='寄片的区县')),
                ('post_province', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='province', to='address.District', verbose_name='寄片的省')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.MyProfile')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='cardclaim',
            name='post',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='posts.Post'),
        ),
    ]
