105 lines
4.7 KiB
Python
105 lines
4.7 KiB
Python
|
# Generated by Django 2.0.2 on 2018-03-02 11:00
|
||
|
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
]
|
||
|
|
||
|
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=300, verbose_name='nom')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'machine',
|
||
|
'verbose_name_plural': 'machines',
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Room',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=300, verbose_name='nom')),
|
||
|
('latitude', models.DecimalField(decimal_places=8, max_digits=11, verbose_name='latitude')),
|
||
|
('longitude', models.DecimalField(decimal_places=8, max_digits=11, verbose_name='longitude')),
|
||
|
('notes', models.TextField(verbose_name='notes')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'salle',
|
||
|
'verbose_name_plural': 'salles',
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Round',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('repetition_number', models.PositiveIntegerField(verbose_name='nombre de répétitions')),
|
||
|
('theoretical_max_percentage', models.PositiveIntegerField(verbose_name='pourcentage')),
|
||
|
('chosen_weight', models.FloatField(verbose_name='charge choisie')),
|
||
|
('notes', models.TextField(verbose_name='notes')),
|
||
|
('equipment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rounds', to='gym.Equipment', verbose_name='machine')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'série',
|
||
|
'verbose_name_plural': 'séries',
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Session',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('date', models.DateField(verbose_name='date')),
|
||
|
('notes', models.TextField(verbose_name='notes')),
|
||
|
('room', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sessions', to='gym.Room', verbose_name='salle')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'séance',
|
||
|
'verbose_name_plural': 'séances',
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Setting',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=200, verbose_name='nom')),
|
||
|
('value', models.CharField(max_length=200, verbose_name='valeur')),
|
||
|
('equipment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='settings', to='gym.Equipment', verbose_name='machine')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'réglage',
|
||
|
'verbose_name_plural': 'réglages',
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='TheoreticalMax',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('date', models.DateField(verbose_name='date')),
|
||
|
('value', models.FloatField(verbose_name='valeur')),
|
||
|
('equipment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='theoretical_maxs', to='gym.Equipment', verbose_name='machine')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'maximum théorique',
|
||
|
'verbose_name_plural': 'maximums théoriques',
|
||
|
},
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='round',
|
||
|
name='session',
|
||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rounds', to='gym.Session', verbose_name='séance'),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='equipment',
|
||
|
name='room',
|
||
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='equipments', to='gym.Room', verbose_name='salle'),
|
||
|
),
|
||
|
]
|