mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-16 19:23:27 +00:00
33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
|
# -*- coding: utf-8 -*-
|
||
|
from __future__ import unicode_literals
|
||
|
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('counter', '0011_auto_20161004_2039'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Stock',
|
||
|
fields=[
|
||
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||
|
('name', models.CharField(max_length=64, verbose_name='name')),
|
||
|
('counter', models.OneToOneField(to='counter.Counter', related_name='stock', verbose_name='counter')),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='StockItem',
|
||
|
fields=[
|
||
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||
|
('name', models.CharField(max_length=64, verbose_name='name')),
|
||
|
('unit_quantity', models.IntegerField(default=0, verbose_name='unit quantity')),
|
||
|
('effective_quantity', models.IntegerField(default=0, verbose_name='effective quantity')),
|
||
|
('stock_owner', models.ForeignKey(related_name='stock_owner', to='stock.Stock')),
|
||
|
],
|
||
|
),
|
||
|
]
|