Django 1.8
[prawokultury.git] / shop / migrations / 0001_initial.py
1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
3
4 from django.db import models, migrations
5
6
7 class Migration(migrations.Migration):
8
9     dependencies = [
10         ('migdal', '0001_initial'),
11     ]
12
13     operations = [
14         migrations.CreateModel(
15             name='Offer',
16             fields=[
17                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
18                 ('price', models.DecimalField(verbose_name='price', max_digits=6, decimal_places=2)),
19                 ('cost_const', models.DecimalField(max_digits=6, decimal_places=2)),
20                 ('cost_per_item', models.DecimalField(default=0, max_digits=6, decimal_places=2)),
21                 ('entry', models.OneToOneField(to='migdal.Entry')),
22             ],
23             options={
24                 'ordering': ['entry'],
25                 'verbose_name': 'offer',
26                 'verbose_name_plural': 'offers',
27             },
28             bases=(models.Model,),
29         ),
30         migrations.CreateModel(
31             name='Order',
32             fields=[
33                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
34                 ('items', models.IntegerField(default=1, verbose_name='items')),
35                 ('name', models.CharField(max_length=127, verbose_name='name', blank=True)),
36                 ('email', models.EmailField(max_length=75, verbose_name='email', db_index=True)),
37                 ('address', models.TextField(verbose_name='address', db_index=True)),
38                 ('payed_at', models.DateTimeField(db_index=True, null=True, verbose_name='payed at', blank=True)),
39                 ('language_code', models.CharField(max_length=2, null=True, blank=True)),
40                 ('offer', models.ForeignKey(verbose_name='offer', to='shop.Offer')),
41             ],
42             options={
43                 'ordering': ['-payed_at'],
44                 'verbose_name': 'order',
45                 'verbose_name_plural': 'orders',
46             },
47             bases=(models.Model,),
48         ),
49     ]