65 lines
2.9 KiB
Python
65 lines
2.9 KiB
Python
# Generated by Django 5.2.3 on 2025-07-01 14:49
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Articulo',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('articulo', models.TextField()),
|
|
('descripcion', models.TextField(null=True, verbose_name='Descripcion')),
|
|
('fecha', models.DateField(auto_now_add=True)),
|
|
('cantidad', models.IntegerField(default=0)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='ArticuloUnidad',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('movimiento', models.CharField(max_length=200)),
|
|
('descripcion', models.TextField(null=True, verbose_name='Descripcion')),
|
|
('fecha_salida', models.DateField(auto_now_add=True)),
|
|
('cantidad', models.IntegerField(default=0)),
|
|
('articulo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='serving.articulo')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Unidad',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('nombreUnidad', models.CharField(max_length=200, verbose_name='Nombre de la Unidad')),
|
|
('comandante', models.CharField(max_length=200, verbose_name='Comandante')),
|
|
('ubicacion', models.TextField(null=True)),
|
|
('telefono', models.CharField(max_length=200, verbose_name='telefono')),
|
|
('articulos', models.ManyToManyField(through='serving.ArticuloUnidad', to='serving.articulo')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='PruebaUnidad',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('movimiento', models.CharField(max_length=200)),
|
|
('descripcion', models.TextField(null=True, verbose_name='Descripcion')),
|
|
('fecha_salida', models.DateField(auto_now_add=True)),
|
|
('cantidad', models.IntegerField(default=0)),
|
|
('articulo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='serving.articulo')),
|
|
('unidad', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='serving.unidad')),
|
|
],
|
|
),
|
|
migrations.AddField(
|
|
model_name='articulounidad',
|
|
name='unidad',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='serving.unidad'),
|
|
),
|
|
]
|