poulpe/equipment/migrations/0001_initial.py
2018-08-06 17:06:38 +02:00

133 lines
6 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-08-06 15:04
from __future__ import unicode_literals
import datetime
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='Equipment',
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',
'verbose_name_plural': 'matériels',
},
),
migrations.CreateModel(
name='EquipmentAttribution',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('amount', models.BigIntegerField(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')),
('equipment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='equipment.Equipment')),
],
options={
'verbose_name': 'attribution de matériel',
'verbose_name_plural': 'attributions de matériel',
},
),
migrations.CreateModel(
name='EquipmentCategory',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200, verbose_name='nom')),
],
options={
'verbose_name': 'pôle',
'verbose_name_plural': 'pôles',
},
),
migrations.CreateModel(
name='EquipmentOwner',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200, verbose_name='nom')),
],
options={
'verbose_name': 'propriétaire de matériel',
'verbose_name_plural': 'propriétaires de matériel',
},
),
migrations.CreateModel(
name='EquipmentPole',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200, verbose_name='nom')),
],
options={
'verbose_name': 'catégorie',
'verbose_name_plural': 'catégories',
},
),
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')),
('ide', models.PositiveSmallIntegerField(verbose_name='id')),
('is_broken', models.BooleanField()),
('is_lost', models.BooleanField()),
('equipment', models.ForeignKey(help_text='Matériel concerné par la remarque', on_delete=django.db.models.deletion.CASCADE, related_name='remarks', to='equipment.Equipment')),
],
options={
'verbose_name': 'remarque sur matériel',
'verbose_name_plural': 'remarques sur le matériel',
},
),
migrations.CreateModel(
name='EquipmentRevision',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField(default=datetime.date.today, verbose_name='date')),
('remark', models.TextField(verbose_name='remarque sur la révision')),
('ide', models.PositiveSmallIntegerField(verbose_name='id')),
('equipment', models.ForeignKey(help_text='Matériel concerné par les révisions', on_delete=django.db.models.deletion.CASCADE, related_name='revisions', to='equipment.Equipment')),
],
options={
'verbose_name': 'révision de matériel',
'verbose_name_plural': 'révisions de matériel',
},
),
migrations.AddField(
model_name='equipment',
name='activities',
field=models.ManyToManyField(related_name='equipment', through='equipment.EquipmentAttribution', to='event.Activity'),
),
migrations.AddField(
model_name='equipment',
name='category',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='equipment.EquipmentCategory'),
),
migrations.AddField(
model_name='equipment',
name='event',
field=models.ForeignKey(blank=True, help_text="Si spécifié, l'instance du modèle est spécifique à l'évènement en question.", null=True, on_delete=django.db.models.deletion.CASCADE, to='event.Event', verbose_name='évènement'),
),
migrations.AddField(
model_name='equipment',
name='owner',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='equipment.EquipmentOwner'),
),
migrations.AddField(
model_name='equipment',
name='pole',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='equipment.EquipmentPole'),
),
]