mirror of https://github.com/nanoy42/coope
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
266 lines
19 KiB
266 lines
19 KiB
# 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 = [
|
|
('preferences', '0003_historicalcotisation_historicalgeneralpreferences_historicalpaymentmethod'),
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
('gestion', '0004_consumption'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='HistoricalConsumption',
|
|
fields=[
|
|
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
|
|
('quantity', models.PositiveIntegerField(default=0)),
|
|
('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)),
|
|
('customer', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('product', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='gestion.Product')),
|
|
],
|
|
options={
|
|
'verbose_name': 'historical consumption',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='HistoricalConsumptionHistory',
|
|
fields=[
|
|
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
|
|
('quantity', models.PositiveIntegerField(default=0)),
|
|
('date', models.DateTimeField(blank=True, editable=False)),
|
|
('amount', models.DecimalField(decimal_places=2, default=0, max_digits=7)),
|
|
('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)),
|
|
('coopeman', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('customer', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('menu', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='gestion.MenuHistory')),
|
|
('paymentMethod', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='preferences.PaymentMethod')),
|
|
('product', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='gestion.Product')),
|
|
],
|
|
options={
|
|
'verbose_name': 'historical consumption history',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='HistoricalKeg',
|
|
fields=[
|
|
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
|
|
('name', models.CharField(db_index=True, max_length=20, verbose_name='Nom')),
|
|
('stockHold', models.IntegerField(default=0, verbose_name='Stock en soute')),
|
|
('barcode', models.CharField(db_index=True, max_length=20, verbose_name='Code barre')),
|
|
('amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Prix du fût')),
|
|
('capacity', models.IntegerField(default=30, verbose_name='Capacité (L)')),
|
|
('is_active', models.BooleanField(default=False, verbose_name='Actif')),
|
|
('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)),
|
|
('demi', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='gestion.Product')),
|
|
('galopin', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='gestion.Product')),
|
|
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('pinte', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='gestion.Product')),
|
|
],
|
|
options={
|
|
'verbose_name': 'historical keg',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='HistoricalKegHistory',
|
|
fields=[
|
|
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
|
|
('openingDate', models.DateTimeField(blank=True, editable=False)),
|
|
('quantitySold', models.DecimalField(decimal_places=2, default=0, max_digits=5)),
|
|
('amountSold', models.DecimalField(decimal_places=2, default=0, max_digits=5)),
|
|
('closingDate', models.DateTimeField(blank=True, null=True)),
|
|
('isCurrentKegHistory', models.BooleanField(default=True)),
|
|
('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)),
|
|
('keg', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='gestion.Keg')),
|
|
],
|
|
options={
|
|
'verbose_name': 'historical keg history',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='HistoricalMenu',
|
|
fields=[
|
|
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
|
|
('name', models.CharField(max_length=255, verbose_name='Nom')),
|
|
('amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Montant')),
|
|
('barcode', models.CharField(db_index=True, max_length=20, verbose_name='Code barre')),
|
|
('is_active', models.BooleanField(default=False, verbose_name='Actif')),
|
|
('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 menu',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='HistoricalMenuHistory',
|
|
fields=[
|
|
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
|
|
('quantity', models.PositiveIntegerField(default=0)),
|
|
('date', models.DateTimeField(blank=True, editable=False)),
|
|
('amount', models.DecimalField(decimal_places=2, default=0, max_digits=5)),
|
|
('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)),
|
|
('PaymentMethod', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='preferences.PaymentMethod')),
|
|
('coopeman', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('customer', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('menu', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='gestion.Menu')),
|
|
],
|
|
options={
|
|
'verbose_name': 'historical menu history',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='HistoricalProduct',
|
|
fields=[
|
|
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
|
|
('name', models.CharField(db_index=True, max_length=40, verbose_name='Nom')),
|
|
('amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Prix de vente')),
|
|
('stockHold', models.IntegerField(default=0, verbose_name='Stock en soute')),
|
|
('stockBar', models.IntegerField(default=0, verbose_name='Stock en bar')),
|
|
('barcode', models.CharField(db_index=True, max_length=20, verbose_name='Code barre')),
|
|
('category', models.CharField(choices=[('PP', 'Pinte Pression'), ('DP', 'Demi Pression'), ('GP', 'Galopin pression'), ('BT', 'Bouteille'), ('SO', 'Soft'), ('FO', 'Bouffe autre que panini'), ('PA', 'Bouffe pour panini')], default='FO', max_length=2, verbose_name='Catégorie')),
|
|
('needQuantityButton', models.BooleanField(default=False, verbose_name='Bouton quantité')),
|
|
('is_active', models.BooleanField(default=True, verbose_name='Actif')),
|
|
('volume', models.IntegerField(default=0)),
|
|
('deg', models.DecimalField(decimal_places=2, default=0, max_digits=5, verbose_name='Degré')),
|
|
('adherentRequired', models.BooleanField(default=True)),
|
|
('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 product',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='HistoricalRaming',
|
|
fields=[
|
|
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
|
|
('date', models.DateTimeField(blank=True, editable=False)),
|
|
('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)),
|
|
('coopeman', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('keg', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='gestion.Keg')),
|
|
],
|
|
options={
|
|
'verbose_name': 'historical raming',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='HistoricalRefund',
|
|
fields=[
|
|
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
|
|
('date', models.DateTimeField(blank=True, editable=False)),
|
|
('amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Montant')),
|
|
('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)),
|
|
('coopeman', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('customer', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('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 refund',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='HistoricalReload',
|
|
fields=[
|
|
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
|
|
('amount', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Montant')),
|
|
('date', models.DateTimeField(blank=True, editable=False)),
|
|
('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)),
|
|
('PaymentMethod', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='preferences.PaymentMethod')),
|
|
('coopeman', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('customer', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
|
|
('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 reload',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='HistoricalStocking',
|
|
fields=[
|
|
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
|
|
('date', models.DateTimeField(blank=True, editable=False)),
|
|
('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 stocking',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': 'history_date',
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
]
|
|
|