2017-02-21 21:16:50 +01:00
# -*- coding: utf-8 -*-
2018-08-06 19:31:34 +02:00
# Generated by Django 1.11.11 on 2018-08-06 17:29
2017-02-21 21:16:50 +01:00
from __future__ import unicode_literals
2018-08-06 09:52:56 +02:00
import datetime
2017-02-21 21:16:50 +01:00
from django . db import migrations , models
import django . db . models . deletion
2018-08-06 18:34:07 +02:00
import equipment . fields
2017-02-21 21:16:50 +01:00
class Migration ( migrations . Migration ) :
initial = True
dependencies = [
( ' event ' , ' 0001_initial ' ) ,
]
operations = [
migrations . CreateModel (
2017-07-18 19:08:09 +02:00
name = ' Equipment ' ,
2017-02-21 21:16:50 +01:00
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
2017-07-18 15:37:13 +02:00
( ' 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 ' ) ) ,
2017-02-21 21:16:50 +01:00
] ,
options = {
2017-07-21 16:20:39 +02:00
' verbose_name ' : ' matériel ' ,
' verbose_name_plural ' : ' matériels ' ,
2017-02-21 21:16:50 +01:00
} ,
) ,
migrations . CreateModel (
name = ' EquipmentAttribution ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
2018-08-06 09:52:56 +02:00
( ' amount ' , models . BigIntegerField ( verbose_name = ' quantité attribuée ' ) ) ,
2017-07-18 15:37:13 +02:00
( ' remarks ' , models . TextField ( verbose_name = " remarques concernant l ' attribution " ) ) ,
2017-02-21 21:16:50 +01:00
( ' activity ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' event.Activity ' ) ) ,
2017-07-18 19:08:09 +02:00
( ' equipment ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' equipment.Equipment ' ) ) ,
2017-02-21 21:16:50 +01:00
] ,
options = {
2017-07-18 18:41:44 +02:00
' verbose_name ' : ' attribution de matériel ' ,
2017-07-21 16:20:39 +02:00
' verbose_name_plural ' : ' attributions de matériel ' ,
2017-02-21 21:16:50 +01:00
} ,
) ,
2018-08-06 17:06:38 +02:00
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 = {
2018-08-06 19:31:34 +02:00
' verbose_name ' : ' catégories ' ,
' verbose_name_plural ' : ' catégories ' ,
2018-08-06 17:06:38 +02:00
} ,
) ,
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 = {
2018-08-06 19:31:34 +02:00
' verbose_name ' : ' pôle ' ,
' verbose_name_plural ' : ' pôle ' ,
2018-08-06 17:06:38 +02:00
} ,
) ,
2017-02-21 21:16:50 +01:00
migrations . CreateModel (
name = ' EquipmentRemark ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
2017-07-18 15:37:13 +02:00
( ' remark ' , models . TextField ( verbose_name = ' remarque sur le matériel ' ) ) ,
2018-08-06 18:34:07 +02:00
( ' ids ' , equipment . fields . IdField ( ) ) ,
2017-02-21 21:16:50 +01:00
( ' is_broken ' , models . BooleanField ( ) ) ,
( ' is_lost ' , models . BooleanField ( ) ) ,
2017-07-18 19:08:09 +02:00
( ' equipment ' , models . ForeignKey ( help_text = ' Matériel concerné par la remarque ' , on_delete = django . db . models . deletion . CASCADE , related_name = ' remarks ' , to = ' equipment.Equipment ' ) ) ,
2017-02-21 21:16:50 +01:00
] ,
options = {
2017-07-18 18:41:44 +02:00
' verbose_name ' : ' remarque sur matériel ' ,
2017-07-21 16:20:39 +02:00
' verbose_name_plural ' : ' remarques sur le matériel ' ,
2017-02-21 21:16:50 +01:00
} ,
) ,
2018-08-06 09:52:56 +02:00
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 ' ) ) ,
2018-08-06 18:34:07 +02:00
( ' ids ' , equipment . fields . IdField ( ) ) ,
2018-08-06 09:52:56 +02:00
( ' 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 ' ,
} ,
) ,
2017-02-21 21:16:50 +01:00
migrations . AddField (
2017-07-18 19:08:09 +02:00
model_name = ' equipment ' ,
2017-02-21 21:16:50 +01:00
name = ' activities ' ,
field = models . ManyToManyField ( related_name = ' equipment ' , through = ' equipment.EquipmentAttribution ' , to = ' event.Activity ' ) ,
) ,
2018-08-06 17:06:38 +02:00
migrations . AddField (
model_name = ' equipment ' ,
name = ' category ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' equipment.EquipmentCategory ' ) ,
) ,
2017-07-18 19:08:09 +02:00
migrations . AddField (
model_name = ' equipment ' ,
name = ' event ' ,
2017-08-12 14:54:45 +02:00
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 ' ) ,
2017-07-18 19:08:09 +02:00
) ,
2018-08-06 09:52:56 +02:00
migrations . AddField (
model_name = ' equipment ' ,
2018-08-06 17:06:38 +02:00
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 ' ) ,
2018-08-06 09:52:56 +02:00
) ,
2017-02-21 21:16:50 +01:00
]