mirror of
https://github.com/nanoy42/coope
synced 2024-12-26 00:43:46 +00:00
120 lines
6.9 KiB
Python
120 lines
6.9 KiB
Python
# Generated by Django 2.1 on 2018-12-13 18:26
|
|
|
|
from django.conf import settings
|
|
import django.core.validators
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import simple_history.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Cotisation',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, 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)')),
|
|
],
|
|
),
|
|
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)),
|
|
],
|
|
),
|
|
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),
|
|
),
|
|
migrations.CreateModel(
|
|
name='PaymentMethod',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, 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')),
|
|
],
|
|
),
|
|
]
|