# Generated by Django 2.2.7 on 2019-11-14 07:30

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Categorias',
            fields=[
                ('idcategoria', models.IntegerField(db_column='idCategoria', primary_key=True, serialize=False)),
                ('nombrecategoria', models.CharField(db_column='nombreCategoria', max_length=15, unique=True)),
                ('descripcion', models.CharField(blank=True, db_column='Descripcion', max_length=255, null=True, unique=True)),
                ('imagen', models.CharField(blank=True, db_column='Imagen', max_length=45, null=True, unique=True)),
            ],
            options={
                'db_table': 'Categorias',
            },
        ),
        migrations.CreateModel(
            name='Clientes',
            fields=[
                ('idcliente', models.IntegerField(db_column='idCliente', primary_key=True, serialize=False)),
                ('nombrecontacto', models.CharField(db_column='NombreContacto', max_length=45)),
                ('direccion', models.CharField(db_column='Direccion', max_length=45)),
                ('ciudad', models.CharField(db_column='Ciudad', max_length=15)),
                ('localidad', models.CharField(db_column='Localidad', max_length=15)),
                ('codpostal', models.CharField(db_column='CodPostal', max_length=10)),
                ('pais', models.CharField(db_column='Pais', max_length=15)),
                ('telefono', models.CharField(db_column='Telefono', max_length=15, unique=True)),
                ('e_mail', models.CharField(db_column='e-mail', max_length=45, unique=True)),
                ('password', models.CharField(db_column='Password', max_length=15, unique=True)),
            ],
            options={
                'db_table': 'Clientes',
            },
        ),
        migrations.CreateModel(
            name='Companiasdeenvios',
            fields=[
                ('idcompañiasdeenvio', models.IntegerField(db_column='idCompañiasDeEnvio', primary_key=True, serialize=False)),
                ('nombrecompañia', models.CharField(db_column='NombreCompañia', max_length=20, unique=True)),
                ('telefono', models.CharField(db_column='Telefono', max_length=15, unique=True)),
                ('e_mail', models.CharField(db_column='e-mail', max_length=45, unique=True)),
            ],
            options={
                'db_table': 'CompañiasDeEnvios',
            },
        ),
        migrations.CreateModel(
            name='Pedidos',
            fields=[
                ('idpedido', models.IntegerField(db_column='idPedido', primary_key=True, serialize=False)),
                ('fechapedido', models.DateField(db_column='FechaPedido')),
                ('fechaentrega', models.DateField(blank=True, db_column='FechaEntrega', null=True)),
                ('fechaenvio', models.DateField(blank=True, db_column='FechaEnvio', null=True)),
                ('monto', models.FloatField(db_column='Monto')),
                ('destinatario', models.CharField(db_column='Destinatario', max_length=30)),
                ('direcciondestinatario', models.CharField(db_column='DireccionDestinatario', max_length=45)),
                ('ciudaddestinatario', models.CharField(db_column='CiudadDestinatario', max_length=15)),
                ('localidaddestinatario', models.CharField(db_column='LocalidadDestinatario', max_length=20)),
                ('codpostaldestinatario', models.CharField(db_column='CodPostalDestinatario', max_length=10)),
                ('paisdestinatario', models.CharField(db_column='PaisDestinatario', max_length=15)),
                ('estadopago', models.CharField(db_column='EstadoPago', max_length=9)),
                ('formapago', models.CharField(db_column='FormaPago', max_length=8)),
                ('idcliente', models.ForeignKey(db_column='idCliente', on_delete=django.db.models.deletion.PROTECT, to='tiendavirtual.Clientes')),
                ('idcompañiasdeenvio', models.ForeignKey(db_column='IdCompañiasDeEnvio', on_delete=django.db.models.deletion.PROTECT, to='tiendavirtual.Companiasdeenvios')),
            ],
            options={
                'db_table': 'Pedidos',
            },
        ),
        migrations.CreateModel(
            name='Proveedores',
            fields=[
                ('idproveedor', models.IntegerField(db_column='idProveedor', primary_key=True, serialize=False)),
                ('nombrecompañia', models.CharField(db_column='NombreCompañia', max_length=20, unique=True)),
                ('nombrecontacto', models.CharField(db_column='NombreContacto', max_length=45)),
                ('cargocontacto', models.CharField(db_column='CargoContacto', max_length=15)),
                ('direccion', models.CharField(db_column='Direccion', max_length=45)),
                ('ciudad', models.CharField(db_column='Ciudad', max_length=15)),
                ('localidad', models.CharField(db_column='Localidad', max_length=15)),
                ('codpostal', models.CharField(db_column='CodPostal', max_length=10)),
                ('pais', models.CharField(db_column='Pais', max_length=15)),
                ('telefono', models.CharField(db_column='Telefono', max_length=15, unique=True)),
                ('e_mail', models.CharField(db_column='e-mail', max_length=45, unique=True)),
                ('paginaprincipal', models.CharField(blank=True, db_column='PaginaPrincipal', max_length=30, null=True, unique=True)),
            ],
            options={
                'db_table': 'Proveedores',
            },
        ),
        migrations.CreateModel(
            name='Productos',
            fields=[
                ('idproducto', models.IntegerField(db_column='idProducto', primary_key=True, serialize=False)),
                ('nombreproducto', models.CharField(db_column='NombreProducto', max_length=45, unique=True)),
                ('cantidadporunidad', models.IntegerField(db_column='CantidadPorUnidad')),
                ('preciounidad', models.FloatField(db_column='PrecioUnidad')),
                ('unidadesenexistencia', models.IntegerField(db_column='UnidadesEnExistencia')),
                ('unidadesenpedido', models.IntegerField(db_column='UnidadesEnPedido')),
                ('demanda', models.CharField(db_column='Demanda', max_length=5)),
                ('suspendido', models.CharField(db_column='Suspendido', max_length=5)),
                ('imagen', models.CharField(db_column='Imagen', max_length=45, unique=True)),
                ('idcategoria', models.ForeignKey(db_column='idCategoria', on_delete=django.db.models.deletion.PROTECT, to='tiendavirtual.Categorias')),
                ('idproveedor', models.ForeignKey(db_column='IdProveedor', on_delete=django.db.models.deletion.PROTECT, to='tiendavirtual.Proveedores')),
            ],
            options={
                'db_table': 'Productos',
            },
        ),
        migrations.CreateModel(
            name='Detallesdepedidos',
            fields=[
                ('idpedido', models.ForeignKey(db_column='IdPedido', on_delete=django.db.models.deletion.PROTECT, primary_key=True, serialize=False, to='tiendavirtual.Pedidos')),
                ('preciounidad', models.FloatField(db_column='PrecioUnidad')),
                ('cantidad', models.IntegerField(db_column='Cantidad')),
                ('descuento', models.FloatField(blank=True, db_column='Descuento', null=True)),
                ('idproducto', models.ForeignKey(db_column='IdProducto', on_delete=django.db.models.deletion.PROTECT, to='tiendavirtual.Productos')),
            ],
            options={
                'db_table': 'DetallesDePedidos',
                'unique_together': {('idpedido', 'idproducto')},
            },
        ),
    ]
