Exemple #1
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),
        ),
    ]
Exemple #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)),
            ],
        ),
    ]
Exemple #3
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',
            },
        ),
    ]
Exemple #4
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)),
            ],
        ),
    ]
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'),
        ),
    ]
Exemple #6
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='ConferenceList',
            fields=[
                ('conf_id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('conf_name', models.CharField(max_length=32)),
            ],
            options={
                'ordering': ('conf_id', ),
            },
        ),
        migrations.CreateModel(
            name='ConferenceLog',
            fields=[
                ('spoken_id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('timestamp', models.DateTimeField()),
                ('speaker_name', models.CharField(max_length=32)),
                ('text', models.TextField(blank=True)),
                ('conf_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='API.ConferenceList')),
            ],
            options={
                'ordering': ('timestamp', ),
            },
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('org_id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('org_name', models.CharField(max_length=32)),
                ('org_email', models.EmailField(max_length=254)),
                ('watson_user_id', models.CharField(blank=True,
                                                    max_length=36)),
                ('watson_user_pass', models.CharField(blank=True,
                                                      max_length=36)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('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')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('username',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='username')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('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')),
                ('org',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='API.Organization')),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', API.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='conferencelist',
            name='org_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='API.Organization'),
        ),
        migrations.AddField(
            model_name='conferencelist',
            name='speaker_list',
            field=models.ManyToManyField(to=settings.AUTH_USER_MODEL),
        ),
    ]
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'),
        ),
    ]