ernestophone.ens.fr/instruments/migrations/0001_initial.py
2021-04-01 21:27:17 +02:00

56 lines
3.1 KiB
Python

# Generated by Django 2.2.17 on 2021-04-01 19:25
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.functions.text
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Instrument',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('model', models.CharField(blank=True, max_length=100, null=True, verbose_name='Modèle')),
('prix', models.CharField(blank=True, default='', max_length=100, verbose_name='Prix')),
('etat', models.CharField(choices=[('Bon état', 'Bon état'), ('Etat moyen', 'Etat moyen'), ('Mauvais état', 'Mauvais état')], default='Bon état', max_length=100)),
('marque', models.CharField(blank=True, max_length=100, null=True, verbose_name='Marque')),
('serial', models.CharField(blank=True, default=' ', max_length=100, null=True, verbose_name='Numéro de série')),
('annee', models.CharField(blank=True, max_length=100, null=True, verbose_name="Année d'achat")),
('owner', models.CharField(default='Fanfare', max_length=100, verbose_name='Propriétaire')),
('user', models.CharField(blank=True, max_length=100, verbose_name='Utilisateur')),
('type', models.CharField(max_length=40, verbose_name='Instrument')),
('statut', models.CharField(choices=[('Disponible', 'Disponible'), ('Prêté', 'Prêté')], default='Disponible', max_length=100)),
('infos', models.TextField(blank=True, default='', verbose_name='Infos utiles')),
('infos_en', models.TextField(blank=True, default='', verbose_name='Infos utiles en anglais')),
],
options={
'verbose_name': 'Instrument',
'verbose_name_plural': 'Instruments',
'ordering': (django.db.models.functions.text.Lower('type'),),
},
),
migrations.CreateModel(
name='Reparation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField(max_length=100, verbose_name='Date')),
('description', models.CharField(blank=True, default=' ', max_length=100, verbose_name='Description')),
('description_en', models.CharField(blank=True, default=' ', max_length=100, verbose_name='Description en anglais')),
('prix', models.CharField(blank=True, default='', max_length=100, verbose_name='Prix')),
('lieux', models.CharField(blank=True, default=' ', max_length=100, verbose_name='Lieux')),
('instru', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='instruments.Instrument', verbose_name='Instrument')),
],
options={
'verbose_name': 'Réparation',
'verbose_name_plural': 'Réparations',
'ordering': ('date',),
},
),
]