3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-25 22:22:27 +00:00
coope/preferences/migrations/0003_historicalcotisation_historicalgeneralpreferences_historicalpaymentmethod.py
2018-11-27 09:07:12 +01:00

84 lines
4.8 KiB
Python

# 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 = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('preferences', '0002_auto_20181009_1119'),
]
operations = [
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, 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),
),
]