2024-07-05 09:57:44 +00:00
|
|
|
# Generated by Django 2.2.28 on 2024-07-05 08:57
|
2024-05-17 18:46:38 +00:00
|
|
|
|
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
import django.utils.timezone
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
2024-07-03 17:20:01 +00:00
|
|
|
('contenttypes', '0002_remove_content_type_name'),
|
2024-07-05 09:57:44 +00:00
|
|
|
('member', '0011_profile_vss_charter_read'),
|
2024-05-17 18:46:38 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2024-07-03 17:20:01 +00:00
|
|
|
name='Allergen',
|
2024-05-17 18:46:38 +00:00
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2024-07-05 09:57:44 +00:00
|
|
|
('name', models.CharField(max_length=255, verbose_name='name')),
|
2024-05-17 18:46:38 +00:00
|
|
|
],
|
|
|
|
options={
|
2024-07-03 17:20:01 +00:00
|
|
|
'verbose_name': 'Allergen',
|
|
|
|
'verbose_name_plural': 'Allergens',
|
2024-05-17 18:46:38 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2024-07-03 17:20:01 +00:00
|
|
|
name='Food',
|
2024-05-17 18:46:38 +00:00
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('name', models.CharField(max_length=255, verbose_name='name')),
|
|
|
|
('expiry_date', models.DateTimeField(verbose_name='expiry date')),
|
|
|
|
('was_eaten', models.BooleanField(default=False, verbose_name='was eaten')),
|
2024-07-05 09:57:44 +00:00
|
|
|
('is_ready', models.BooleanField(default=False, verbose_name='is ready')),
|
2024-07-03 17:20:01 +00:00
|
|
|
('allergens', models.ManyToManyField(blank=True, to='food.Allergen', verbose_name='allergen')),
|
2024-05-17 18:46:38 +00:00
|
|
|
('owner', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='member.Club', verbose_name='owner')),
|
2024-07-03 17:20:01 +00:00
|
|
|
('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_food.food_set+', to='contenttypes.ContentType')),
|
2024-05-17 18:46:38 +00:00
|
|
|
],
|
|
|
|
options={
|
2024-07-03 17:20:01 +00:00
|
|
|
'verbose_name': 'foods',
|
2024-05-17 18:46:38 +00:00
|
|
|
},
|
|
|
|
),
|
2024-05-21 12:07:35 +00:00
|
|
|
migrations.CreateModel(
|
2024-07-03 17:20:01 +00:00
|
|
|
name='BasicFood',
|
2024-05-21 12:07:35 +00:00
|
|
|
fields=[
|
2024-07-03 17:20:01 +00:00
|
|
|
('food_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='food.Food')),
|
|
|
|
('date_type', models.CharField(choices=[('DLC', 'DLC'), ('DDM', 'DDM')], max_length=255)),
|
2024-07-05 09:57:44 +00:00
|
|
|
('arrival_date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='arrival date')),
|
2024-05-21 12:07:35 +00:00
|
|
|
],
|
|
|
|
options={
|
2024-07-03 17:20:01 +00:00
|
|
|
'verbose_name': 'Basic food',
|
|
|
|
'verbose_name_plural': 'Basic foods',
|
2024-05-21 12:07:35 +00:00
|
|
|
},
|
2024-07-03 17:20:01 +00:00
|
|
|
bases=('food.food',),
|
2024-05-21 12:07:35 +00:00
|
|
|
),
|
2024-07-05 09:57:44 +00:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='QRCode',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('qr_code_number', models.PositiveIntegerField(unique=True, verbose_name='QR-code number')),
|
|
|
|
('food_container', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='QR_code', to='food.Food', verbose_name='food container')),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'verbose_name': 'QR-code',
|
|
|
|
'verbose_name_plural': 'QR-codes',
|
|
|
|
},
|
|
|
|
),
|
2024-05-21 12:07:35 +00:00
|
|
|
migrations.CreateModel(
|
2024-07-03 17:20:01 +00:00
|
|
|
name='TransformedFood',
|
2024-05-21 12:07:35 +00:00
|
|
|
fields=[
|
2024-07-03 17:20:01 +00:00
|
|
|
('food_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='food.Food')),
|
|
|
|
('creation_date', models.DateTimeField(verbose_name='creation date')),
|
|
|
|
('is_active', models.BooleanField(default=True, verbose_name='is active')),
|
|
|
|
('ingredient', models.ManyToManyField(blank=True, related_name='transformed_ingredient_inv', to='food.Food', verbose_name='transformed ingredient')),
|
2024-05-21 12:07:35 +00:00
|
|
|
],
|
|
|
|
options={
|
2024-07-03 17:20:01 +00:00
|
|
|
'verbose_name': 'Transformed food',
|
|
|
|
'verbose_name_plural': 'Transformed foods',
|
2024-05-21 12:07:35 +00:00
|
|
|
},
|
2024-07-03 17:20:01 +00:00
|
|
|
bases=('food.food',),
|
2024-05-17 18:46:38 +00:00
|
|
|
),
|
|
|
|
]
|