poulpe/equipment/migrations/0001_initial.py

96 lines
4.3 KiB
Python
Raw Normal View History

2017-02-21 21:16:50 +01:00
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-21 20:14
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('event', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='AbstractEquipment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200, verbose_name='Nom du matériel')),
('stock', models.PositiveSmallIntegerField(verbose_name='Quantité disponible')),
('description', models.TextField(verbose_name='Description')),
],
options={
'verbose_name': 'matériel abstrait',
'verbose_name_plural': 'matériels abstraits',
},
),
migrations.CreateModel(
name='EquipmentAttribution',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('amount', models.PositiveSmallIntegerField(verbose_name='Quantité attribuée')),
('remarks', models.TextField(verbose_name="Remarques concernant l'attribution")),
('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='event.Activity')),
],
options={
'verbose_name': 'attribution de matériel',
'verbose_name_plural': 'attributions de matériel',
},
),
migrations.CreateModel(
name='EquipmentRemark',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('remark', models.TextField(verbose_name='Remarque sur le matériel')),
('is_broken', models.BooleanField()),
('is_lost', models.BooleanField()),
],
options={
'verbose_name': 'remarque sur matériel',
'verbose_name_plural': 'remarques sur le matériel',
},
),
migrations.CreateModel(
name='Equipment',
fields=[
('abstractequipment_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='equipment.AbstractEquipment')),
],
options={
'verbose_name': 'matériel permanent',
'verbose_name_plural': 'matériels permanents',
},
bases=('equipment.abstractequipment',),
),
migrations.CreateModel(
name='TemporaryEquipment',
fields=[
('abstractequipment_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='equipment.AbstractEquipment')),
('event', models.ForeignKey(help_text='Évènement pour lequel le matériel a été loué ou emprunté ou apporté', on_delete=django.db.models.deletion.CASCADE, related_name='specific_equipment', to='event.Event')),
],
options={
'verbose_name': 'matériel temporaire',
'verbose_name_plural': 'matériels temporaires',
},
bases=('equipment.abstractequipment',),
),
migrations.AddField(
model_name='equipmentremark',
name='equipment',
field=models.ForeignKey(help_text='Matériel concerné par la remarque', on_delete=django.db.models.deletion.CASCADE, related_name='remarks', to='equipment.AbstractEquipment'),
),
migrations.AddField(
model_name='equipmentattribution',
name='equipment',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='equipment.AbstractEquipment'),
),
migrations.AddField(
model_name='abstractequipment',
name='activities',
field=models.ManyToManyField(related_name='equipment', through='equipment.EquipmentAttribution', to='event.Activity'),
),
]