Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0fbe98b
commit d7f7872
Showing
38 changed files
with
1,468 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('order', '__first__'), | ||
('customer', '__first__'), | ||
('core', '__first__'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='BaseAddress', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('firstname', models.CharField(max_length=50, verbose_name='Firstname')), | ||
('lastname', models.CharField(max_length=50, verbose_name='Lastname')), | ||
('line1', models.CharField(max_length=100, null=True, verbose_name='Line 1', blank=True)), | ||
('line2', models.CharField(max_length=100, null=True, verbose_name='Line 2', blank=True)), | ||
('zip_code', models.CharField(default='', max_length=10, verbose_name='Zip code')), | ||
('city', models.CharField(max_length=50, verbose_name='City')), | ||
('state', models.CharField(max_length=50, null=True, verbose_name='State', blank=True)), | ||
('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')), | ||
('modified', models.DateTimeField(auto_now=True, verbose_name='Modified')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Address', | ||
fields=[ | ||
('baseaddress_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='addresses.BaseAddress')), | ||
('company_name', models.CharField(max_length=50, null=True, verbose_name='Company name', blank=True)), | ||
('phone', models.CharField(max_length=20, null=True, verbose_name='Phone', blank=True)), | ||
('email', models.EmailField(max_length=254, null=True, verbose_name='E-Mail', blank=True)), | ||
], | ||
bases=('addresses.baseaddress',), | ||
), | ||
migrations.AddField( | ||
model_name='baseaddress', | ||
name='country', | ||
field=models.ForeignKey(verbose_name='Country', blank=True, to='core.Country', null=True), | ||
), | ||
migrations.AddField( | ||
model_name='baseaddress', | ||
name='customer', | ||
field=models.ForeignKey(related_name='addresses', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Customer', blank=True, to='customer.Customer', null=True), | ||
), | ||
migrations.AddField( | ||
model_name='baseaddress', | ||
name='order', | ||
field=models.ForeignKey(related_name='addresses', verbose_name='Order', blank=True, to='order.Order', null=True), | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
from django.conf import settings | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('catalog', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Cart', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('session', models.CharField(max_length=100, verbose_name='Session', blank=True)), | ||
('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Creation date')), | ||
('modification_date', models.DateTimeField(auto_now=True, verbose_name='Modification date')), | ||
('user', models.ForeignKey(verbose_name='User', blank=True, to=settings.AUTH_USER_MODEL, null=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='CartItem', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('amount', models.FloatField(null=True, verbose_name='Quantity', blank=True)), | ||
('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Creation date')), | ||
('modification_date', models.DateTimeField(auto_now=True, verbose_name='Modification date')), | ||
('cart', models.ForeignKey(verbose_name='Cart', to='cart.Cart')), | ||
('product', models.ForeignKey(verbose_name='Product', to='catalog.Product')), | ||
], | ||
options={ | ||
'ordering': ['id'], | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='CartItemPropertyValue', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('value', models.CharField(max_length=100, verbose_name=b'Value', blank=True)), | ||
('cart_item', models.ForeignKey(related_name='properties', verbose_name='Cart item', to='cart.CartItem')), | ||
('property', models.ForeignKey(verbose_name='Property', to='catalog.Property')), | ||
('property_group', models.ForeignKey(verbose_name='Property group', blank=True, to='catalog.PropertyGroup', null=True)), | ||
], | ||
), | ||
] |
Empty file.
Oops, something went wrong.