31 lines
1.3 KiB
Python
31 lines
1.3 KiB
Python
# Generated by Django 2.2.7 on 2019-11-20 12:49
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('establishment', '0064_auto_20191119_1546'),
|
|
('product', '0017_auto_20191119_1546'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='PurchasedProduct',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('is_gifted', models.NullBooleanField(default=None, verbose_name='is gifted')),
|
|
('quantity', models.PositiveSmallIntegerField(verbose_name='quantity')),
|
|
('establishment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='purchased_plaques', to='establishment.Establishment', verbose_name='establishment')),
|
|
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='purchased_by_establishments', to='product.Product', verbose_name='plaque')),
|
|
],
|
|
options={
|
|
'verbose_name': 'purchased plaque',
|
|
'verbose_name_plural': 'purchased plaques',
|
|
'unique_together': {('establishment', 'product')},
|
|
},
|
|
),
|
|
]
|