Adde Aircraft class and associate students with aircrafts
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# Generated by Django 5.2.8 on 2025-11-27 13:34
|
||||
|
||||
import colorfield.fields
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('flightslot', '0021_alter_hourbuildinglegstop_refuel'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Aircraft',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('type', models.CharField(choices=[('C152', 'Cessna 152'), ('P208', 'Tecnam P2008'), ('PA28', 'Piper PA28R'), ('PA34', 'Piper PA34'), ('C182', 'Cessna 182Q'), ('TWEN', 'Tecnam P2010'), ('FSTD', 'Alsim ALX40')], max_length=4)),
|
||||
('markings', models.CharField(max_length=6)),
|
||||
('complex', models.BooleanField(default=False)),
|
||||
('avail_hours', models.DurationField(null=True, verbose_name='Time until maintenance')),
|
||||
],
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='course',
|
||||
name='color',
|
||||
field=colorfield.fields.ColorField(default='#FFFFFF', image_field=None, max_length=25, samples=[('#bfbfbf', 'GREY'), ('#ff0000', 'RED'), ('#ffc000', 'ORANGE'), ('#ffff00', 'YELLOW'), ('#92d050', 'GREEN'), ('#00b0f0', 'CYAN'), ('#b1a0c7', 'MAGENTA'), ('#fabcfb', 'PINK'), ('#f27ae4', 'VIOLET')], verbose_name='Binder Color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='hourbuilding',
|
||||
name='aircraft',
|
||||
field=models.CharField(choices=[('C152', 'Cessna 152'), ('P208', 'Tecnam P2008'), ('PA28', 'Piper PA28R'), ('PA34', 'Piper PA34'), ('C182', 'Cessna 182Q'), ('TWEN', 'Tecnam P2010'), ('FSTD', 'Alsim ALX40')]),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='student',
|
||||
name='aircrafts',
|
||||
field=models.ManyToManyField(to='flightslot.aircraft'),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user