mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 07:23:46 +00:00
chore: Create deposits app initial migration
This commit is contained in:
parent
3a5437dd8a
commit
8a1d5f1137
2 changed files with 47 additions and 0 deletions
47
deposits/migrations/0001_initial.py
Normal file
47
deposits/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Generated by Django 2.2.18 on 2021-08-06 13:10
|
||||
|
||||
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),
|
||||
]
|
||||
|
||||
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',
|
||||
},
|
||||
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')),
|
||||
('item', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='deposits.DepositItem')),
|
||||
('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),
|
||||
),
|
||||
]
|
0
deposits/migrations/__init__.py
Normal file
0
deposits/migrations/__init__.py
Normal file
Loading…
Reference in a new issue