Beispiel #1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('system_requirements', models.TextField()),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=API.models.upload_update_image)),
                ('release_date', models.DateTimeField(blank=True, null=True)),
                ('digital', models.BooleanField(default=False)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Beispiel #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('API', '0002_compte'),
    ]

    operations = [
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email', models.CharField(max_length=100)),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=API.models.uploadPath)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('syndrom', models.CharField(max_length=100)),
            ],
        ),
    ]
Beispiel #3
0
class Migration(migrations.Migration):

    dependencies = [
        ('API', '0007_auto_20191125_1850'),
    ]

    operations = [
        migrations.CreateModel(
            name='LookbookImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('photo1',
                 models.ImageField(
                     upload_to=API.models.LookbookImage.date_upload_to)),
                ('modelName', models.CharField(max_length=100)),
                ('isMain', models.BooleanField()),
            ],
            options={
                'verbose_name': 'LookbookImage',
                'verbose_name_plural': 'LookbookImages',
                'db_table': 'API_LookbookImage',
            },
        ),
        migrations.AlterField(
            model_name='good',
            name='code',
            field=models.CharField(max_length=1288),
        ),
    ]
Beispiel #4
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Good',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=128, verbose_name='상품명')),
                ('photo1',
                 models.ImageField(upload_to=API.models.Good.date_upload_to)),
                ('photo2',
                 models.ImageField(upload_to=API.models.Good.date_upload_to)),
                ('price', models.IntegerField()),
                ('quantity', models.IntegerField()),
                ('code', models.CharField(max_length=128,
                                          verbose_name='상품코드')),
            ],
            options={
                'verbose_name': '상품',
                'verbose_name_plural': '상품들',
                'db_table': 'trackline_shop',
            },
        ),
    ]
Beispiel #5
0
class Migration(migrations.Migration):

    dependencies = [
        ('API', '0005_auto_20191117_2011'),
    ]

    operations = [
        migrations.CreateModel(
            name='MainpageImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('photo1', models.ImageField(upload_to=API.models.MainpageImage.date_upload_to)),
            ],
            options={
                'verbose_name': '상품',
                'verbose_name_plural': '상품들',
                'db_table': 'API_mainImage',
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creationDate', models.DateTimeField(default=django.utils.timezone.now)),
                ('leadText', models.TextField()),
                ('title', models.CharField(max_length=250)),
                ('image', models.ImageField(upload_to=API.models.Article.uploadLocation)),
                ('isPersian', models.BooleanField()),
            ],
        ),
        migrations.CreateModel(
            name='ArticlePart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.IntegerField(choices=[(2, 2), (1, 1)])),
                ('order', models.IntegerField()),
                ('title', models.CharField(max_length=250)),
                ('image', models.ImageField(blank=True, default=None, null=True, upload_to=API.models.ArticlePart.uploadLocation)),
                ('content', ckeditor.fields.RichTextField(blank=True, default=None, null=True)),
                ('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Article')),
            ],
        ),
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('publicPersianName', models.CharField(max_length=200)),
                ('publicName', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('persianName', models.CharField(max_length=200)),
                ('icon', models.ImageField(upload_to=API.models.Category.uploadLocation)),
            ],
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('author', models.OneToOneField(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='API.Author')),
                ('bookmarkedArticles', models.ManyToManyField(db_index=True, to='API.Article')),
                ('favoriteCategories', models.ManyToManyField(db_index=True, to='API.Category')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('persianName', models.CharField(max_length=200)),
                ('relatedTags', models.ManyToManyField(db_index=True, to='API.Tag')),
            ],
        ),
        migrations.AddField(
            model_name='article',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Author'),
        ),
        migrations.AddField(
            model_name='article',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='API.Category'),
        ),
        migrations.AddField(
            model_name='article',
            name='tags',
            field=models.ManyToManyField(db_index=True, related_name='articles', related_query_name='article', to='API.Tag'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('creationDate',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('leadText', models.TextField()),
                ('title', models.CharField(max_length=250)),
                ('image',
                 models.ImageField(
                     upload_to=API.models.Article.uploadLocation)),
                ('isPersian', models.BooleanField()),
                ('isBanner', models.BooleanField(default=False)),
                ('price', models.IntegerField(default=0)),
                ('published', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('publicPersianName', models.CharField(max_length=200)),
                ('publicName', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='BazarToken',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('accessToken', models.TextField(max_length=255)),
                ('refreshToken', models.CharField(max_length=255)),
                ('tokenType', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('persianName', models.CharField(max_length=200)),
                ('icon',
                 models.ImageField(
                     upload_to=API.models.Category.uploadLocation)),
            ],
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('author',
                 models.OneToOneField(
                     blank=True,
                     default=None,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='API.Author')),
                ('bookmarkedArticles',
                 models.ManyToManyField(blank=True,
                                        db_index=True,
                                        related_name='bookmarkers',
                                        to='API.Article')),
                ('favoriteCategories',
                 models.ManyToManyField(db_index=True, to='API.Category')),
                ('purchasedArticles',
                 models.ManyToManyField(blank=True,
                                        db_index=True,
                                        related_name='purchasers',
                                        to='API.Article')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Configs',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('monencoWebsite', models.CharField(max_length=200)),
                ('monencoWebsiteTitle', models.CharField(max_length=200)),
                ('persianMonencoWebsiteTitle',
                 models.CharField(max_length=200)),
                ('minCategorySelectCount', models.IntegerField()),
                ('shareFooter',
                 models.TextField(blank=True, default=None, null=True)),
                ('persianShareFooter',
                 models.TextField(blank=True, default=None, null=True)),
                ('aboutUs',
                 ckeditor.fields.RichTextField(blank=True,
                                               default=None,
                                               null=True)),
                ('persianAboutUs',
                 ckeditor.fields.RichTextField(blank=True,
                                               default=None,
                                               null=True)),
                ('cafeBazarCode',
                 models.CharField(blank=True, max_length=255, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('persianName', models.CharField(max_length=200)),
                ('relatedTags',
                 models.ManyToManyField(blank=True,
                                        db_index=True,
                                        to='API.Tag')),
            ],
        ),
        migrations.CreateModel(
            name='PurchaseBankID',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('authorityID', models.CharField(max_length=200)),
                ('platform', models.CharField(max_length=100)),
                ('article',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='API.Article')),
                ('client',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='API.Client')),
            ],
        ),
        migrations.CreateModel(
            name='ArticlePart',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('type',
                 models.IntegerField(choices=[(2,
                                               'Image Part'), (1,
                                                               'Text Part')])),
                ('order', models.FloatField()),
                ('title',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=250,
                                  null=True)),
                ('image',
                 models.ImageField(
                     blank=True,
                     default=None,
                     null=True,
                     upload_to=API.models.ArticlePart.uploadLocation)),
                ('content',
                 ckeditor.fields.RichTextField(blank=True,
                                               default=None,
                                               null=True)),
                ('article',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='API.Article')),
            ],
        ),
        migrations.AddField(
            model_name='article',
            name='author',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='API.Author'),
        ),
        migrations.AddField(
            model_name='article',
            name='category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='API.Category'),
        ),
        migrations.AddField(
            model_name='article',
            name='tags',
            field=models.ManyToManyField(blank=True,
                                         db_index=True,
                                         related_name='articles',
                                         related_query_name='article',
                                         to='API.Tag'),
        ),
    ]