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

71 lines
3.6 KiB
Python
Raw Normal View History

2018-10-05 22:03:02 +00:00
# Generated by Django 2.1 on 2018-10-04 09:32
2018-08-31 12:46:35 +00:00
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
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
],
),
migrations.CreateModel(
name='Profile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, 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)),
],
),
migrations.CreateModel(
name='School',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
],
),
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-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),
),
]