<reponame>heljhumenad/parts-arrival<filename>parts/app/partsnumber/migrations/0001_initial.py
# Generated by Django 2.2 on 2021-02-26 05:38

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='PartNumberClass',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('description', models.CharField(max_length=200, verbose_name='Description')),
                ('class_name', models.CharField(max_length=20, verbose_name='Class name')),
                ('charge_type', models.CharField(max_length=20, verbose_name='Charge Type')),
            ],
            options={
                'verbose_name': 'Part Number Class',
                'verbose_name_plural': 'Part Number Classes',
                'db_table': 'partnumber_class',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='UnitMeasure',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('description', models.CharField(max_length=200, verbose_name='Description')),
                ('um', models.CharField(max_length=20, verbose_name='Unit of Measure')),
            ],
            options={
                'verbose_name': 'Unit of Measure',
                'verbose_name_plural': 'Unit of Measures',
                'db_table': 'um',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='PartsNumber',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('description', models.CharField(max_length=200, verbose_name='Description')),
                ('partnumber', models.CharField(max_length=200, unique=True, verbose_name='Parts Number')),
                ('source_code', models.CharField(choices=[('01', 'Nissan Japan'), ('02', 'Nissan Taiwan'), ('05', 'Nissan Thailand'), ('08', 'Nissan Indonesia')], max_length=200, verbose_name='Parts Number')),
                ('bar_code', models.CharField(max_length=200, verbose_name='Barcode No.')),
                ('selling_price', models.IntegerField(verbose_name='Selling Price')),
                ('status', models.CharField(choices=[('Active', 'Active'), ('Depcreated', 'Depcreated'), ('Obsolete', 'Obsolete'), ('Deactivated', 'Deactivated')], max_length=200, verbose_name='Status')),
                ('unit_measure', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='partsnumber.UnitMeasure', verbose_name='Stock/UM')),
            ],
            options={
                'verbose_name': 'Part Number',
                'verbose_name_plural': 'Parts Number',
                'db_table': 'partnumbers',
                'ordering': ['id'],
            },
        ),
    ]

# Generated by Django 2.2 on 2021-02-26 05:38

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='PartNumberClass',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('description', models.CharField(max_length=200, verbose_name='Description')),
                ('class_name', models.CharField(max_length=20, verbose_name='Class name')),
                ('charge_type', models.CharField(max_length=20, verbose_name='Charge Type')),
            ],
            options={
                'verbose_name': 'Part Number Class',
                'verbose_name_plural': 'Part Number Classes',
                'db_table': 'partnumber_class',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='UnitMeasure',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('description', models.CharField(max_length=200, verbose_name='Description')),
                ('um', models.CharField(max_length=20, verbose_name='Unit of Measure')),
            ],
            options={
                'verbose_name': 'Unit of Measure',
                'verbose_name_plural': 'Unit of Measures',
                'db_table': 'um',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='PartsNumber',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('description', models.CharField(max_length=200, verbose_name='Description')),
                ('partnumber', models.CharField(max_length=200, unique=True, verbose_name='Parts Number')),
                ('source_code', models.CharField(choices=[('01', 'Nissan Japan'), ('02', 'Nissan Taiwan'), ('05', 'Nissan Thailand'), ('08', 'Nissan Indonesia')], max_length=200, verbose_name='Parts Number')),
                ('bar_code', models.CharField(max_length=200, verbose_name='Barcode No.')),
                ('selling_price', models.IntegerField(verbose_name='Selling Price')),
                ('status', models.CharField(choices=[('Active', 'Active'), ('Depcreated', 'Depcreated'), ('Obsolete', 'Obsolete'), ('Deactivated', 'Deactivated')], max_length=200, verbose_name='Status')),
                ('unit_measure', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='partsnumber.UnitMeasure', verbose_name='Stock/UM')),
            ],
            options={
                'verbose_name': 'Part Number',
                'verbose_name_plural': 'Parts Number',
                'db_table': 'partnumbers',
                'ordering': ['id'],
            },
        ),
    ]
# Generated by Django 2.2 on 2021-02-26 05:38