Exemplo n.º 1
0
class Migration(migrations.Migration):

    dependencies = [
        ('App', '0014_auto_20200305_2306'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('o_paymoney', models.FloatField(default=0)),
                ('o_create', models.DateTimeField(auto_now=True)),
                ('o_status', models.IntegerField(default=1)),
                ('o_user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.MZUser')),
            ],
            options={
                'db_table': 'mz_order',
            },
        ),
        migrations.CreateModel(
            name='OrderGoods',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('o_goods', models.FloatField(verbose_name=App.models.Goods)),
                ('o_goods_num', models.IntegerField(default=1)),
                ('o_platformordernumber', models.CharField(max_length=255)),
                ('o_extdata', models.CharField(max_length=128)),
                ('o_realmoney', models.FloatField(default=0)),
                ('o_order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.Order')),
            ],
            options={
                'db_table': 'mz_ordergoods',
            },
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('App', '0011_cart'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('o_price', models.FloatField(default=0)),
                ('o_time', models.DateTimeField(auto_now=True)),
                ('o_status', models.IntegerField(default=1)),
                ('o_user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.AXFUser')),
            ],
            options={
                'db_table': 'axf_order',
            },
        ),
        migrations.CreateModel(
            name='OrderGoods',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('o_goods', models.FloatField(verbose_name=App.models.Goods)),
                ('o_goods_num', models.IntegerField(default=1)),
                ('o_order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.Order')),
            ],
            options={
                'db_table': 'axf_ordergoods',
            },
        ),
    ]
Exemplo n.º 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('App', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Entry',
            fields=[
                ('_id',
                 djongo.models.fields.ObjectIdField(auto_created=True,
                                                    primary_key=True,
                                                    serialize=False)),
                ('blog',
                 djongo.models.fields.EmbeddedField(
                     model_container=App.models.Blog)),
                ('headline', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='UserDetail',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('UserId',
                 models.CharField(blank=True, default='', max_length=50)),
                ('FirstName',
                 models.CharField(blank=True, default='', max_length=50)),
                ('LastName',
                 models.CharField(blank=True, default='', max_length=50)),
                ('Password',
                 models.CharField(blank=True, default='', max_length=100)),
                ('Email', models.EmailField(blank=True, max_length=254)),
                ('SecurityQuestion',
                 models.CharField(blank=True, default='', max_length=150)),
                ('SecurityAnswer',
                 models.CharField(blank=True, default='', max_length=500)),
                ('profilePic',
                 models.ImageField(default='media/user.png',
                                   upload_to='media')),
                ('Gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female'),
                                           ('O', 'Other')],
                                  default='',
                                  max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Votes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('questionId', models.CharField(max_length=100)),
                ('userId', models.CharField(max_length=50)),
                ('voteType', models.IntegerField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='Questions',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('userId', models.CharField(max_length=50)),
                ('questionId', models.UUIDField(default=uuid.uuid4,
                                                unique=True)),
                ('question', models.TextField()),
                ('totalVotes', models.IntegerField(blank=True, default=0)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('User',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user',
                                   to='App.UserDetail')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='last name')),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date joined')),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='active')),
                ('is_staff',
                 models.BooleanField(default=False, verbose_name='staff')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', App.models.UserManager()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('App', '0015_auto_20200927_2212'),
    ]

    operations = [
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=63)),
                ('price',
                 models.DecimalField(decimal_places=2,
                                     default=0,
                                     max_digits=12)),
                ('quantity_measure',
                 models.CharField(choices=[('litre', 'Litre'),
                                           ('piece', 'Piece'),
                                           ('metre', 'Metre'),
                                           ('kilogram', 'Kilogram')],
                                  max_length=31)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='ProductCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=63)),
            ],
        ),
        migrations.CreateModel(
            name='ProductTrade',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('tradePrice',
                 models.DecimalField(decimal_places=2,
                                     default=0,
                                     max_digits=12)),
                ('sold_product_quantity',
                 models.DecimalField(decimal_places=2,
                                     default=0,
                                     max_digits=12)),
                ('dateTime', models.DateTimeField()),
                ('created_by',
                 models.ForeignKey(default=App.models.get_super_user,
                                   on_delete=models.SET(
                                       App.models.get_super_user),
                                   related_name='created_product_trades',
                                   to='App.member')),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='trades',
                                   to='App.product')),
            ],
        ),
        migrations.CreateModel(
            name='ProductCheckIn',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('checkin_product_quantity',
                 models.DecimalField(decimal_places=2,
                                     default=0,
                                     max_digits=12)),
                ('date', models.DateField()),
                ('created_by',
                 models.ForeignKey(default=App.models.get_super_user,
                                   on_delete=models.SET(
                                       App.models.get_super_user),
                                   related_name='created_product_checkins',
                                   to='App.member')),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='checkins',
                                   to='App.product')),
            ],
        ),
        migrations.AddField(
            model_name='product',
            name='category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='products',
                to='App.productcategory'),
        ),
        migrations.AddField(
            model_name='product',
            name='created_by',
            field=models.ForeignKey(default=App.models.get_super_user,
                                    on_delete=models.SET(
                                        App.models.get_super_user),
                                    related_name='created_products',
                                    to='App.member'),
        ),
    ]
Exemplo n.º 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('street_number',
                 models.IntegerField(verbose_name='Street Number')),
                ('street_name',
                 models.CharField(max_length=100, verbose_name='Street Name')),
                ('city', models.CharField(max_length=100,
                                          verbose_name='City')),
                ('state', models.CharField(max_length=50,
                                           verbose_name='State')),
                ('zip_code', models.IntegerField(verbose_name='Zip Code')),
            ],
        ),
        migrations.CreateModel(
            name='Class_Type',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200,
                                           verbose_name='Title')),
            ],
        ),
        migrations.CreateModel(
            name='Collaborator',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200,
                                          verbose_name='Name')),
            ],
        ),
        migrations.CreateModel(
            name='Collection',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200,
                                           verbose_name='Title')),
                ('month', models.CharField(max_length=200,
                                           verbose_name='Month')),
                ('code', models.CharField(max_length=200,
                                          verbose_name='Code')),
                ('collaborator',
                 models.ManyToManyField(to='App.Collaborator')),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('phone_number',
                 models.CharField(max_length=15, verbose_name='Phone Number')),
                ('email', models.CharField(max_length=50,
                                           verbose_name='Email')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Name')),
                ('address_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.Address')),
            ],
        ),
        migrations.CreateModel(
            name='Fabric',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200,
                                           verbose_name='Title')),
                ('code', models.CharField(max_length=200,
                                          verbose_name='Code')),
                ('content',
                 models.CharField(max_length=200, verbose_name='Content')),
                ('description',
                 models.CharField(max_length=200, verbose_name='Description')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('last_updated',
                 models.DateTimeField(blank=True,
                                      default=datetime.datetime.now,
                                      verbose_name='Last Updated')),
            ],
        ),
        migrations.CreateModel(
            name='LabelTag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200,
                                           verbose_name='Title')),
                ('description',
                 models.CharField(max_length=500, verbose_name='Description')),
                ('quantity', models.IntegerField(verbose_name='Quantity')),
                ('last_updated',
                 models.DateTimeField(blank=True,
                                      default=datetime.datetime.now,
                                      verbose_name='Last Updated')),
            ],
        ),
        migrations.CreateModel(
            name='Log_Entry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('entry_date',
                 models.DateTimeField(blank=True,
                                      default=datetime.datetime.now,
                                      verbose_name='Entry Date')),
                ('event', models.CharField(max_length=200,
                                           verbose_name='Event')),
            ],
        ),
        migrations.CreateModel(
            name='Notion',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100,
                                           verbose_name='Title')),
                ('description',
                 models.CharField(max_length=500, verbose_name='Description')),
                ('quantity', models.IntegerField(verbose_name='Quantity')),
                ('last_updated',
                 models.DateTimeField(blank=True,
                                      default=datetime.datetime.now,
                                      verbose_name='Last Update')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('order_date',
                 models.DateTimeField(blank=True,
                                      default=datetime.datetime.now,
                                      verbose_name='Order Date')),
                ('order_number',
                 models.IntegerField(verbose_name='Order Number')),
                ('originated_From',
                 models.CharField(max_length=200,
                                  verbose_name='Originated From')),
                ('order_status',
                 models.CharField(choices=[('completed', 'Completed'),
                                           ('pending', 'Pending')],
                                  default='pending',
                                  max_length=20,
                                  verbose_name='Order Status')),
                ('customer_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.Customer')),
            ],
        ),
        migrations.CreateModel(
            name='Pattern_Piece',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100,
                                           verbose_name='Title')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sku', models.CharField(max_length=200, verbose_name='SKU')),
                ('title', models.CharField(max_length=200,
                                           verbose_name='Title')),
                ('description',
                 models.CharField(max_length=500, verbose_name='Description')),
                ('image_path',
                 models.FileField(upload_to=App.models.get_upload_file_name)),
                ('tech_pack_path',
                 models.FileField(upload_to=App.models.get_upload_file_name)),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('collection_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.Collection')),
            ],
        ),
        migrations.CreateModel(
            name='Product_Fabric_Quantity',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.IntegerField(verbose_name='Quantity')),
                ('fabric',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.Fabric')),
            ],
        ),
        migrations.CreateModel(
            name='Product_Notion_Quantity',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.IntegerField(verbose_name='Quantity')),
                ('notion',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.Notion')),
            ],
        ),
        migrations.CreateModel(
            name='Product_Quantity',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.IntegerField(verbose_name='Quantity')),
                ('class_type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.Class_Type')),
                ('product_type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='App.Product')),
            ],
        ),
        migrations.CreateModel(
            name='Season',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200,
                                           verbose_name='Title')),
            ],
        ),
        migrations.CreateModel(
            name='Size',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('size', models.CharField(max_length=200,
                                          verbose_name='Size')),
                ('code', models.CharField(max_length=200,
                                          verbose_name='Code')),
            ],
        ),
        migrations.CreateModel(
            name='Style',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100,
                                           verbose_name='Title')),
                ('code', models.CharField(max_length=200,
                                          verbose_name='Code')),
                ('pattern_pieces',
                 models.ManyToManyField(to='App.Pattern_Piece')),
            ],
        ),
        migrations.CreateModel(
            name='Variation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100,
                                           verbose_name='Title')),
                ('code', models.CharField(max_length=200,
                                          verbose_name='Code')),
                ('pattern_pieces',
                 models.ManyToManyField(to='App.Pattern_Piece')),
            ],
        ),
        migrations.AddField(
            model_name='product',
            name='fabrics',
            field=models.ManyToManyField(to='App.Product_Fabric_Quantity'),
        ),
        migrations.AddField(
            model_name='product',
            name='label_tag',
            field=models.ManyToManyField(to='App.LabelTag'),
        ),
        migrations.AddField(
            model_name='product',
            name='notions',
            field=models.ManyToManyField(to='App.Product_Notion_Quantity'),
        ),
        migrations.AddField(
            model_name='product',
            name='style_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='App.Style'),
        ),
        migrations.AddField(
            model_name='product',
            name='variation_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='App.Variation'),
        ),
        migrations.AddField(
            model_name='order',
            name='product',
            field=models.ManyToManyField(to='App.Product_Quantity'),
        ),
        migrations.AddField(
            model_name='collection',
            name='season_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='App.Season'),
        ),
    ]