3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-30 00:22:26 +00:00
coope/users/migrations/0001_initial.py

181 lines
11 KiB
Python
Raw Normal View History

2018-12-13 18:26:58 +00:00
# Generated by Django 2.1 on 2018-12-13 18:26
2018-08-31 12:46:35 +00:00
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
2018-12-13 18:26:58 +00:00
import simple_history.models
2018-08-31 12:46:35 +00:00
class Migration(migrations.Migration):
initial = True
dependencies = [
('preferences', '0001_initial'),
2018-10-05 22:03:02 +00:00
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
2018-08-31 12:46:35 +00:00
]
operations = [
migrations.CreateModel(
2018-10-05 22:03:02 +00:00
name='CotisationHistory',
2018-08-31 12:46:35 +00:00
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2018-10-05 22:03:02 +00:00
('amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Montant')),
('duration', models.PositiveIntegerField(verbose_name='Durée')),
('paymentDate', models.DateTimeField(auto_now_add=True, verbose_name='Date du paiement')),
('endDate', models.DateTimeField(verbose_name='Fin de la cotisation')),
('valid', models.IntegerField(choices=[(0, 'En attente de validation'), (1, 'Validée'), (2, 'Invalidée')], default=0)),
('coopeman', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='cotisation_made', to=settings.AUTH_USER_MODEL)),
('cotisation', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='preferences.Cotisation', verbose_name='Type de cotisation')),
('paymentMethod', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='preferences.PaymentMethod', verbose_name='Moyen de paiement')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Client')),
2018-08-31 12:46:35 +00:00
],
2018-12-13 18:26:58 +00:00
options={
'verbose_name': 'Historique cotisation',
'permissions': (('validate_cotisationhistory', 'Peut (in)valider les cotisations'),),
},
),
migrations.CreateModel(
name='HistoricalCotisationHistory',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Montant')),
('duration', models.PositiveIntegerField(verbose_name='Durée')),
('paymentDate', models.DateTimeField(blank=True, editable=False, verbose_name='Date du paiement')),
('endDate', models.DateTimeField(verbose_name='Fin de la cotisation')),
('valid', models.IntegerField(choices=[(0, 'En attente de validation'), (1, 'Validée'), (2, 'Invalidée')], default=0)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_date', models.DateTimeField()),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('coopeman', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
('cotisation', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='preferences.Cotisation')),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('paymentMethod', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='preferences.PaymentMethod')),
('user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'historical Historique cotisation',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalProfile',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('credit', models.DecimalField(decimal_places=2, default=0, max_digits=7)),
('debit', models.DecimalField(decimal_places=2, default=0, max_digits=7)),
('cotisationEnd', models.DateTimeField(blank=True, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_date', models.DateTimeField()),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'historical Profil',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalSchool',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='Nom')),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_date', models.DateTimeField()),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'historical École',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalWhiteListHistory',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('paymentDate', models.DateTimeField(blank=True, editable=False)),
('endDate', models.DateTimeField()),
('duration', models.PositiveIntegerField(help_text="Durée de l'accès gracieux en jour", verbose_name='Durée')),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_date', models.DateTimeField()),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('coopeman', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'historical Historique accès gracieux',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
2018-08-31 12:46:35 +00:00
),
migrations.CreateModel(
name='Profile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2018-12-13 18:26:58 +00:00
('credit', models.DecimalField(decimal_places=2, default=0, max_digits=7)),
('debit', models.DecimalField(decimal_places=2, default=0, max_digits=7)),
2018-08-31 12:46:35 +00:00
('cotisationEnd', models.DateTimeField(blank=True, null=True)),
],
2018-12-13 18:26:58 +00:00
options={
'verbose_name': 'Profil',
},
2018-08-31 12:46:35 +00:00
),
migrations.CreateModel(
name='School',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2018-12-13 18:26:58 +00:00
('name', models.CharField(max_length=255, verbose_name='Nom')),
2018-08-31 12:46:35 +00:00
],
2018-12-13 18:26:58 +00:00
options={
'verbose_name': 'École',
},
2018-08-31 12:46:35 +00:00
),
2018-10-05 22:03:02 +00:00
migrations.CreateModel(
name='WhiteListHistory',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('paymentDate', models.DateTimeField(auto_now_add=True)),
('endDate', models.DateTimeField()),
('duration', models.PositiveIntegerField(help_text="Durée de l'accès gracieux en jour", verbose_name='Durée')),
('coopeman', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='whitelist_made', to=settings.AUTH_USER_MODEL)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
],
2018-12-13 18:26:58 +00:00
options={
'verbose_name': 'Historique accès gracieux',
},
2018-10-05 22:03:02 +00:00
),
2018-08-31 12:46:35 +00:00
migrations.AddField(
model_name='profile',
name='school',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='users.School'),
),
migrations.AddField(
model_name='profile',
name='user',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
2018-12-13 18:26:58 +00:00
migrations.AddField(
model_name='historicalprofile',
name='school',
field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='users.School'),
),
migrations.AddField(
model_name='historicalprofile',
name='user',
field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL),
),
2018-08-31 12:46:35 +00:00
]