mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
addition of Stock app, model, templates, urls
This commit is contained in:
32
stock/migrations/0001_initial.py
Normal file
32
stock/migrations/0001_initial.py
Normal file
@ -0,0 +1,32 @@
|
||||
# -*- 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')),
|
||||
],
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user