3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-24 20:33:12 +00:00
coope/preferences/migrations/0001_initial.py

121 lines
6.9 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
2018-12-13 18:26:58 +00:00
from django.conf import settings
import django.core.validators
2018-08-31 12:46:35 +00:00
from django.db import migrations, models
2018-12-13 18:26:58 +00:00
import django.db.models.deletion
import simple_history.models
2018-08-31 12:46:35 +00:00
class Migration(migrations.Migration):
initial = True
dependencies = [
2018-12-13 18:26:58 +00:00
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
2018-08-31 12:46:35 +00:00
]
operations = [
2018-10-05 22:03:02 +00:00
migrations.CreateModel(
name='Cotisation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2018-12-13 18:26:58 +00:00
('amount', models.DecimalField(decimal_places=2, max_digits=5, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Montant')),
2018-10-05 22:03:02 +00:00
('duration', models.PositiveIntegerField(verbose_name='Durée de la cotisation (jours)')),
],
),
2018-08-31 12:46:35 +00:00
migrations.CreateModel(
name='GeneralPreferences',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('is_active', models.BooleanField(default=True)),
('active_message', models.TextField(blank=True)),
('global_message', models.TextField(blank=True)),
('president', models.CharField(blank=True, max_length=255)),
('vice_president', models.CharField(blank=True, max_length=255)),
('treasurer', models.CharField(blank=True, max_length=255)),
('secretary', models.CharField(blank=True, max_length=255)),
('brewer', models.CharField(blank=True, max_length=255)),
('grocer', models.CharField(blank=True, max_length=255)),
],
),
2018-12-13 18:26:58 +00:00
migrations.CreateModel(
name='HistoricalCotisation',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('amount', models.DecimalField(decimal_places=2, max_digits=5, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Montant')),
('duration', models.PositiveIntegerField(verbose_name='Durée de la cotisation (jours)')),
('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 cotisation',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalGeneralPreferences',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('is_active', models.BooleanField(default=True)),
('active_message', models.TextField(blank=True)),
('global_message', models.TextField(blank=True)),
('president', models.CharField(blank=True, max_length=255)),
('vice_president', models.CharField(blank=True, max_length=255)),
('treasurer', models.CharField(blank=True, max_length=255)),
('secretary', models.CharField(blank=True, max_length=255)),
('brewer', models.CharField(blank=True, max_length=255)),
('grocer', models.CharField(blank=True, max_length=255)),
('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 general preferences',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': 'history_date',
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalPaymentMethod',
fields=[
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='Nom')),
('is_active', models.BooleanField(default=True, verbose_name='Actif')),
('is_usable_in_cotisation', models.BooleanField(default=True, verbose_name='Cotisations ?')),
('is_usable_in_reload', models.BooleanField(default=True, verbose_name='Rechargements ?')),
('affect_balance', models.BooleanField(default=False, verbose_name='Affecte le solde')),
('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 payment method',
'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='PaymentMethod',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2018-10-05 22:03:02 +00:00
('name', models.CharField(max_length=255, verbose_name='Nom')),
2018-12-13 18:26:58 +00:00
('is_active', models.BooleanField(default=True, verbose_name='Actif')),
('is_usable_in_cotisation', models.BooleanField(default=True, verbose_name='Cotisations ?')),
('is_usable_in_reload', models.BooleanField(default=True, verbose_name='Rechargements ?')),
('affect_balance', models.BooleanField(default=False, verbose_name='Affecte le solde')),
2018-08-31 12:46:35 +00:00
],
),
]