# Generated by Django 2.1.7 on 2019-04-27 18:43

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import filer.fields.image


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='AddProfitData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField(db_index=True, verbose_name='數量')),
                ('value', models.DecimalField(db_index=True, decimal_places=2, max_digits=3, verbose_name='利率')),
            ],
        ),
        migrations.CreateModel(
            name='CategoryLevelOne',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10, verbose_name='分類')),
                ('title', models.CharField(max_length=10, verbose_name='中文名稱')),
                ('description', models.TextField()),
            ],
            options={
                'verbose_name_plural': '建立第一層分類名稱',
            },
        ),
        migrations.CreateModel(
            name='CategoryLevelThree',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10, verbose_name='分類')),
                ('title', models.CharField(max_length=10, verbose_name='中文名稱')),
                ('description', models.TextField()),
            ],
            options={
                'verbose_name_plural': '建立第三層分類名稱',
            },
        ),
        migrations.CreateModel(
            name='CategoryLevelTwo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10, verbose_name='分類')),
                ('title', models.CharField(max_length=10, verbose_name='中文名稱')),
                ('description', models.TextField()),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mysite.CategoryLevelOne')),
                ('image', filer.fields.image.FilerImageField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='product_image', to=settings.FILER_IMAGE_MODEL, verbose_name='圖片')),
            ],
            options={
                'verbose_name_plural': '建立第二層分類名稱',
            },
        ),
        migrations.CreateModel(
            name='Diary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('budget', models.FloatField(default=0)),
                ('weight', models.FloatField(default=0)),
                ('note', models.TextField()),
                ('ddate', models.DateField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Maker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10)),
                ('country', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='MaterialLevelOne',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10, verbose_name='分類')),
                ('title', models.CharField(max_length=10, verbose_name='中文名稱')),
                ('description', models.TextField(blank=True, verbose_name='商品說明')),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='建檔日期')),
                ('last_modify_date', models.DateTimeField(auto_now=True, null=True, verbose_name='資料更新日期')),
                ('image', filer.fields.image.FilerImageField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='material_one_image', to=settings.FILER_IMAGE_MODEL, verbose_name='圖片')),
            ],
            options={
                'verbose_name_plural': '建立原料第一層分類名稱',
            },
        ),
        migrations.CreateModel(
            name='MaterialLevelThree',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='原料名稱')),
                ('title', models.CharField(blank=True, max_length=50, verbose_name='輔助說明')),
                ('description', models.TextField(blank=True, verbose_name='商品說明')),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='建檔日期')),
                ('last_modify_date', models.DateTimeField(auto_now=True, null=True, verbose_name='資料更新日期')),
            ],
            options={
                'verbose_name_plural': '建立原料第三層分類名稱',
            },
        ),
        migrations.CreateModel(
            name='MaterialLevelTwo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10, verbose_name='分類')),
                ('title', models.CharField(max_length=10, verbose_name='中文名稱')),
                ('description', models.TextField(blank=True, verbose_name='商品說明')),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='建檔日期')),
                ('last_modify_date', models.DateTimeField(auto_now=True, null=True, verbose_name='資料更新日期')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mysite.MaterialLevelOne')),
                ('image', filer.fields.image.FilerImageField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='material_two_image', to=settings.FILER_IMAGE_MODEL, verbose_name='圖片')),
            ],
            options={
                'verbose_name_plural': '建立原料第二層分類名稱',
            },
        ),
        migrations.CreateModel(
            name='Mood',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Music',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('song', models.TextField()),
                ('singer', models.TextField()),
                ('last_modify_date', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'db_table': 'music',
            },
        ),
        migrations.CreateModel(
            name='MyoSupplier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True, verbose_name='廠商名稱')),
                ('company_tax_id', models.CharField(blank=True, max_length=20, verbose_name='統一編號')),
                ('tel', models.CharField(blank=True, max_length=20, verbose_name='公司電話')),
                ('fax', models.CharField(blank=True, max_length=20, verbose_name='公司傳真')),
                ('postal', models.CharField(blank=True, max_length=20, verbose_name='3+2郵遞區號')),
                ('address', models.CharField(blank=True, max_length=50, verbose_name='公司地址')),
                ('tax_address', models.CharField(blank=True, max_length=50, verbose_name='發票地址')),
                ('email', models.EmailField(blank=True, max_length=70, verbose_name='EMAIL')),
                ('website', models.URLField(blank=True, max_length=250, verbose_name='廠商網頁')),
                ('contact_sales', models.CharField(blank=True, max_length=20, verbose_name='聯絡人')),
                ('contact_sales_phone', models.CharField(blank=True, max_length=20, verbose_name='聯絡人電話')),
                ('contact_sales_mob', models.CharField(blank=True, max_length=20, verbose_name='聯絡人手機')),
                ('payment', models.CharField(choices=[('0', '現金'), ('30', '月結30天'), ('45', '月結45天')], default='0', max_length=2, verbose_name='票期')),
                ('bank', models.CharField(blank=True, max_length=20, verbose_name='銀行')),
                ('transit_number', models.CharField(blank=True, max_length=20, verbose_name='銀行代碼')),
                ('branch_name', models.CharField(blank=True, max_length=20, verbose_name='分行名稱')),
                ('branch_id', models.CharField(blank=True, max_length=20, verbose_name='分行代碼')),
                ('bank_account', models.CharField(blank=True, max_length=20, verbose_name='匯款帳號')),
                ('account_name', models.CharField(blank=True, max_length=20, verbose_name='戶名')),
                ('account_contact_name', models.CharField(blank=True, max_length=20, verbose_name='帳戶聯絡人')),
                ('account_contact_tel', models.CharField(blank=True, max_length=20, verbose_name='帳戶聯絡人電話')),
                ('account_contact_email', models.CharField(blank=True, max_length=20, verbose_name='帳戶郵件')),
                ('description', models.TextField(blank=True, verbose_name='備註')),
                ('create_time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='建檔日期')),
                ('last_modify_date', models.DateTimeField(auto_now=True, null=True, verbose_name='資料更新日期')),
            ],
            options={
                'verbose_name_plural': '供應商資料',
            },
        ),
        migrations.CreateModel(
            name='PModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('url', models.URLField(default='https://i.imgur.com/CQtJpDU.png')),
                ('maker', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mysite.Maker')),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nickname', models.CharField(default='不願意透漏身分的人', max_length=10, verbose_name='暱稱')),
                ('message', models.TextField(verbose_name='訊息')),
                ('del_pass', models.CharField(help_text='要記住密碼', max_length=10)),
                ('pub_time', models.DateTimeField(auto_now=True, verbose_name='發文時間')),
                ('enabled', models.BooleanField(default=False, verbose_name='審-核')),
                ('mood', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mysite.Mood')),
            ],
        ),
        migrations.CreateModel(
            name='PPhoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(default='產品照片', max_length=20)),
                ('url', models.URLField(default='https://i.imgur.com/CQtJpDU.png')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nickname', models.CharField(default='超值二手機', max_length=15, verbose_name='摘要')),
                ('description', models.TextField(default='暫無說明')),
                ('year', models.PositiveIntegerField(default=2016, verbose_name='出廠年份')),
                ('price', models.PositiveIntegerField(default=0, verbose_name='價格')),
                ('pmodel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mysite.PModel', verbose_name='型號')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('height', models.PositiveIntegerField(default=160)),
                ('male', models.BooleanField(default=False)),
                ('website', models.URLField(null=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.IntegerField(db_index=True, verbose_name='數量')),
                ('value', models.DecimalField(db_index=True, decimal_places=2, max_digits=3, verbose_name='利率')),
                ('container', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mysite.CategoryLevelTwo', verbose_name='商品類別')),
            ],
            options={
                'verbose_name_plural': '利潤分配表',
                'db_table': 'profit',
            },
        ),
        migrations.CreateModel(
            name='User2',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('email', models.EmailField(max_length=254)),
                ('password', models.CharField(max_length=20)),
                ('enabled', models.BooleanField(default=False)),
            ],
        ),
        migrations.AddField(
            model_name='pphoto',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mysite.Product'),
        ),
        migrations.AlterUniqueTogether(
            name='myosupplier',
            unique_together={('company_tax_id',)},
        ),
        migrations.AddField(
            model_name='materiallevelthree',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mysite.MaterialLevelTwo'),
        ),
        migrations.AddField(
            model_name='materiallevelthree',
            name='image',
            field=filer.fields.image.FilerImageField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='material_three_image', to=settings.FILER_IMAGE_MODEL, verbose_name='圖片'),
        ),
        migrations.AddField(
            model_name='materiallevelthree',
            name='myo_supplier',
            field=models.ManyToManyField(db_index=True, to='mysite.MyoSupplier', verbose_name='供應商'),
        ),
        migrations.AddField(
            model_name='categorylevelthree',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mysite.CategoryLevelTwo'),
        ),
        migrations.AlterUniqueTogether(
            name='categorylevelone',
            unique_together={('name',)},
        ),
        migrations.AddField(
            model_name='addprofitdata',
            name='container',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mysite.CategoryLevelTwo', verbose_name='商品類別'),
        ),
        migrations.AlterUniqueTogether(
            name='profit',
            unique_together={('key', 'container')},
        ),
        migrations.AlterUniqueTogether(
            name='materialleveltwo',
            unique_together={('name',)},
        ),
        migrations.AlterUniqueTogether(
            name='materiallevelthree',
            unique_together={('name',)},
        ),
        migrations.AlterUniqueTogether(
            name='materiallevelone',
            unique_together={('name',)},
        ),
        migrations.AlterUniqueTogether(
            name='categoryleveltwo',
            unique_together={('name',)},
        ),
        migrations.AlterUniqueTogether(
            name='categorylevelthree',
            unique_together={('name',)},
        ),
        migrations.AlterUniqueTogether(
            name='addprofitdata',
            unique_together={('quantity',)},
        ),
    ]
