mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-04 18:42:25 +00:00
51 lines
2.2 KiB
Python
51 lines
2.2 KiB
Python
# Generated by Django 2.2.18 on 2021-08-07 11:08
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import re2o.mixins
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
('cotisations', '0004_auto_20210208_1827'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='DepositItem',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=255, unique=True, verbose_name='designation')),
|
|
('deposit_amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='deposit amount')),
|
|
],
|
|
options={
|
|
'verbose_name': 'deposit item',
|
|
'verbose_name_plural': 'deposit items',
|
|
'abstract': False,
|
|
},
|
|
bases=(re2o.mixins.RevMixin, re2o.mixins.AclMixin, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='Deposit',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('date', models.DateTimeField(auto_now_add=True, verbose_name='date')),
|
|
('returned', models.BooleanField(default=False, verbose_name='returned')),
|
|
('deposit_amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='deposit amount')),
|
|
('item', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='deposits.DepositItem')),
|
|
('payment_method', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='cotisations.Paiement')),
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
options={
|
|
'verbose_name': 'deposit',
|
|
'verbose_name_plural': 'deposits',
|
|
'abstract': False,
|
|
},
|
|
bases=(re2o.mixins.RevMixin, re2o.mixins.AclMixin, models.Model),
|
|
),
|
|
]
|