# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-14 20:07
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Bahan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nama_bahan', models.CharField(max_length=200, null=True)),
                ('stock', models.IntegerField(null=True)),
                ('harga_satuan', models.IntegerField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Barang',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nm_barang', models.CharField(max_length=200, null=True)),
                ('harga_satuan', models.IntegerField(null=True)),
                ('stock', models.IntegerField(null=True)),
                ('berat', models.CharField(max_length=200, null=True)),
                ('warna', models.CharField(max_length=200, null=True)),
                ('ket_tambahan', models.CharField(max_length=200, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Companyprofile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('description', models.CharField(max_length=2000)),
                ('about_title', models.CharField(max_length=200)),
                ('about_post', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nama', models.CharField(max_length=200, null=True)),
                ('umail', models.CharField(max_length=200, null=True)),
                ('web', models.CharField(max_length=200, null=True)),
                ('pesan', models.CharField(max_length=200, null=True)),
                ('subject', models.CharField(max_length=200, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Contact_reply',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject', models.CharField(max_length=200, null=True)),
                ('pesan', models.TextField(null=True)),
                ('contact', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Contact')),
            ],
        ),
        migrations.CreateModel(
            name='Distributor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nama', models.CharField(max_length=200, null=True)),
                ('pswd', models.CharField(max_length=200, null=True)),
                ('umail', models.CharField(default=b'', max_length=200, null=True)),
                ('alamat', models.CharField(max_length=200, null=True)),
                ('tgl_lahir', models.CharField(max_length=200, null=True)),
                ('jenis_kelamin', models.CharField(max_length=1, null=True)),
                ('telp', models.CharField(max_length=200, null=True)),
                ('foto', models.CharField(max_length=200, null=True)),
                ('joined_time', models.CharField(max_length=20, null=True)),
                ('j_transaksi', models.IntegerField(null=True)),
                ('status', models.CharField(max_length=20, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Fakthur',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_waktu', models.CharField(max_length=200)),
                ('id_dist', models.ForeignKey(null=True, on_delete=backend.models.Keranjang, to='backend.Distributor')),
            ],
        ),
        migrations.CreateModel(
            name='Keranjang',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_distributor', models.IntegerField(null=True)),
                ('waktu_belanja', models.CharField(max_length=200, null=True)),
                ('jumlah', models.IntegerField(null=True)),
                ('status', models.CharField(max_length=200, null=True)),
                ('id_barang', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Barang')),
            ],
        ),
        migrations.CreateModel(
            name='Pembelian',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('jumlah', models.IntegerField(null=True)),
                ('t_harga', models.IntegerField(null=True)),
                ('waktu_permintaan', models.CharField(max_length=300, null=True)),
                ('status', models.IntegerField(null=True)),
                ('bahan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Bahan')),
            ],
        ),
        migrations.CreateModel(
            name='Sale',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('charge_id', models.CharField(max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='Session_distributor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_time', models.CharField(max_length=20)),
                ('url', models.CharField(max_length=200)),
                ('last_activity', models.CharField(max_length=50, null=True)),
                ('distributor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Distributor')),
            ],
        ),
        migrations.CreateModel(
            name='Session_user',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_time', models.CharField(max_length=200)),
                ('url', models.CharField(max_length=200, null=True)),
                ('lock', models.IntegerField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Settings',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('setting', models.CharField(max_length=200, null=True)),
                ('config', models.CharField(max_length=200, null=True)),
                ('info', models.CharField(max_length=300, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Suplier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nama', models.CharField(max_length=300, null=True)),
                ('email', models.CharField(max_length=300, null=True)),
                ('alamat', models.CharField(max_length=300, null=True)),
                ('telp', models.IntegerField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Transaksi',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('waktu_transaksi', models.CharField(max_length=200, null=True)),
                ('nm_barang', models.CharField(max_length=200, null=True)),
                ('harga', models.IntegerField(null=True)),
                ('jumlah_barang', models.IntegerField(null=True)),
                ('total_pembayaran', models.IntegerField(null=True)),
                ('status', models.IntegerField(null=True)),
                ('id_dist', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Distributor')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=50, null=True)),
                ('pswd', models.CharField(max_length=50, null=True)),
                ('umail', models.CharField(max_length=200, null=True)),
                ('nama_lengkap', models.CharField(max_length=200, null=True)),
                ('jabatan', models.CharField(max_length=200, null=True)),
            ],
        ),
        migrations.AddField(
            model_name='session_user',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.User'),
        ),
        migrations.AddField(
            model_name='pembelian',
            name='sup',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Suplier'),
        ),
        migrations.AddField(
            model_name='contact_reply',
            name='customer',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Distributor'),
        ),
        migrations.AddField(
            model_name='contact',
            name='distributor',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='backend.Distributor'),
        ),
    ]
