# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2024-05-07 02:53
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='FSTY_CAD_Chain_Link',
            fields=[
                ('CAD_Chain_Link_id', models.AutoField(primary_key=True, serialize=False)),
                ('CAD_Chain_Link_course', models.CharField(max_length=2000)),
            ],
            options={
                'db_table': 'FSTY_CAD_Chain_Link',
            },
        ),
        migrations.CreateModel(
            name='FSTY_CAD_Design_Data',
            fields=[
                ('CAD_Design_Data_id', models.AutoField(primary_key=True, serialize=False)),
                ('CAD_Design_Data_name', models.CharField(max_length=100, null=True)),
                ('CAD_Design_Data_code', models.CharField(max_length=100, null=True)),
                ('CAD_Design_Data_xml', models.FileField(null=True, upload_to=design_data.models.upload_product_file)),
                ('CAD_Design_Data_pattern_image', models.ImageField(null=True, upload_to=design_data.models.upload_product_file)),
                ('CAD_Design_Data_simulation_image', models.ImageField(null=True, upload_to=design_data.models.upload_product_file)),
                ('CAD_Design_Data_create_date', models.DateTimeField(auto_now_add=True)),
                ('CAD_Design_Data_trc_file', models.FileField(null=True, upload_to=design_data.models.upload_product_file)),
                ('CAD_Design_Data_magnification', models.CharField(blank=True, max_length=10, null=True)),
            ],
            options={
                'db_table': 'FSTY_CAD_Design_Data',
            },
        ),
        migrations.CreateModel(
            name='FSTY_CAD_Fabric',
            fields=[
                ('CAD_Fabric_id', models.AutoField(primary_key=True, serialize=False)),
                ('CAD_Fabric_type', models.CharField(choices=[('R', 'row'), ('S', 'simulated')], max_length=1, null=True)),
                ('CAD_Fabric_wpi', models.CharField(max_length=100, null=True)),
                ('CAD_Fabric_cpi', models.CharField(max_length=100, null=True)),
                ('CAD_Fabric_width', models.CharField(max_length=100, null=True)),
                ('CAD_Fabric_weight_per_width', models.CharField(max_length=100, null=True)),
            ],
            options={
                'db_table': 'FSTY_CAD_Fabric',
            },
        ),
        migrations.CreateModel(
            name='FSTY_CAD_Layer',
            fields=[
                ('CAD_Layer_id', models.AutoField(primary_key=True, serialize=False)),
                ('CAD_Layer_name', models.CharField(max_length=100, null=True)),
                ('CAD_Layer_ratio', models.CharField(max_length=100, null=True)),
                ('CAD_Layer_mm_rack', models.CharField(max_length=100, null=True)),
                ('CAD_Layer_use', models.CharField(max_length=100, null=True)),
                ('CAD_Layer_beam', models.CharField(max_length=100, null=True)),
                ('CAD_Layer_total', models.CharField(max_length=100, null=True)),
                ('CAD_Layer_iodata', models.CharField(max_length=2000, null=True)),
                ('CAD_Layer_design_data', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='design_data.FSTY_CAD_Design_Data')),
            ],
            options={
                'db_table': 'FSTY_CAD_Layer',
            },
        ),
        migrations.CreateModel(
            name='FSTY_CAD_Production',
            fields=[
                ('CAD_Production_id', models.AutoField(primary_key=True, serialize=False)),
                ('CAD_Production_quota_per_day', models.CharField(max_length=100, null=True)),
                ('CAD_Production_machine_name', models.CharField(max_length=100, null=True)),
                ('CAD_Production_note', models.CharField(max_length=100, null=True)),
                ('CAD_Production_design_data', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='design_data.FSTY_CAD_Design_Data')),
            ],
            options={
                'db_table': 'FSTY_CAD_Production',
            },
        ),
        migrations.CreateModel(
            name='FSTY_CAD_Yarn',
            fields=[
                ('CAD_Yarn_id', models.AutoField(primary_key=True, serialize=False)),
                ('CAD_Yarn_idx', models.CharField(max_length=100, null=True)),
                ('CAD_Yarn_maker', models.CharField(max_length=100, null=True)),
                ('CAD_Yarn_spec', models.CharField(max_length=100, null=True)),
                ('CAD_Yarn_code', models.CharField(max_length=100, null=True)),
                ('CAD_Yarn_rgb_color', models.CharField(max_length=100, null=True)),
                ('CAD_Yarn_lab_color', models.CharField(max_length=100, null=True)),
                ('CAD_Yarn_pantone_color', models.CharField(max_length=100, null=True)),
                ('CAD_Yarn_layer', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='design_data.FSTY_CAD_Layer')),
            ],
            options={
                'db_table': 'FSTY_CAD_Yarn',
            },
        ),
        migrations.AddField(
            model_name='fsty_cad_fabric',
            name='CAD_Fabric_production',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='design_data.FSTY_CAD_Production'),
        ),
        migrations.AddField(
            model_name='fsty_cad_chain_link',
            name='CAD_Chain_Link_layer',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='design_data.FSTY_CAD_Layer'),
        ),
    ]
