mirror of https://github.com/nanoy42/coope
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
7.1 KiB
106 lines
7.1 KiB
# Generated by Django 2.1 on 2018-11-26 07:57
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import simple_history.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('preferences', '0003_historicalcotisation_historicalgeneralpreferences_historicalpaymentmethod'),
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
('users', '0003_auto_20181123_0229'),
|
|
]
|
|
|
|
operations = [
|
|
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 cotisation history',
|
|
'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=5)),
|
|
('debit', models.DecimalField(decimal_places=2, default=0, max_digits=5)),
|
|
('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)),
|
|
('school', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='users.School')),
|
|
('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 profile',
|
|
'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 school',
|
|
'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 white list history',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
]
|
|
|