Spaces:
Build error
Build error
Se modifican los modelos para elegir etiquetas de la escala
Browse filesFiles changed (8)
- tecnicas/migrations/0006_remove_dato_id_calificacion_remove_dato_id_palabra_and_more.pyAdded+90
- tecnicas/migrations/0007_alter_sesionsensorial_codigo_sesion_calificacion_and_more.pyAdded+83
- tecnicas/models/__init__.py+1
- tecnicas/models/calificacion.py+2-2
- tecnicas/models/escala.py-1
- tecnicas/models/etiquetas_escala.pyAdded+9
- tecnicas/models/orden.py+2-2
- tecnicas/models/producto.py+2-2
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990# Generated by Django 5.2.1 on 2025-07-20 16:18
import django.db.models.deletionimport shortuuid.mainfrom django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [ ('tecnicas', '0005_alter_esvocabulario_id_vocabulario_and_more'), ]
operations = [ migrations.RemoveField( model_name='dato', name='id_calificacion', ), migrations.RemoveField( model_name='dato', name='id_palabra', ), migrations.RemoveField( model_name='valorbooleano', name='id_dato', ), migrations.RemoveField( model_name='valordecimal', name='id_dato', ), migrations.RemoveField( model_name='orden', name='id_catador', ), migrations.RemoveField( model_name='orden', name='id_intensidad', ), migrations.RemoveField( model_name='posicion', name='id_orden', ), migrations.RemoveField( model_name='posicion', name='id_producto', ), migrations.RemoveField( model_name='producto', name='id_intensidad', ), migrations.RemoveField( model_name='escala', name='etiquetas', ), migrations.AlterField( model_name='sesionsensorial', name='codigo_sesion', field=models.CharField(default=shortuuid.main.ShortUUID.uuid, editable=False, max_length=22, primary_key=True, serialize=False), ), migrations.CreateModel( name='EtiquetasEscala', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('posicion', models.IntegerField()), ('id_escala', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='escalas_etiqutas_escala', to='tecnicas.escala')), ('id_etiqueta', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='etiqueta_etiquetas_escala', to='tecnicas.etiqueta')), ], ), migrations.DeleteModel( name='Calificacion', ), migrations.DeleteModel( name='ValorBooleano', ), migrations.DeleteModel( name='Dato', ), migrations.DeleteModel( name='ValorDecimal', ), migrations.DeleteModel( name='Orden', ), migrations.DeleteModel( name='Posicion', ), migrations.DeleteModel( name='Producto', ), ]1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283# Generated by Django 5.2.1 on 2025-07-20 16:19
import django.db.models.deletionimport shortuuid.mainfrom django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [ ('tecnicas', '0006_remove_dato_id_calificacion_remove_dato_id_palabra_and_more'), ]
operations = [ migrations.AlterField( model_name='sesionsensorial', name='codigo_sesion', field=models.CharField(default=shortuuid.main.ShortUUID.uuid, editable=False, max_length=22, primary_key=True, serialize=False), ), migrations.CreateModel( name='Calificacion', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('num_repeticion', models.IntegerField()), ('id_catador', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='calificacion_catador', to='tecnicas.catador')), ('id_tecnica', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='calificacion_tecnica', to='tecnicas.tecnica')), ], ), migrations.CreateModel( name='Dato', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id_calificacion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dato_calificacion', to='tecnicas.calificacion')), ('id_palabra', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dato_palabra', to='tecnicas.palabra')), ], ), migrations.CreateModel( name='Orden', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id_catador', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='orden_catador', to='tecnicas.catador')), ('id_tecnica', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='orden_tecnica', to='tecnicas.tecnica')), ], ), migrations.CreateModel( name='Producto', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('codigoProducto', models.CharField(max_length=3)), ('id_tecnica', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='producto_tecnica', to='tecnicas.tecnica')), ], ), migrations.CreateModel( name='Posicion', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('posicion', models.IntegerField()), ('id_orden', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posicion_orden', to='tecnicas.orden')), ('id_producto', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posicion_producto', to='tecnicas.producto')), ], ), migrations.AddField( model_name='calificacion', name='id_producto', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='calificacion_producto', to='tecnicas.producto'), ), migrations.CreateModel( name='ValorBooleano', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('valor', models.BooleanField()), ('id_dato', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='dato_boolean', to='tecnicas.dato')), ], ), migrations.CreateModel( name='ValorDecimal', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('valor', models.FloatField()), ('id_dato', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='dato_decimal', to='tecnicas.dato')), ], ), ]15 unmodified lines16171819202115 unmodified linesfrom .sesion_sensorial import SesionSensorialfrom .escala import Escalafrom .tecnica_intensidad import TecnicaIntensidadfrom .producto import Producto15 unmodified lines1617181920212215 unmodified linesfrom .sesion_sensorial import SesionSensorialfrom .escala import Escalafrom .etiquetas_escala import EtiquetasEscalafrom .tecnica_intensidad import TecnicaIntensidadfrom .producto import Producto
1234567891011from django.db import modelsfrom .producto import Productofrom .tecnica_intensidad import TecnicaIntensidadfrom .catador import Catadorclass Calificacion(models.Model):num_repeticion = models.IntegerField()id_producto = models.ForeignKey(Producto, on_delete=models.CASCADE, related_name="calificacion_producto")id_intensidad = models.ForeignKey(TecnicaIntensidad, on_delete=models.CASCADE, related_name="calificacion_tec_intensidad")id_catador = models.ForeignKey(Catador, on_delete=models.CASCADE, related_name="calificacion_catador")1234567891011from django.db import modelsfrom .producto import Productofrom .tecnica import Tecnicafrom .catador import Catadorclass Calificacion(models.Model):num_repeticion = models.IntegerField()id_producto = models.ForeignKey(Producto, on_delete=models.CASCADE, related_name="calificacion_producto")id_tecnica = models.ForeignKey(Tecnica, on_delete=models.CASCADE, related_name="calificacion_tecnica")id_catador = models.ForeignKey(Catador, on_delete=models.CASCADE, related_name="calificacion_catador")
5 unmodified lines67891011125 unmodified linesclass Escala(models.Model):id_tipo_escala = models.ForeignKey(TipoEscala, on_delete=models.CASCADE, related_name="escala_tipo_escala")longitud = models.IntegerField()etiquetas = models.ManyToManyField(Etiqueta)def __str__(self):return self.longitud5 unmodified lines678910115 unmodified linesclass Escala(models.Model):id_tipo_escala = models.ForeignKey(TipoEscala, on_delete=models.CASCADE, related_name="escala_tipo_escala")longitud = models.IntegerField()def __str__(self):return self.longitud
123456789from django.db import models
from .escala import Escalafrom .etiqueta import Etiqueta
class EtiquetasEscala(models.Model): id_escala = models.ForeignKey(Escala, on_delete=models.CASCADE, related_name="escalas_etiqutas_escala") id_etiqueta = models.ForeignKey(Etiqueta, on_delete=models.CASCADE, related_name="etiqueta_etiquetas_escala") posicion = models.IntegerField()1234567891011from django.db import modelsfrom .tecnica_intensidad import TecnicaIntensidadfrom .catador import Catadorfrom .producto import Productoclass Orden(models.Model):id_intensidad = models.ForeignKey(TecnicaIntensidad, on_delete=models.CASCADE, related_name="orden_tecnica_intensidad")id_catador = models.ForeignKey(Catador, on_delete=models.CASCADE, related_name="orden_catador")class Posicion(models.Model):1234567891011from django.db import modelsfrom .tecnica import Tecnicafrom .catador import Catadorfrom .producto import Productoclass Orden(models.Model):id_tecnica = models.ForeignKey(Tecnica, on_delete=models.CASCADE, related_name="orden_tecnica")id_catador = models.ForeignKey(Catador, on_delete=models.CASCADE, related_name="orden_catador")class Posicion(models.Model):
12345678910from django.db import modelsfrom .tecnica_intensidad import TecnicaIntensidadclass Producto(models.Model):codigoProducto = models.CharField(max_length=3)id_intensidad = models.ForeignKey(TecnicaIntensidad, on_delete=models.CASCADE, related_name="producto_tecnica_intensidad")def __str__(self):return self.codigoProducto12345678910from django.db import modelsfrom .tecnica import Tecnicaclass Producto(models.Model):codigoProducto = models.CharField(max_length=3)id_tecnica = models.ForeignKey(Tecnica, on_delete=models.CASCADE, related_name="producto_tecnica")def __str__(self):return self.codigoProducto
tecnicas/migrations/0006_remove_dato_id_calificacion_remove_dato_id_palabra_and_more.pyAdded+90
tecnicas/migrations/0007_alter_sesionsensorial_codigo_sesion_calificacion_and_more.pyAdded+83
tecnicas/models/__init__.py+1
tecnicas/models/calificacion.py+2-2
tecnicas/models/escala.py-1
tecnicas/models/etiquetas_escala.pyAdded+9
tecnicas/models/orden.py+2-2
tecnicas/models/producto.py+2-2