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

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('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')),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Track',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('title', models.CharField(default='', max_length=200)),
                ('audio_file', models.FileField(blank=True, upload_to='')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('processed', models.BooleanField(default=False)),
                ('duration', models.IntegerField(blank=True, null=True)),
                ('output_format',
                 models.CharField(choices=[('MP3', 'MP3'), ('WAV', 'WAV')],
                                  default='WAV',
                                  max_length=10)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-updated_at'],
            },
        ),
        migrations.CreateModel(
            name='TTSService',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(default='', max_length=20)),
                ('provider',
                 models.CharField(choices=[('AMAZON POLLY', 'AMAZON POLLY'),
                                           ('GOOGLE_TTS', 'GOOGLE_TTS')],
                                  default='GOOGLE_TTS',
                                  max_length=50)),
                ('gender',
                 models.CharField(choices=[('MALE', 'MALE'),
                                           ('FEMALE', 'FEMALE')],
                                  default='MALE',
                                  max_length=20)),
                ('service_voice_model',
                 models.CharField(default='', max_length=200)),
                ('accent', models.CharField(default='', max_length=20)),
                ('language_code',
                 models.CharField(blank=True, default='', max_length=20)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='TrackText',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('time_marker', models.IntegerField(default=0)),
                ('text', models.CharField(max_length=2000)),
                ('audio_file', models.FileField(blank=True, upload_to='')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('processed', models.BooleanField(default=False)),
                ('duration',
                 models.IntegerField(blank=True, default=0, null=True)),
                ('track',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='writtenaudio.Track')),
                ('voice_profile',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='writtenaudio.TTSService')),
            ],
            options={
                'ordering': ['time_marker', 'track'],
            },
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("auth", "0011_update_proxy_permissions"),
    ]

    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",
                    ),
                ),
                (
                    "username",
                    models.CharField(
                        error_messages={
                            "unique":
                            "A user with that username already exists."
                        },
                        help_text=
                        "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
                        max_length=150,
                        unique=True,
                        validators=[
                            django.contrib.auth.validators.
                            UnicodeUsernameValidator()
                        ],
                        verbose_name="username",
                    ),
                ),
                (
                    "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"),
                ),
                (
                    "email",
                    models.EmailField(blank=True,
                                      max_length=254,
                                      verbose_name="email address"),
                ),
                (
                    "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"),
                ),
            ],
            options={
                "verbose_name": "user",
                "verbose_name_plural": "users",
                "db_table": "db_user",
                "abstract": False,
                "swappable": "AUTH_USER_MODEL",
            },
            managers=[
                ("objects", django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name="Artifact",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at",
                 models.DateTimeField(auto_now_add=True, db_index=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("state", models.UUIDField()),
                ("name", models.CharField(db_index=True, max_length=64)),
                (
                    "kind",
                    models.CharField(
                        choices=[
                            ("analysis", "analysis"),
                            ("audio", "audio"),
                            ("chart", "chart"),
                            ("coderef", "coderef"),
                            ("csv", "csv"),
                            ("curve", "curve"),
                            ("data", "data"),
                            ("dataframe", "dataframe"),
                            ("dir", "dir"),
                            ("docker_image", "docker_image"),
                            ("dockerfile", "dockerfile"),
                            ("env", "env"),
                            ("file", "file"),
                            ("histogram", "histogram"),
                            ("html", "html"),
                            ("image", "image"),
                            ("iteration", "iteration"),
                            ("markdown", "markdown"),
                            ("metric", "metric"),
                            ("model", "model"),
                            ("psv", "psv"),
                            ("ssv", "ssv"),
                            ("table", "table"),
                            ("tensor", "tensor"),
                            ("tensorboard", "tensorboard"),
                            ("text", "text"),
                            ("tsv", "tsv"),
                            ("video", "video"),
                        ],
                        db_index=True,
                        max_length=12,
                    ),
                ),
                ("path", models.CharField(blank=True,
                                          max_length=256,
                                          null=True)),
                ("summary", django.contrib.postgres.fields.jsonb.JSONField()),
            ],
            options={
                "db_table": "db_artifact",
            },
        ),
        migrations.CreateModel(
            name="ArtifactLineage",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at",
                 models.DateTimeField(auto_now_add=True, db_index=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("is_input", models.NullBooleanField(default=False)),
            ],
            options={
                "db_table": "db_artifactlineage",
            },
        ),
        migrations.CreateModel(
            name="Project",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at",
                 models.DateTimeField(auto_now_add=True, db_index=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("deleted", models.BooleanField(default=False)),
                ("description", models.TextField(blank=True, null=True)),
                ("readme", models.TextField(blank=True, null=True)),
                (
                    "tags",
                    django.contrib.postgres.fields.ArrayField(
                        base_field=models.CharField(max_length=64),
                        blank=True,
                        null=True,
                        size=None,
                    ),
                ),
                (
                    "uuid",
                    models.UUIDField(default=uuid.uuid4,
                                     editable=False,
                                     unique=True),
                ),
                (
                    "name",
                    models.CharField(
                        max_length=150,
                        unique=True,
                        validators=[
                            django.core.validators.RegexValidator(
                                re.compile("^[-a-zA-Z0-9_]+\\Z"),
                                "Enter a valid “slug” consisting of letters, numbers, underscores or hyphens.",
                                "invalid",
                            ),
                            polycommon.validation.blacklist.
                            validate_blacklist_name,
                        ],
                    ),
                ),
            ],
            options={
                "db_table": "db_project",
            },
        ),
        migrations.CreateModel(
            name="Run",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at",
                 models.DateTimeField(auto_now_add=True, db_index=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("deleted", models.BooleanField(default=False)),
                ("description", models.TextField(blank=True, null=True)),
                (
                    "name",
                    models.CharField(
                        blank=True,
                        default=None,
                        max_length=128,
                        null=True,
                        validators=[
                            django.core.validators.RegexValidator(
                                re.compile("^[-a-zA-Z0-9_]+\\Z"),
                                "Enter a valid “slug” consisting of letters, numbers, underscores or hyphens.",
                                "invalid",
                            ),
                            polycommon.validation.blacklist.
                            validate_blacklist_name,
                        ],
                    ),
                ),
                ("readme", models.TextField(blank=True, null=True)),
                (
                    "tags",
                    django.contrib.postgres.fields.ArrayField(
                        base_field=models.CharField(max_length=64),
                        blank=True,
                        null=True,
                        size=None,
                    ),
                ),
                (
                    "uuid",
                    models.UUIDField(default=uuid.uuid4,
                                     editable=False,
                                     unique=True),
                ),
                (
                    "is_managed",
                    models.BooleanField(
                        default=True,
                        help_text="If this entity is managed by the platform.",
                    ),
                ),
                ("started_at", models.DateTimeField(blank=True, null=True)),
                ("finished_at", models.DateTimeField(blank=True, null=True)),
                ("run_time", models.IntegerField(blank=True, null=True)),
                (
                    "raw_content",
                    models.TextField(
                        blank=True,
                        help_text=
                        "The raw yaml content of the polyaxonfile/specification.",
                        null=True,
                    ),
                ),
                (
                    "content",
                    models.TextField(
                        blank=True,
                        help_text=
                        "The compiled yaml content of the polyaxonfile/specification.",
                        null=True,
                    ),
                ),
                (
                    "status",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("compiled", "compiled"),
                            ("created", "created"),
                            ("done", "done"),
                            ("failed", "failed"),
                            ("on_schedule", "on_schedule"),
                            ("processing", "processing"),
                            ("queued", "queued"),
                            ("resuming", "resuming"),
                            ("retrying", "retrying"),
                            ("running", "running"),
                            ("scheduled", "scheduled"),
                            ("skipped", "skipped"),
                            ("starting", "starting"),
                            ("stopped", "stopped"),
                            ("stopping", "stopping"),
                            ("succeeded", "succeeded"),
                            ("unknown", "unknown"),
                            ("unschedulable", "unschedulable"),
                            ("upstream_failed", "upstream_failed"),
                            ("warning", "warning"),
                        ],
                        db_index=True,
                        default="created",
                        max_length=64,
                        null=True,
                    ),
                ),
                (
                    "status_conditions",
                    django.contrib.postgres.fields.jsonb.JSONField(
                        blank=True,
                        default=dict,
                        encoder=django.core.serializers.json.DjangoJSONEncoder,
                        null=True,
                    ),
                ),
                (
                    "kind",
                    models.CharField(
                        choices=[
                            ("cleaner", "cleaner"),
                            ("dag", "dag"),
                            ("dask", "dask"),
                            ("flink", "flink"),
                            ("job", "job"),
                            ("matrix", "matrix"),
                            ("mpijob", "mpijob"),
                            ("notifier", "notifier"),
                            ("pytorchjob", "pytorchjob"),
                            ("ray", "ray"),
                            ("schedule", "schedule"),
                            ("service", "service"),
                            ("spark", "spark"),
                            ("tfjob", "tfjob"),
                            ("tuner", "tuner"),
                            ("watchdog", "watchdog"),
                        ],
                        db_index=True,
                        max_length=12,
                    ),
                ),
                (
                    "meta_info",
                    django.contrib.postgres.fields.jsonb.JSONField(
                        blank=True, default=dict, null=True),
                ),
                (
                    "params",
                    django.contrib.postgres.fields.jsonb.JSONField(blank=True,
                                                                   null=True),
                ),
                (
                    "inputs",
                    django.contrib.postgres.fields.jsonb.JSONField(blank=True,
                                                                   null=True),
                ),
                (
                    "outputs",
                    django.contrib.postgres.fields.jsonb.JSONField(blank=True,
                                                                   null=True),
                ),
                (
                    "cloning_kind",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("cache", "cache"),
                            ("copy", "copy"),
                            ("restart", "restart"),
                        ],
                        max_length=12,
                        null=True,
                    ),
                ),
                (
                    "artifacts",
                    models.ManyToManyField(
                        blank=True,
                        related_name="runs",
                        through="coredb.ArtifactLineage",
                        to="coredb.Artifact",
                    ),
                ),
                (
                    "original",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="clones",
                        to="coredb.Run",
                    ),
                ),
                (
                    "project",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="runs",
                        to="coredb.Project",
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "db_table": "db_run",
            },
        ),
        migrations.AddIndex(
            model_name="project",
            index=models.Index(fields=["name"],
                               name="db_project_name_4bfc0e_idx"),
        ),
        migrations.AddField(
            model_name="artifactlineage",
            name="artifact",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="runs_lineage",
                to="coredb.Artifact",
            ),
        ),
        migrations.AddField(
            model_name="artifactlineage",
            name="run",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="artifacts_lineage",
                to="coredb.Run",
            ),
        ),
        migrations.AlterUniqueTogether(
            name="artifact",
            unique_together={("name", "state")},
        ),
        migrations.AddField(
            model_name="user",
            name="groups",
            field=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",
            ),
        ),
        migrations.AddField(
            model_name="user",
            name="user_permissions",
            field=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",
            ),
        ),
        migrations.AddIndex(
            model_name="run",
            index=models.Index(fields=["name"], name="db_run_name_47fc7c_idx"),
        ),
        migrations.AlterUniqueTogether(
            name="artifactlineage",
            unique_together={("run", "artifact", "is_input")},
        ),
    ]
Exemplo n.º 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='HotelInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone', models.CharField(max_length=11)),
                ('address', models.CharField(max_length=128)),
                ('desc', models.CharField(max_length=150)),
                ('web', models.IntegerField(choices=[(0, '无'), (1, '有')], default=0)),
                ('service', models.TextField(max_length=150)),
                ('inquerment', models.TextField(max_length=100)),
            ],
            options={
                'db_table': 'hotel_info',
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('check_in_time', models.DateTimeField()),
                ('check_out_time', models.DateTimeField()),
                ('username', models.CharField(max_length=30, null=True)),
                ('user_nums', models.IntegerField(default=1)),
                ('order_room_num', models.IntegerField(default=1)),
                ('last_in_time', models.DateTimeField()),
                ('phone', models.CharField(max_length=11)),
                ('price', models.FloatField()),
                ('create_time', models.DateTimeField(auto_now_add=True)),
                ('order_status', models.IntegerField(default=0)),
            ],
            options={
                'db_table': 'hotel_order',
            },
        ),
        migrations.CreateModel(
            name='Reflex',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=60, null=True)),
                ('create_time', models.DateTimeField(auto_now_add=True)),
                ('level', models.IntegerField(choices=[(0, '吐槽'), (1, '差'), (2, '一般'), (3, '很满意'), (4, '强烈推荐')], default=2)),
                ('content', models.TextField(max_length=150)),
                ('score', models.FloatField(default=6.0)),
                ('order', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='orderid', to='App.Order')),
            ],
            options={
                'db_table': 'hotel_reflex',
            },
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('room_status', models.IntegerField(choices=[(0, '预定'), (1, '入住'), (2, '空闲')], default=2)),
            ],
            options={
                'db_table': 'hotel_room',
            },
        ),
        migrations.CreateModel(
            name='RoomStyle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('style', models.IntegerField(default=0)),
                ('size', models.IntegerField()),
                ('num', models.IntegerField(default=10)),
                ('iswindow', models.IntegerField(choices=[(0, '无'), (1, '有')])),
                ('iswifi', models.IntegerField(choices=[(0, '无'), (1, '有')])),
                ('bathroom', models.IntegerField(choices=[(0, '无'), (1, '有')])),
                ('breakfast', models.IntegerField(choices=[(0, '无'), (1, '有')])),
                ('desc', models.TextField(max_length=100)),
                ('dorprice', models.FloatField()),
                ('webprice', models.FloatField()),
                ('huiyuanprice', models.FloatField()),
            ],
            options={
                'db_table': 'hotel_roomstyle',
            },
        ),
        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')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('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')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('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')),
                ('uid', models.AutoField(primary_key=True, serialize=False)),
                ('phone', models.CharField(max_length=11, null=True)),
                ('realname', models.CharField(max_length=60)),
                ('usertype', models.IntegerField(default=0, null=True)),
                ('regtime', models.DateField(auto_now_add=True)),
                ('pict', models.CharField(max_length=128, null=True)),
                ('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={
                'db_table': 'hotel_user',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='room',
            name='typeid',
            field=models.ForeignKey(db_column='roomstyleid', on_delete=django.db.models.deletion.CASCADE, related_name='type', to='App.RoomStyle'),
        ),
        migrations.AddField(
            model_name='order',
            name='room',
            field=models.OneToOneField(db_column='roomstyle', on_delete=django.db.models.deletion.CASCADE, to='App.RoomStyle'),
        ),
        migrations.AddField(
            model_name='order',
            name='user_id',
            field=models.ForeignKey(db_column='user_id', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user', to=settings.AUTH_USER_MODEL),
        ),
    ]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('is_candidat', models.BooleanField(default=False)),
                ('is_recruteur', models.BooleanField(default=False)),
                ('email', models.EmailField(max_length=50, unique=True)),
                ('accepted_cgu',
                 models.BooleanField(blank=True, default=False, null=True)),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='AdresseEntreprise',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('numero', models.TextField()),
                ('text', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Candidat',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='candidat',
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('nom_metier', models.TextField(max_length=250)),
                ('zone_recherche', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Entreprise',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ville', models.TextField()),
                ('departement', models.TextField()),
                ('numero_departement', models.IntegerField()),
                ('code_postal', models.TextField()),
                ('adresse',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='adresse',
                     to='user.AdresseEntreprise')),
            ],
        ),
        migrations.CreateModel(
            name='Recruteur',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='recruteur',
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('nom_entreprise',
                 models.TextField(default='none', max_length=250)),
                ('poste_entreprise',
                 models.TextField(default='none', max_length=250)),
                ('numero', models.IntegerField(default=0)),
                ('pays', models.TextField(default='France', max_length=250)),
                ('entreprise',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='recruteur_entreprise',
                     to='user.Entreprise')),
            ],
        ),
    ]
Exemplo n.º 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_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')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('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')),
                ('phone', models.CharField(max_length=11, validators=[django.core.validators.MinLengthValidator(11)])),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message', models.TextField()),
                ('to_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notification_to_user', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Score',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.IntegerField(validators=[django.core.validators.MaxValueValidator(100), django.core.validators.MinValueValidator(1)])),
                ('from_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='score_from_user', to=settings.AUTH_USER_MODEL)),
                ('to_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='score_to_user', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('from_user', 'to_user')},
            },
        ),
        migrations.CreateModel(
            name='Report',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField(max_length=255)),
                ('from_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='report_from_user', to=settings.AUTH_USER_MODEL)),
                ('to_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='report_to_user', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('from_user', 'to_user')},
            },
        ),
        migrations.CreateModel(
            name='Favorite',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('from_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='favorite_from_user', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('from_user',)},
            },
        ),
    ]
Exemplo n.º 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("auth", "0012_alter_user_first_name_max_length"),
    ]

    operations = [
        migrations.CreateModel(
            name="CustomUser",
            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",
                    ),
                ),
                (
                    "username",
                    models.CharField(
                        error_messages={
                            "unique": "A user with that username already exists."
                        },
                        help_text="Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
                        max_length=150,
                        unique=True,
                        validators=[
                            django.contrib.auth.validators.UnicodeUsernameValidator()
                        ],
                        verbose_name="username",
                    ),
                ),
                (
                    "first_name",
                    models.CharField(
                        blank=True, max_length=150, verbose_name="first name"
                    ),
                ),
                (
                    "last_name",
                    models.CharField(
                        blank=True, max_length=150, verbose_name="last name"
                    ),
                ),
                (
                    "email",
                    models.EmailField(
                        blank=True, max_length=254, verbose_name="email address"
                    ),
                ),
                (
                    "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"
                    ),
                ),
                (
                    "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",
                "abstract": False,
            },
            managers=[
                ("objects", django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name="Sprint",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("start_date", models.DateTimeField(auto_now_add=True)),
                ("end_date", models.DateTimeField()),
                ("is_active", models.BooleanField(default=True)),
            ],
            options={
                "ordering": ["created"],
            },
        ),
        migrations.CreateModel(
            name="UserProfile",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("sprint_length_days", models.IntegerField(default=14)),
                (
                    "user",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["created"],
            },
        ),
        migrations.CreateModel(
            name="Virtue",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("title", models.CharField(max_length=100)),
                ("description", models.CharField(max_length=200)),
                ("level", models.IntegerField(default=1)),
                ("xp", models.IntegerField(default=1)),
                ("xp_to_next_level", models.IntegerField(default=3)),
                ("xp_to_next_level_constant", models.FloatField(default=3.0)),
                ("level_up_xp_modifier", models.FloatField(default=0.05)),
                (
                    "user_profile",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="virtues",
                        to="dashboard.userprofile",
                    ),
                ),
            ],
            options={
                "ordering": ["level"],
            },
        ),
        migrations.CreateModel(
            name="Topic",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("title", models.CharField(max_length=100)),
                ("description", models.CharField(max_length=200)),
                (
                    "virtue",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="topics",
                        to="dashboard.virtue",
                    ),
                ),
            ],
            options={
                "ordering": ["created"],
            },
        ),
        migrations.CreateModel(
            name="Task",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("completed", models.DateTimeField(blank=True, null=True)),
                ("title", models.CharField(max_length=100)),
                ("description", models.CharField(max_length=200)),
                ("notes", models.TextField(blank=True, null=True)),
                ("xp", models.IntegerField(default=1)),
                ("is_active", models.BooleanField(default=True)),
                (
                    "topic",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tasks",
                        to="dashboard.topic",
                    ),
                ),
                (
                    "virtue",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tasks",
                        to="dashboard.virtue",
                    ),
                ),
            ],
            options={
                "ordering": ["created"],
            },
        ),
        migrations.CreateModel(
            name="SprintVirtueTally",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("total_xp", models.IntegerField(default=0)),
                ("tasks_completed", models.IntegerField(default=0)),
                (
                    "sprint",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="dashboard.sprint",
                    ),
                ),
                (
                    "virtue",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="dashboard.virtue",
                    ),
                ),
            ],
            options={
                "ordering": ["created"],
            },
        ),
        migrations.AddField(
            model_name="sprint",
            name="user_profile",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="sprints",
                to="dashboard.userprofile",
            ),
        ),
        migrations.AddField(
            model_name="sprint",
            name="virtue_theme",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="dashboard.virtue",
            ),
        ),
    ]
Exemplo n.º 7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    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')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('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')),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('role', models.CharField(choices=[('user', 'User'), ('moderator', 'Moderator'), ('admin', 'Admin')], default='user', max_length=255)),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        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)),
                ('slug', models.SlugField(unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('slug', models.SlugField(unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Title',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('year', models.IntegerField(blank=True, null=True)),
                ('description', models.TextField(blank=True)),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='titles', to='api.Category')),
                ('genre', models.ManyToManyField(blank=True, related_name='titles', to='api.Genre')),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('score', models.FloatField(validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(10.0)])),
                ('pub_date', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='review pub date')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviews', to=settings.AUTH_USER_MODEL)),
                ('title', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviews', to='api.Title')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('pub_date', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='comment pub date')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to=settings.AUTH_USER_MODEL)),
                ('review', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='api.Review')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('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')),
                ('name', models.CharField(max_length=300)),
                ('is_admin', models.BooleanField(default=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')),
                ('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', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Account',
            fields=[
                ('upi_id',
                 models.CharField(max_length=50,
                                  primary_key=True,
                                  serialize=False)),
                ('account_holder', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Brand',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('min_quantity', models.IntegerField(default=0)),
                ('max_quantity', models.IntegerField()),
                ('price_per_item', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Form',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('status',
                 models.CharField(choices=[('LIVE', 'LIVE'),
                                           ('CLOSED', 'CLOSED'),
                                           ('DONE', 'DONE')],
                                  max_length=10,
                                  null=True)),
                ('description', models.TextField()),
                ('close_date', models.DateTimeField(null=True)),
                ('expected_delivery_date', models.DateTimeField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('description', models.CharField(max_length=500)),
                ('brand',
                 models.ManyToManyField(to='essentials_kit_management.Brand')),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('transaction_id',
                 models.IntegerField(primary_key=True, serialize=False)),
                ('date', models.DateTimeField(auto_now=True)),
                ('amount', models.IntegerField(default=0)),
                ('status',
                 models.CharField(choices=[('APPROVED', 'APPROVED'),
                                           ('PENDING', 'PENDING'),
                                           ('REJECTED', 'REJECTED')],
                                  default='PENDING',
                                  max_length=50)),
                ('transaction_type',
                 models.CharField(choices=[('PHONE_PAY', 'PHONE_PAY'),
                                           ('GOOGLE_PAY', 'GOOGLE_PAY'),
                                           ('PAYTM', 'PAYTM')],
                                  max_length=50)),
                ('screen_shot', models.TextField()),
                ('remark', models.CharField(max_length=100)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Section',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('description', models.TextField()),
                ('items',
                 models.ManyToManyField(to='essentials_kit_management.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('count', models.IntegerField(default=0)),
                ('pending_count', models.IntegerField()),
                ('out_of_stock', models.IntegerField()),
                ('brand',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='essentials_kit_management.Brand')),
                ('form',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='essentials_kit_management.Form')),
                ('item',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='essentials_kit_management.Item')),
                ('section',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='essentials_kit_management.Section')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='form',
            name='sections',
            field=models.ManyToManyField(
                to='essentials_kit_management.Section'),
        ),
    ]
Exemplo n.º 9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('pet_name',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='昵称')),
                ('phone',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='手机号')),
                ('email',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='邮箱')),
                ('avatar',
                 models.FileField(default='avatars/default.png',
                                  upload_to='avatars/')),
                ('brithday', models.DateField(null=True, verbose_name='生日')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('experience', models.IntegerField(default=0)),
                ('level', models.IntegerField(default=0)),
                ('gold', models.IntegerField(default=20)),
                ('area',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='地区')),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Article',
            fields=[
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=50,
                                           verbose_name='文章标题')),
                ('abstract',
                 models.CharField(max_length=200, verbose_name='文章摘要')),
                ('desc', models.CharField(max_length=10000,
                                          verbose_name='文章描述')),
                ('group_cover',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='封面图')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('content', models.TextField()),
                ('comment_count', models.IntegerField(default=0)),
                ('up_count', models.IntegerField(default=0)),
                ('down_count', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=32,
                                           verbose_name='分类标题')),
            ],
        ),
        migrations.CreateModel(
            name='Profession',
            fields=[
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('profession',
                 models.CharField(max_length=32, verbose_name='行业')),
            ],
            options={
                'db_table': 'wechat_wechat_profession',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=32,
                                           verbose_name='标签名称')),
            ],
        ),
        migrations.CreateModel(
            name='Topic',
            fields=[
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('profession',
                 models.CharField(max_length=32, verbose_name='标题')),
            ],
            options={
                'db_table': 'wechat_wechat_topic',
            },
        ),
        migrations.CreateModel(
            name='WechatGroup',
            fields=[
                ('profession',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='行业')),
                ('area',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='地区')),
                ('nik_name',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='名称')),
                ('tag',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='标签')),
                ('phone',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='联系人电话')),
                ('qq',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='联系人qq号')),
                ('avatars',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='头像')),
                ('qrc',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='群二维码')),
                ('introduce',
                 models.CharField(max_length=10000,
                                  null=True,
                                  verbose_name='介绍')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('type',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='类别(微信红包,普通)')),
                ('master_wechat_account',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='群主微信号')),
                ('link',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='联系人')),
                ('stataus',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='状态')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='作者')),
            ],
            options={
                'db_table': 'wechat_wechatgroup',
            },
        ),
        migrations.CreateModel(
            name='Stroy',
            fields=[
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=50, verbose_name='标题')),
                ('desc', models.CharField(max_length=1000, verbose_name='内容')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='作者')),
            ],
            options={
                'db_table': 'wechat_story',
            },
        ),
        migrations.CreateModel(
            name='SellWechatGroup',
            fields=[
                ('profession',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='行业')),
                ('area',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='地区')),
                ('nik_name',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='名称')),
                ('tag',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='标签')),
                ('phone',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='联系人电话')),
                ('qq',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='联系人qq号')),
                ('avatars',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='头像')),
                ('qrc',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='群二维码')),
                ('introduce',
                 models.CharField(max_length=10000,
                                  null=True,
                                  verbose_name='介绍')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('p_count',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='人数')),
                ('price',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='价格')),
                ('master_wechat_account',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='群主微信号')),
                ('group_cover',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='群封面')),
                ('master_wechat_qrc',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='群主微信二维码')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='作者')),
            ],
            options={
                'db_table': 'wechat_sellwechatgroup',
            },
        ),
        migrations.CreateModel(
            name='SelfWechat',
            fields=[
                ('profession',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='行业')),
                ('area',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='地区')),
                ('nik_name',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='名称')),
                ('tag',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='标签')),
                ('phone',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='联系人电话')),
                ('qq',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='联系人qq号')),
                ('avatars',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='头像')),
                ('qrc',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='群二维码')),
                ('introduce',
                 models.CharField(max_length=10000,
                                  null=True,
                                  verbose_name='介绍')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('brithday',
                 models.DateField(auto_now_add=True, verbose_name='生日')),
                ('wechat',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='卖点介绍')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='作者')),
            ],
            options={
                'db_table': 'wechat_selfwechat',
            },
        ),
        migrations.CreateModel(
            name='PublicWechat',
            fields=[
                ('profession',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='行业')),
                ('area',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='地区')),
                ('nik_name',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='名称')),
                ('tag',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='标签')),
                ('phone',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='联系人电话')),
                ('qq',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='联系人qq号')),
                ('avatars',
                 models.CharField(max_length=200, null=True,
                                  verbose_name='头像')),
                ('qrc',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='群二维码')),
                ('introduce',
                 models.CharField(max_length=10000,
                                  null=True,
                                  verbose_name='介绍')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('wehcat_id',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='公众号id')),
                ('group_cover',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='群封面')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='作者')),
            ],
            options={
                'db_table': 'wechat_publicwechat',
            },
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=50, verbose_name='图片名')),
                ('desc', models.CharField(max_length=255,
                                          verbose_name='图片描述')),
                ('type', models.CharField(max_length=50, verbose_name='分类')),
                ('src', models.CharField(max_length=50, verbose_name='路径')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='作者')),
            ],
            options={
                'db_table': 'wechat_image',
            },
        ),
        migrations.CreateModel(
            name='Article2Tag',
            fields=[
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('article',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='wechat.Article',
                                   verbose_name='文章')),
                ('tag',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='wechat.Tag',
                                   verbose_name='标签')),
            ],
            options={
                'unique_together': {('article', 'tag')},
            },
        ),
        migrations.AddField(
            model_name='article',
            name='category',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='wechat.Category'),
        ),
        migrations.AddField(
            model_name='article',
            name='tags',
            field=models.ManyToManyField(through='wechat.Article2Tag',
                                         to='wechat.Tag'),
        ),
        migrations.AddField(
            model_name='article',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='作者'),
        ),
        migrations.CreateModel(
            name='Advert',
            fields=[
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=50,
                                           verbose_name='品牌标题')),
                ('goodness',
                 models.CharField(max_length=500, verbose_name='品牌优势')),
                ('desc', models.CharField(max_length=500,
                                          verbose_name='品牌描述')),
                ('qrc', models.CharField(max_length=500,
                                         verbose_name='微信号二维码')),
                ('wechat', models.CharField(max_length=500,
                                            verbose_name='微信号')),
                ('link', models.CharField(max_length=500, verbose_name='联系人')),
                ('phone', models.CharField(max_length=500, verbose_name='电话')),
                ('qq', models.CharField(max_length=500, verbose_name='qq')),
                ('create_time',
                 models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='作者')),
            ],
            options={
                'db_table': 'wechat_advert',
            },
        ),
    ]
Exemplo n.º 10
0
class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
        ('study', '0002_auto_20190709_1801'),
    ]

    operations = [
        migrations.CreateModel(
            name='ApplicationForm',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='CourseSession',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('started_at', models.DateField()),
                ('status',
                 models.CharField(choices=[('planned', 'Planned'),
                                           ('in_progress', 'In progress'),
                                           ('finished', 'Finished'),
                                           ('cancelled', 'Cancelled')],
                                  max_length=11)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='study.Course')),
            ],
        ),
        migrations.CreateModel(
            name='Participant',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('role',
                 models.CharField(choices=[('student', 'Student'),
                                           ('trainer', 'Trainer'),
                                           ('expert', 'Expert'),
                                           ('admin', 'Admin')],
                                  max_length=7)),
                ('status',
                 models.CharField(choices=[('possible', 'Possible'),
                                           ('active', 'Active'),
                                           ('lost', 'Lost')],
                                  max_length=8)),
                ('score', models.IntegerField()),
                ('course_session',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='study.CourseSession')),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('user_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('country', models.CharField(max_length=100)),
                ('city', models.CharField(max_length=100)),
                ('language',
                 models.CharField(choices=[('ru', 'Russian'),
                                           ('en', 'English'),
                                           ('ua', 'Ukrainian')],
                                  max_length=2)),
                ('skype', models.CharField(max_length=100)),
                ('google_account', models.CharField(max_length=100)),
                ('github_account', models.CharField(max_length=100)),
                ('phone', models.CharField(max_length=20)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('auth.user', ),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AlterField(
            model_name='author',
            name='user',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                to='study.UserProfile'),
        ),
        migrations.DeleteModel(name='Profile', ),
        migrations.AddField(
            model_name='participant',
            name='user_profile',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                to='study.UserProfile'),
        ),
        migrations.AddField(
            model_name='applicationform',
            name='course_session',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='study.CourseSession'),
        ),
        migrations.AddField(
            model_name='applicationform',
            name='user_profile',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.PROTECT,
                to='study.UserProfile'),
        ),
        migrations.AlterUniqueTogether(
            name='participant',
            unique_together={('course_session', 'user_profile', 'role')},
        ),
    ]
Exemplo n.º 11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    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')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('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')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('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')),
                ('timezone1', timezone_field.fields.TimeZoneField(default='Europe/London')),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(blank=True, max_length=250, null=True, unique=True, verbose_name='Category')),
            ],
            options={
                'verbose_name': 'Category',
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='user_images')),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('figure', models.ImageField(blank=True, null=True, upload_to='uploads/%Y/%m/%d', verbose_name='Figure')),
                ('session_slide', models.IntegerField(blank=True, default=0, null=True, verbose_name='session_slide')),
                ('is_slide', models.BooleanField(default=False, verbose_name='is_slide')),
                ('content', models.CharField(help_text='Enter the question text that you want displayed', max_length=1000, null=True, verbose_name='Question')),
                ('explanation', models.TextField(blank=True, help_text='Explanation to be shown after the question has been answered.', max_length=2000, null=True, verbose_name='Explanation')),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='quiz.Category', verbose_name='Category')),
            ],
            options={
                'verbose_name': 'Question',
                'verbose_name_plural': 'Questions',
                'ordering': ['category'],
            },
        ),
        migrations.CreateModel(
            name='Quiz',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=60, verbose_name='Title')),
                ('description', models.TextField(blank=True, help_text='a description of the quiz', verbose_name='Description')),
                ('url', models.SlugField(help_text='a user friendly url', max_length=60, verbose_name='user friendly url')),
                ('random_order', models.BooleanField(default=False, help_text='Display the questions in a random order or as they are set?', verbose_name='Random Order')),
                ('max_questions', models.PositiveIntegerField(blank=True, help_text='Number of questions to be answered on each attempt.', null=True, verbose_name='Max Questions')),
                ('answers_at_end', models.BooleanField(default=False, help_text='Correct answer is NOT shown after question. Answers displayed at the end.', verbose_name='Answers at end')),
                ('exam_mode', models.BooleanField(default=False, help_text='Exam result show.Progress Report show.', verbose_name='Exam mode')),
                ('e_learning', models.BooleanField(default=False, help_text='E Learning .', verbose_name='e_learning')),
                ('single_attempt', models.BooleanField(default=False, help_text='If yes, only one attempt by a user will be permitted. Non users cannot sit this exam.', verbose_name='Single Attempt')),
                ('pass_mark', models.SmallIntegerField(blank=True, default=0, help_text='Percentage required to pass exam.', validators=[django.core.validators.MaxValueValidator(100)], verbose_name='Pass Mark')),
                ('success_text', models.TextField(blank=True, help_text='Displayed if user passes.', verbose_name='Success Text')),
                ('fail_text', models.TextField(blank=True, help_text='Displayed if user fails.', verbose_name='Fail Text')),
                ('draft', models.BooleanField(blank=True, default=False, help_text='If yes, the quiz is not displayed in the quiz list and can only be taken by users who can edit quizzes.', verbose_name='Draft')),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='quiz.Category', verbose_name='Category')),
            ],
            options={
                'verbose_name': 'Quiz',
                'verbose_name_plural': 'Quizzes',
            },
        ),
        migrations.CreateModel(
            name='UQuestion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attempt_question', models.IntegerField(blank=True, null=True, verbose_name='attemp_questions')),
                ('correct_answer', models.IntegerField(blank=True, null=True, verbose_name='correct_answer')),
                ('wrong_answer_date', models.CharField(blank=True, max_length=1024, null=True, verbose_name='wrong_answer_date')),
                ('date_of_next_rep', models.CharField(blank=True, max_length=1024, null=True, verbose_name='date time fields')),
                ('question_taken_date', models.CharField(blank=True, max_length=1024, null=True, verbose_name='attemp question time')),
                ('today_wrong_answer', models.IntegerField(blank=True, null=True, verbose_name='today_wrong_answer')),
                ('questions', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='user_questions', to='quiz.Question', verbose_name='Questio')),
                ('quiz', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='user_questions', to='quiz.Quiz', verbose_name='Quiz1')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='user_questions', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'verbose_name': 'User Question',
                'verbose_name_plural': 'User question records',
            },
        ),
        migrations.CreateModel(
            name='SubCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sub_category', models.CharField(blank=True, max_length=250, null=True, verbose_name='Sub-Category')),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='quiz.Category', verbose_name='Category')),
            ],
            options={
                'verbose_name': 'Sub-Category',
                'verbose_name_plural': 'Sub-Categories',
            },
        ),
        migrations.CreateModel(
            name='Sitting',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_order', models.CharField(max_length=1024, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z'), code='invalid', message='Enter only digits separated by commas.')], verbose_name='Question Order')),
                ('question_list', models.CharField(max_length=1024, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z'), code='invalid', message='Enter only digits separated by commas.')], verbose_name='Question List')),
                ('incorrect_questions', models.CharField(blank=True, max_length=1024, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z'), code='invalid', message='Enter only digits separated by commas.')], verbose_name='Incorrect questions')),
                ('current_score', models.IntegerField(verbose_name='Current Score')),
                ('complete', models.BooleanField(default=False, verbose_name='Complete')),
                ('user_answers', models.TextField(blank=True, default='{}', verbose_name='User Answers')),
                ('start', models.DateTimeField(auto_now_add=True, verbose_name='Start')),
                ('end', models.DateTimeField(blank=True, null=True, verbose_name='End')),
                ('quiz', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='quiz.Quiz', verbose_name='Quiz')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'permissions': (('view_sittings', 'Can see completed exams.'),),
            },
        ),
        migrations.AddField(
            model_name='question',
            name='quiz',
            field=models.ManyToManyField(blank=True, to='quiz.Quiz', verbose_name='Quiz'),
        ),
        migrations.AddField(
            model_name='question',
            name='sub_category',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='quiz.SubCategory', verbose_name='Sub-Category'),
        ),
        migrations.CreateModel(
            name='Progress',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.CharField(max_length=1024, validators=[django.core.validators.RegexValidator(re.compile('^\\d+(?:\\,\\d+)*\\Z'), code='invalid', message='Enter only digits separated by commas.')], verbose_name='Score')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'verbose_name': 'User Progress',
                'verbose_name_plural': 'User progress records',
            },
        ),
        migrations.CreateModel(
            name='PersonalizedQuiz',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('max_questions', models.CharField(blank=True, max_length=1024, null=True, verbose_name='max_questionss')),
                ('repeat_questions', models.CharField(blank=True, max_length=1024, null=True, verbose_name='repeat_questions')),
                ('previous_question_list', models.CharField(blank=True, max_length=1024, null=True, verbose_name='Previous Question List')),
                ('rember', models.CharField(blank=True, default=0, max_length=24, null=True, verbose_name='rember')),
                ('total_new_question', models.CharField(blank=True, default=0, max_length=24, null=True, verbose_name='total_new_question')),
                ('total_repeat', models.CharField(blank=True, default=0, max_length=24, null=True, verbose_name='total_repeat')),
                ('question_attemp', models.IntegerField(blank=True, default=0, null=True, verbose_name='question_attemp')),
                ('question_repe', models.IntegerField(blank=True, default=0, null=True, verbose_name='question_repe')),
                ('correction', models.IntegerField(blank=True, default=0, null=True, verbose_name='correction')),
                ('rember_questions', models.IntegerField(blank=True, default=0, null=True, verbose_name='rember_questions')),
                ('tempory_questions', models.IntegerField(blank=True, default=0, null=True, verbose_name='tempory_questions')),
                ('session_time', models.CharField(blank=True, max_length=1024, null=True, verbose_name='session_time')),
                ('timers', models.IntegerField(blank=True, default=600, null=True, verbose_name='timers')),
                ('session', models.IntegerField(blank=True, default=0, null=True, verbose_name='session')),
                ('quiz', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='personalized_quizes', to='quiz.Quiz', verbose_name='Quiz')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='personalized_quizes', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
        ),
    ]
Exemplo n.º 12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    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')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('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')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(blank=True, max_length=500)),
                ('is_active', models.BooleanField(default=True)),
                ('date_joined', models.DateTimeField(auto_now_add=True)),
                ('how_many_sent_packages', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='ContactForm',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=30)),
                ('company_name', models.CharField(max_length=30)),
                ('email', models.EmailField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Package',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, help_text='Enter a brief description', max_length=1000, null=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('users', models.ManyToManyField(blank=True, related_name='users_package', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.IntegerField()),
                ('title', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, help_text='Enter a brief description', max_length=1500, null=True)),
                ('link', models.URLField(blank=True, null=True)),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('package', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='onboarding.Package')),
            ],
        ),
        migrations.CreateModel(
            name='Section',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.IntegerField()),
                ('title', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, help_text='Enter a brief description', max_length=1500, null=True)),
                ('link', models.URLField(blank=True, null=True)),
                ('data', django.contrib.postgres.fields.jsonb.JSONField()),
                ('type', models.CharField(blank=True, choices=[('msa', 'Multi select answer'), ('osa', 'One select answer'), ('oa', 'Open answer')], default='msa', help_text='Answer type', max_length=3)),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='onboarding.Page')),
            ],
        ),
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', django.contrib.postgres.fields.jsonb.JSONField()),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('section', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='onboarding.Section')),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='company',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='onboarding.Company'),
        ),
        migrations.AddField(
            model_name='user',
            name='groups',
            field=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'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=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'),
        ),
    ]
Exemplo n.º 13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
        ('taggit', '0003_taggeditem_add_unique_index'),
    ]

    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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('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')),
                ('phoneno', models.CharField(max_length=20)),
                ('favorites', models.CharField(max_length=1000)),
                ('address',
                 models.CharField(default='No address', max_length=200)),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=500)),
                ('address', models.CharField(max_length=500)),
                ('town', models.CharField(max_length=100)),
                ('phoneno', models.CharField(max_length=20)),
                ('email', models.CharField(max_length=50)),
                ('delivered', models.BooleanField(default=False)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('total_price',
                 models.DecimalField(decimal_places=2,
                                     default=0,
                                     max_digits=10)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Commodity',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=500)),
                ('qty_avail', models.IntegerField()),
                ('price', models.DecimalField(decimal_places=2, max_digits=4)),
                ('formerprice',
                 models.DecimalField(decimal_places=2, max_digits=4)),
                ('description', models.TextField()),
                ('colors', models.CharField(max_length=1000)),
                ('sizes', models.CharField(max_length=1000)),
                ('picture1', models.FileField(upload_to='')),
                ('picture2', models.FileField(upload_to='')),
                ('picture3', models.FileField(upload_to='')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('tags',
                 taggit.managers.TaggableManager(
                     help_text='A comma-separated list of tags.',
                     through='taggit.TaggedItem',
                     to='taggit.Tag',
                     verbose_name='Tags')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('color', models.CharField(max_length=1000)),
                ('size', models.CharField(max_length=1000)),
                ('quantity', models.IntegerField(default=1)),
                ('cart',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='index.Cart')),
                ('commodity',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='index.Commodity')),
            ],
        ),
    ]
Exemplo n.º 14
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='MyUser',
            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')),
                ('username',
                 models.CharField(
                     help_text=
                     'Tələb olunur. 75 simvol və ya az. Hərflər, Rəqəmlər və @/./+/-/_ simvollar.',
                     max_length=100,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[\\w.@+-]+$',
                             'Düzgün istifadəçi adı daxil edin.', 'yanlışdır')
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(max_length=255,
                                   verbose_name='email address')),
                ('profile_picture',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=base_user.tools.common.
                                   get_user_profile_photo_file_name)),
                ('gender',
                 models.IntegerField(blank=True,
                                     choices=[(1, 'Man'), (2, 'Woman')],
                                     null=True,
                                     verbose_name='cinsi')),
                ('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')),
                ('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': 'İstifadəçi',
                'verbose_name_plural': 'İstifadəçilər',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Exemplo n.º 15
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='AdvUser',
            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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   unique=True,
                                   verbose_name='Email')),
                ('is_activated',
                 models.BooleanField(db_index=True,
                                     default=True,
                                     verbose_name='Прошел активацию?')),
                ('send_messages',
                 models.BooleanField(
                     default=True,
                     verbose_name='Слать оповещение о новых комментариях?')),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=40, verbose_name='Название')),
                ('content', models.TextField(verbose_name='Описание')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      db_index=True,
                                      verbose_name='Опубликовано')),
                ('price', models.IntegerField(verbose_name='Цена')),
                ('is_active',
                 models.BooleanField(db_index=True,
                                     default=True,
                                     verbose_name='Активный?')),
                ('is_paid',
                 models.BooleanField(db_index=True,
                                     default=False,
                                     verbose_name='Оплачен?')),
                ('braintree_id',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='ID транзакции')),
                ('country',
                 models.CharField(default='',
                                  max_length=60,
                                  verbose_name='Страна')),
                ('city',
                 models.CharField(default='',
                                  max_length=60,
                                  verbose_name='Город')),
                ('address',
                 models.CharField(default='',
                                  max_length=60,
                                  verbose_name='Адрес далее')),
                ('event_date',
                 models.DateTimeField(verbose_name='Дата инцидента')),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Автор')),
            ],
            options={
                'verbose_name': 'Отзыв',
                'verbose_name_plural': 'Отзывы',
                'ordering': ('-is_paid', '-price', 'title', 'created_at'),
            },
        ),
        migrations.CreateModel(
            name='Rebuttal',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=40, verbose_name='Название')),
                ('content', models.TextField(verbose_name='Описание')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      db_index=True,
                                      verbose_name='Опубликовано')),
                ('price', models.IntegerField(verbose_name='Цена')),
                ('is_active',
                 models.BooleanField(db_index=True,
                                     default=True,
                                     verbose_name='Выводить опровержение?')),
                ('is_paid',
                 models.BooleanField(db_index=True,
                                     default=False,
                                     verbose_name='Оплачен?')),
                ('braintree_id', models.CharField(blank=True, max_length=150)),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Автор')),
                ('review',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='ReviewApp.Review',
                                   verbose_name='Отзыв')),
            ],
            options={
                'verbose_name': 'Опровержение',
                'verbose_name_plural': 'Опровержения',
                'ordering': ('-is_paid', '-price', 'title', 'created_at'),
            },
        ),
        migrations.CreateModel(
            name='ComplaintsAndSuggestions',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=40, verbose_name='Заголовок')),
                ('body', models.TextField(verbose_name='Текст сообшения')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      db_index=True,
                                      verbose_name='Опубликовано')),
                ('user_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Пользователь')),
            ],
            options={
                'verbose_name': 'Жалоба/предложение',
                'verbose_name_plural': 'Жалобы/предложения',
                'ordering': ('created_at', 'title'),
            },
        ),
        migrations.CreateModel(
            name='AdditionalImageReb',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(
                     upload_to=ReviewApp.utilities.get_timestamp_path,
                     verbose_name='Изображение')),
                ('rebuttal',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='ReviewApp.Rebuttal',
                                   verbose_name='Опровержение')),
            ],
            options={
                'verbose_name': 'Иллюстрация',
                'verbose_name_plural': 'Иллюстрации',
            },
        ),
        migrations.CreateModel(
            name='AdditionalImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(
                     upload_to=ReviewApp.utilities.get_timestamp_path,
                     verbose_name='Изображение')),
                ('review',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='ReviewApp.Review',
                                   verbose_name='Отзыв')),
            ],
            options={
                'verbose_name': 'Иллюстрация',
                'verbose_name_plural': 'Иллюстрации',
            },
        ),
    ]
Exemplo n.º 16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            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')),
                ('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=50, unique=True)),
                ('email',
                 models.EmailField(blank=True, max_length=254, null=True)),
                ('age', models.IntegerField(blank=True, null=True)),
                ('first_name', models.CharField(max_length=50)),
                ('following_field',
                 models.ManyToManyField(blank=True,
                                        related_name='following',
                                        to=settings.AUTH_USER_MODEL)),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Exemplo n.º 17
0
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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('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')),
                ('phone_number',
                 models.CharField(max_length=11, verbose_name='手机号码')),
                ('photo',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='icons/%Y/%m/%d',
                                   verbose_name='照片')),
                ('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': '用户信息',
                'verbose_name_plural': '用户信息',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='IconInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('CreateTime', models.DateTimeField(auto_created=True)),
                ('DisplayName', models.CharField(max_length=100)),
                ('ClassName', models.CharField(max_length=100)),
                ('SourceType', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': '图标',
                'verbose_name_plural': '图标',
                'db_table': 'IconInfo',
            },
        ),
        migrations.CreateModel(
            name='MenuInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=15, verbose_name='菜单名称')),
                ('url',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='网址')),
                ('show', models.BooleanField(default=False,
                                             verbose_name='是否显示')),
                ('priority',
                 models.IntegerField(blank=True,
                                     default=-1,
                                     null=True,
                                     verbose_name='显示优先级')),
                ('order_by', models.IntegerField(verbose_name='排序字段')),
                ('menu_icon',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='system.IconInfo',
                                   verbose_name='图标')),
                ('parent',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='system.MenuInfo')),
            ],
            options={
                'verbose_name': '菜单',
                'verbose_name_plural': '菜单',
                'db_table': 'MenuInfo',
                'ordering': ['order_by'],
            },
        ),
    ]
Exemplo n.º 18
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Users',
            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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.ASCIIUsernameValidator(
                         )
                     ],
                     verbose_name='username')),
                ('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')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('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')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('address_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('state12', models.CharField(max_length=30)),
                ('country123', models.CharField(max_length=30)),
                ('street', models.CharField(max_length=30)),
                ('pin', models.IntegerField()),
                ('contact_no123', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='BokingHistory',
            fields=[
                ('booking_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('start_datetime', models.DateTimeField()),
                ('end_datetime', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='Car',
            fields=[
                ('car_id', models.AutoField(primary_key=True,
                                            serialize=False)),
                ('car_name', models.CharField(max_length=30)),
                ('seater', models.IntegerField()),
                ('fule_type',
                 models.CharField(choices=[('D', 'DISEL'), ('P', 'PETROL'),
                                           ('CNG', 'CNG')],
                                  max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('company_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=30)),
                ('address',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='main.Address')),
            ],
        ),
        migrations.CreateModel(
            name='Document123',
            fields=[
                ('doc_id', models.AutoField(primary_key=True,
                                            serialize=False)),
                ('doc_type',
                 models.CharField(choices=[('DL', 'Driving Licence'),
                                           ('PAN', 'PAN CARD'),
                                           ('VI', 'VOTER ID')],
                                  max_length=1)),
                ('doc_url', models.SlugField()),
            ],
        ),
        migrations.CreateModel(
            name='TransactinHistory',
            fields=[
                ('transaction_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('payment', models.DecimalField(decimal_places=1,
                                                max_digits=3)),
                ('status',
                 models.CharField(choices=[('S', 'Sucess'), ('F', 'Fail'),
                                           ('P', 'Pending')],
                                  max_length=1)),
                ('datetime', models.DateTimeField()),
                ('booking',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='main.BokingHistory')),
            ],
        ),
        migrations.AddField(
            model_name='company',
            name='doc_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='main.Document123'),
        ),
        migrations.AddField(
            model_name='car',
            name='company',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='main.Company'),
        ),
        migrations.AddField(
            model_name='bokinghistory',
            name='car',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='main.Car'),
        ),
        migrations.AddField(
            model_name='bokinghistory',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='users',
            name='address',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='main.Address'),
        ),
        migrations.AddField(
            model_name='users',
            name='doc',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='main.Document123'),
        ),
        migrations.AddField(
            model_name='users',
            name='groups',
            field=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'),
        ),
        migrations.AddField(
            model_name='users',
            name='user_permissions',
            field=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'),
        ),
    ]
Exemplo n.º 19
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Attendance',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('attendance_date', models.DateField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Courses',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='SessionYearModel',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('session_start_year', models.DateField()),
                ('session_end_year', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='CustomUser',
            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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('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')),
                ('user_type',
                 models.CharField(choices=[(1, 'HOD'), (2, 'Staff'),
                                           (3, 'Student')],
                                  default=1,
                                  max_length=10)),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Subjects',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('course_id',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='StdMgtApp.courses')),
                ('staff_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Students',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('address', models.TextField()),
                ('gender', models.CharField(max_length=255)),
                ('profile_pic', models.FileField(upload_to='')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('admin',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
                ('course_id',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='StdMgtApp.courses')),
                ('session_year_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='StdMgtApp.sessionyearmodel')),
            ],
        ),
        migrations.CreateModel(
            name='Staffs',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('address', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('admin',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='NotificationStudent',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('message', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('student_id',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='StdMgtApp.students')),
            ],
        ),
        migrations.CreateModel(
            name='NotificationStaffs',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('message', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('staff_id',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='StdMgtApp.staffs')),
            ],
        ),
        migrations.CreateModel(
            name='LeaveReportStudent',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('leave_date', models.CharField(max_length=255)),
                ('leave_message', models.TextField()),
                ('leave_status', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('student_id',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='StdMgtApp.students')),
            ],
        ),
        migrations.CreateModel(
            name='LeaveReportStaff',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('leave_date', models.CharField(max_length=255)),
                ('leave_message', models.TextField()),
                ('leave_status', models.IntegerField(default=0)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('staff_id',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='StdMgtApp.staffs')),
            ],
        ),
        migrations.CreateModel(
            name='FeedbackStudent',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('feedback', models.TextField()),
                ('feedback_reply', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('student_id',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='StdMgtApp.students')),
            ],
        ),
        migrations.CreateModel(
            name='FeedbackStaffs',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('feedback', models.TextField()),
                ('feedback_reply', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('staff_id',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='StdMgtApp.staffs')),
            ],
        ),
        migrations.CreateModel(
            name='AttendanceReport',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('status', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('attendance_id',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='StdMgtApp.attendance')),
                ('student_id',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='StdMgtApp.students')),
            ],
        ),
        migrations.AddField(
            model_name='attendance',
            name='session_year_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='StdMgtApp.sessionyearmodel'),
        ),
        migrations.AddField(
            model_name='attendance',
            name='subject_id',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='StdMgtApp.subjects'),
        ),
        migrations.CreateModel(
            name='AdminHoD',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('admin',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 20
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.BigAutoField(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')),
                ('username',
                 models.CharField(
                     help_text=
                     'Required. 30 characters or fewer. Letters, numbers and @/./+/-/_ characters',
                     max_length=30,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             re.compile('^[\\w.@+-]+$'),
                             'Enter a valid username.', 'invalid')
                     ],
                     verbose_name='username')),
                ('full_name',
                 models.CharField(max_length=254, verbose_name='full name')),
                ('short_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='short name')),
                ('sex',
                 models.CharField(choices=[('Male', 'Male'),
                                           ('Female', 'Female')],
                                  max_length=30,
                                  verbose_name='sex')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('phone_number',
                 models.CharField(max_length=20,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          re.compile('^[0-9]+$'),
                                          'Only numbers are allowed.',
                                          'invalid')
                                  ],
                                  verbose_name='phone number')),
                ('user_type',
                 models.CharField(choices=[('Driver', 'Driver'),
                                           ('Passenger', 'Passenger')],
                                  max_length=30,
                                  verbose_name='user type')),
                ('address',
                 models.TextField(max_length=400, verbose_name='location')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_verified',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user is a vershified user',
                     verbose_name='user verified')),
                ('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')),
                ('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', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Vehicle',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('year', models.IntegerField(verbose_name='year of purchase')),
                ('make',
                 models.CharField(max_length=254,
                                  verbose_name='vehicle make')),
                ('plate',
                 models.CharField(max_length=10,
                                  verbose_name='liscenced plate number')),
                ('model',
                 models.CharField(max_length=254,
                                  verbose_name='vehicle model')),
                ('seats', models.IntegerField(verbose_name='no of seats')),
                ('type',
                 models.CharField(choices=[('private', 'private'),
                                           ('hired', 'hired')],
                                  max_length=30,
                                  verbose_name='vehicle type')),
                ('category',
                 models.CharField(choices=[('Car', 'Car'), ('Bus', 'Bus'),
                                           ('Coaster', 'Coaster'),
                                           ('Truck', 'Truck')],
                                  max_length=30,
                                  verbose_name='vehicle category')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='VehicleSharing',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('start',
                 models.CharField(max_length=256,
                                  verbose_name='starting point')),
                ('dest',
                 models.CharField(max_length=256, verbose_name='destination')),
                ('cost', models.IntegerField(verbose_name='cost')),
                ('date',
                 models.DateField(default=django.utils.timezone.now,
                                  verbose_name='date')),
                ('start_time',
                 models.TimeField(max_length=256, verbose_name='start time')),
                ('arrival_time',
                 models.TimeField(max_length=256,
                                  verbose_name='estimated arrivak')),
                ('no_pass',
                 models.IntegerField(verbose_name='no of passengers')),
                ('details', models.TextField(verbose_name='ride details')),
                ('sex',
                 models.CharField(choices=[('Male', 'Male'),
                                           ('Female', 'Female'),
                                           ('Both', 'Both')],
                                  max_length=30,
                                  verbose_name='gender preference')),
                ('ended',
                 models.BooleanField(default=False,
                                     verbose_name='sharing ended')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('vehicle',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='carapp.vehicle')),
            ],
        ),
        migrations.CreateModel(
            name='Request',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('pick',
                 models.CharField(max_length=256,
                                  verbose_name='pick up point')),
                ('dest',
                 models.CharField(max_length=256, verbose_name='destination')),
                ('reg_date',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='registration date')),
                ('bearable',
                 models.IntegerField(verbose_name='bearable cost')),
                ('status',
                 models.CharField(default='pending',
                                  max_length=256,
                                  verbose_name='status')),
                ('ride',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='carapp.vehiclesharing')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('picture',
                 models.FileField(blank=True, default='user.png',
                                  upload_to='')),
                ('education', models.TextField(blank=True)),
                ('work', models.TextField(blank=True)),
                ('social_facebook', models.CharField(blank=True,
                                                     max_length=256)),
                ('social_twitter', models.CharField(blank=True,
                                                    max_length=256)),
                ('social_instagram',
                 models.CharField(blank=True, max_length=256)),
                ('bio', models.TextField(blank=True)),
                ('is_public', models.BooleanField(default=False)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('subject',
                 models.CharField(default='(No Subject)', max_length=256)),
                ('message', models.TextField()),
                ('date',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='time sent')),
                ('read', models.BooleanField(default=False,
                                             verbose_name='read')),
                ('deleted',
                 models.BooleanField(default=False, verbose_name='deleted')),
                ('recipient',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='recipient',
                                   to=settings.AUTH_USER_MODEL)),
                ('sender',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='sender',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('time',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='time')),
                ('followee',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='followee',
                                   to=settings.AUTH_USER_MODEL)),
                ('follower',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='follower',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DriverInfo',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('liscence_no',
                 models.CharField(max_length=30,
                                  verbose_name='liscence number')),
                ('date_issuance',
                 models.DateField(blank=True,
                                  verbose_name='date of first issuance')),
                ('scanned',
                 models.ImageField(
                     blank=True,
                     upload_to='',
                     verbose_name="picture of driver's liscence")),
                ('confirmed',
                 models.BooleanField(default=False, verbose_name='confirmed')),
                ('driver',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 21
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Member',
            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')),
                ('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',
                 django.contrib.postgres.fields.citext.CICharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 36 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=36,
                     unique=True,
                     validators=[backend.validators.NameValidator()],
                     verbose_name='username')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('totp_secret', models.CharField(max_length=16, null=True)),
                ('totp_status',
                 models.IntegerField(
                     choices=[(member.models.TOTPStatus['DISABLED'], 0),
                              (member.models.TOTPStatus['VERIFYING'], 1),
                              (member.models.TOTPStatus['ENABLED'], 2)],
                     default=member.models.TOTPStatus['DISABLED'])),
                ('is_visible', models.BooleanField(default=False)),
                ('bio', models.TextField(blank=True, max_length=400)),
                ('discord', models.CharField(blank=True, max_length=36)),
                ('discordid', models.CharField(blank=True, max_length=18)),
                ('twitter', models.CharField(blank=True, max_length=36)),
                ('reddit', models.CharField(blank=True, max_length=36)),
                ('email_verified', models.BooleanField(default=False)),
                ('email_token',
                 models.CharField(default=secrets.token_hex, max_length=64)),
                ('password_reset_token',
                 models.CharField(default=secrets.token_hex, max_length=64)),
                ('points', models.IntegerField(default=0)),
                ('leaderboard_points', models.IntegerField(default=0)),
                ('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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Exemplo n.º 22
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            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')),
                ('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')),
                ('accountNumber',
                 models.AutoField(primary_key=True, serialize=False)),
                ('username', models.CharField(max_length=50, unique=True)),
                ('first_name', models.CharField(max_length=50)),
                ('last_name', models.CharField(default='', max_length=50)),
                ('email', models.EmailField(max_length=254)),
                ('address', models.CharField(default='', max_length=50)),
                ('city', models.CharField(default='', max_length=50)),
                ('state', models.CharField(default='', max_length=2)),
                ('zipCode', models.CharField(default='', max_length=5)),
                ('phoneNumber',
                 models.CharField(default='1112223333', max_length=10)),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='ATM_Card',
            fields=[
                ('atmCardNumber',
                 models.AutoField(primary_key=True, serialize=False)),
                ('pin', models.CharField(default='', max_length=4)),
                ('name', models.CharField(default='', max_length=50)),
                ('dateOfIssue', models.CharField(default='', max_length=50)),
                ('expirationDate', models.CharField(default='',
                                                    max_length=50)),
                ('address', models.CharField(default='', max_length=50)),
                ('phoneNumber',
                 models.CharField(default='1112223333', max_length=10)),
                ('cardStatus', models.BooleanField(default=True)),
                ('twoFactorAuthenticationStatus',
                 models.BooleanField(default=True)),
                ('accountNumber',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ATMachine',
            fields=[
                ('ATMachineUID',
                 models.AutoField(primary_key=True, serialize=False)),
                ('currentBalance', models.PositiveIntegerField(default=0)),
                ('location', models.CharField(default='', max_length=100)),
                ('minimumBalance', models.PositiveIntegerField(default=1000)),
                ('status', models.CharField(default='', max_length=50)),
                ('lastRefillDate', models.DateField(default='',
                                                    max_length=50)),
                ('nextMaintenanceDate',
                 models.DateField(default='', max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='BalanceEnquiry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('balanceAmount', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='CashTransfer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('beneficiaryAccountNumber',
                 models.CharField(default='', max_length=50)),
                ('beneficiaryName', models.CharField(default='',
                                                     max_length=50)),
                ('amountTransferred', models.PositiveIntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='CashWithdrawal',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('amountTransferred', models.PositiveIntegerField(default=0)),
                ('denomination', models.CharField(default='', max_length=50)),
                ('currentBalance', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='PhoneChange',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('newPhoneNumber',
                 models.CharField(default='1112223333', max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='PinChange',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('previousPin', models.CharField(default='', max_length=4)),
                ('newPin', models.CharField(default='', max_length=4)),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('transactionId',
                 models.AutoField(primary_key=True, serialize=False)),
                ('date', models.DateField(default='', max_length=50)),
                ('status', models.CharField(default='', max_length=50)),
                ('responseCode', models.CharField(default='', max_length=50)),
                ('transactionType', models.CharField(default='',
                                                     max_length=50)),
                ('ATMCardNumber',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='users.ATM_Card')),
                ('ATMachineUID',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='users.ATMachine')),
            ],
        ),
        migrations.CreateModel(
            name='ATMachineRefill',
            fields=[
                ('refillId', models.AutoField(primary_key=True,
                                              serialize=False)),
                ('amount', models.PositiveIntegerField(default=0)),
                ('atmBranch', models.CharField(default='', max_length=50)),
                ('refillDate', models.DateField(default='', max_length=50)),
                ('previousBalance', models.PositiveIntegerField(default=0)),
                ('ATMachineUID',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='users.ATMachine')),
            ],
        ),
        migrations.CreateModel(
            name='AccountExtension',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(default='', max_length=50)),
                ('phoneNumber',
                 models.CharField(default='1112223333', max_length=10)),
                ('balance', models.IntegerField(default=0)),
                ('accountNumber',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 23
0
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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('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')),
                ('avatar',
                 models.ImageField(blank=True,
                                   default='avatar/default.png',
                                   max_length=200,
                                   null=True,
                                   upload_to='avatar/%Y/%m',
                                   verbose_name='用户头像')),
                ('qq',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='QQ号码')),
                ('mobile',
                 models.CharField(blank=True,
                                  max_length=11,
                                  null=True,
                                  unique=True,
                                  verbose_name='手机号码')),
                ('url',
                 models.URLField(blank=True,
                                 max_length=100,
                                 null=True,
                                 verbose_name='个人网页地址')),
                ('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={
                'ordering': ['-id'],
                'verbose_name_plural': '用户',
                'verbose_name': '用户',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Ad',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50,
                                           verbose_name='广告标题')),
                ('description',
                 models.CharField(max_length=200, verbose_name='广告描述')),
                ('image_url',
                 models.ImageField(upload_to='ad/%Y/%m', verbose_name='图片路径')),
                ('callback_url',
                 models.URLField(blank=True, null=True, verbose_name='回调url')),
                ('date_publish',
                 models.DateTimeField(auto_now_add=True, verbose_name='发布时间')),
                ('index',
                 models.IntegerField(default=999, verbose_name='排列顺序(从小到大)')),
            ],
            options={
                'ordering': ['index', 'id'],
                'verbose_name_plural': '广告',
                'verbose_name': '广告',
            },
        ),
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50,
                                           verbose_name='文章标题')),
                ('desc', models.CharField(max_length=50, verbose_name='文章描述')),
                ('content', models.TextField(verbose_name='文章内容')),
                ('click_count',
                 models.IntegerField(default=0, verbose_name='点击次数')),
                ('is_recommend',
                 models.BooleanField(default=False, verbose_name='是否推荐')),
                ('date_publish',
                 models.DateTimeField(auto_now_add=True, verbose_name='发布时间')),
            ],
            options={
                'ordering': ['-date_publish'],
                'verbose_name_plural': '文章',
                'verbose_name': '文章',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='分类名称')),
                ('index', models.IntegerField(default=999,
                                              verbose_name='分类的排序')),
            ],
            options={
                'ordering': ['index', 'id'],
                'verbose_name_plural': '分类',
                'verbose_name': '分类',
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content', models.TextField(verbose_name='评论内容')),
                ('username',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='用户名')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=50,
                                   null=True,
                                   verbose_name='邮箱地址')),
                ('url',
                 models.URLField(blank=True,
                                 max_length=100,
                                 null=True,
                                 verbose_name='个人网页地址')),
                ('date_publish',
                 models.DateTimeField(auto_now_add=True, verbose_name='发布时间')),
                ('article',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Article',
                                   verbose_name='文章')),
                ('pid',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='blog.Comment',
                                   verbose_name='父级评论')),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='用户')),
            ],
            options={
                'verbose_name_plural': '评论',
                'verbose_name': '评论',
            },
        ),
        migrations.CreateModel(
            name='Links',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50, verbose_name='标题')),
                ('description',
                 models.CharField(max_length=200, verbose_name='友情链接描述')),
                ('callback_url', models.URLField(verbose_name='url地址')),
                ('date_publish',
                 models.DateTimeField(auto_now_add=True, verbose_name='发布时间')),
                ('index',
                 models.IntegerField(default=999, verbose_name='排列顺序(从小到大)')),
            ],
            options={
                'ordering': ['index', 'id'],
                'verbose_name_plural': '友情链接',
                'verbose_name': '友情链接',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='标签名称')),
            ],
            options={
                'verbose_name_plural': '标签',
                'verbose_name': '标签',
            },
        ),
        migrations.AddField(
            model_name='article',
            name='category',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='blog.Category',
                verbose_name='分类'),
        ),
        migrations.AddField(
            model_name='article',
            name='tag',
            field=models.ManyToManyField(to='blog.Tag', verbose_name='标签'),
        ),
        migrations.AddField(
            model_name='article',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='用户'),
        ),
    ]
Exemplo n.º 24
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='Libitem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('itemtype',
                 models.CharField(choices=[('Book', 'Book'), ('DVD', 'DVD'),
                                           ('Other', 'Other')],
                                  default='Book',
                                  max_length=6)),
                ('checked_out', models.BooleanField(default=False)),
                ('duedate',
                 models.DateField(blank=True, default=None, null=True)),
                ('last_chkout',
                 models.DateField(blank=True, default=None, null=True)),
                ('date_acquired',
                 models.DateField(default=datetime.date(2016, 5, 18))),
                ('pubyr', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Libuser',
            fields=[
                ('user_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('address',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('city', models.CharField(default='Windsor', max_length=20)),
                ('province',
                 models.CharField(choices=[
                     ('AB', 'Alberta'), ('MB', 'Manitoba'), ('ON', 'Ontario'),
                     ('QC', 'Quebec')
                 ],
                                  default='ON',
                                  max_length=2)),
                ('age', models.IntegerField()),
                ('phone', models.IntegerField(null=True)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('auth.user', ),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddField(
            model_name='libitem',
            name='user',
            field=models.ForeignKey(
                blank=True,
                default=None,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='libapp.Libuser'),
        ),
    ]
Exemplo n.º 25
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Event_name',
                 models.CharField(default='inquest', max_length=50)),
                ('event_start', models.DateTimeField()),
                ('event_end', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('question', models.CharField(blank=True, max_length=300)),
                ('image',
                 models.ImageField(blank=True,
                                   help_text='Please upload an image',
                                   upload_to='images/')),
                ('answer', models.CharField(max_length=50)),
                ('message', models.CharField(blank=True, max_length=300)),
                ('audio_question',
                 models.FileField(blank=True, upload_to='audio/')),
            ],
        ),
        migrations.CreateModel(
            name='CustomUser',
            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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('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')),
                ('user_name', models.EmailField(max_length=80)),
                ('name', models.CharField(max_length=50)),
                ('score', models.IntegerField(default=0)),
                ('college', models.CharField(max_length=100)),
                ('mobile', models.CharField(max_length=10)),
                ('last_updated', models.DateTimeField(null=True)),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Exemplo n.º 26
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='Bachelor',
            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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=30,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[\\w.@+-]+$',
                             'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.'
                         )
                     ],
                     verbose_name='username')),
                ('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')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('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')),
                ('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={
                'abstract': False,
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Aspect',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description', models.TextField()),
                ('order',
                 models.PositiveIntegerField(db_index=True,
                                             default=0,
                                             editable=False)),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('order',
                 models.PositiveIntegerField(db_index=True,
                                             default=0,
                                             editable=False)),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='Party',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('when', models.DateTimeField()),
                ('where', models.CharField(max_length=255)),
                ('guests',
                 models.ManyToManyField(editable=False,
                                        related_name='parties_attending',
                                        to=settings.AUTH_USER_MODEL)),
                ('organizer',
                 models.ForeignKey(editable=False,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='parties_organizing',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('number', models.IntegerField()),
                ('aspect',
                 models.ForeignKey(editable=False,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='ratings',
                                   to='love_engine.Aspect')),
                ('source',
                 models.ForeignKey(editable=False,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='given_ratings',
                                   to=settings.AUTH_USER_MODEL)),
                ('target',
                 models.ForeignKey(editable=False,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='received_ratings',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='game',
            name='party',
            field=adminsortable.fields.SortableForeignKey(
                editable=False,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='games',
                to='love_engine.Party'),
        ),
        migrations.AddField(
            model_name='aspect',
            name='game',
            field=adminsortable.fields.SortableForeignKey(
                editable=False,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='aspects',
                to='love_engine.Game'),
        ),
    ]
Exemplo n.º 27
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('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')),
                ('nick_name',
                 models.CharField(default='', max_length=50,
                                  verbose_name='昵称')),
                ('birthday',
                 models.DateField(blank=True, null=True, verbose_name='生日')),
                ('gender',
                 models.CharField(choices=[('male', '男'), ('female', '女')],
                                  default='female',
                                  max_length=6)),
                ('address', models.CharField(default='', max_length=100)),
                ('mobile',
                 models.CharField(blank=True, max_length=11, null=True)),
                ('image',
                 models.ImageField(default='image/default.png',
                                   upload_to='image/%Y/%m')),
                ('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': '用户信息',
                'verbose_name_plural': '用户信息',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Banner',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='标题')),
                ('image',
                 models.ImageField(upload_to='banner/%Y/%m',
                                   verbose_name='轮播图')),
                ('url', models.URLField(verbose_name='访问地址')),
                ('index', models.IntegerField(default=100, verbose_name='顺序')),
                ('add_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '轮播图',
                'verbose_name_plural': '轮播图',
            },
        ),
        migrations.CreateModel(
            name='EmailVerifyRecord',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code', models.CharField(max_length=20, verbose_name='验证码')),
                ('email', models.EmailField(max_length=50, verbose_name='邮箱')),
                ('send_type',
                 models.CharField(choices=[('register', '注册'),
                                           ('forget', '找回密码'),
                                           ('update_email', '修改邮箱')],
                                  max_length=30,
                                  verbose_name='验证码类型')),
                ('send_time',
                 models.DateTimeField(default=datetime.datetime.now,
                                      verbose_name='发送时间')),
            ],
            options={
                'verbose_name': '邮箱验证码',
                'verbose_name_plural': '邮箱验证码',
            },
        ),
    ]
Exemplo n.º 28
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Dependencia',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Domicilio',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('calle', models.CharField(max_length=50)),
                ('numero', models.IntegerField(default=0)),
                ('comuna', models.CharField(max_length=50)),
                ('ciudad', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('es_administrador', models.BooleanField(default=True)),
                ('telefono', models.CharField(max_length=50)),
                ('domicilio',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='hogar.Domicilio')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            bases=('auth.user', ),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='PerteneceDependencia',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('asignada', models.BooleanField(default=False)),
                ('dependencia',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='hogar.Dependencia')),
                ('domicilio',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='hogar.Domicilio')),
            ],
        ),
    ]
Exemplo n.º 29
0
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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('phone',
                 phonenumber_field.modelfields.PhoneNumberField(max_length=128,
                                                                unique=True)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('name', models.CharField(max_length=10)),
                ('birth', models.DateField(blank=True, null=True)),
                ('sns_agree', models.BooleanField(default=False)),
                ('email_agree', models.BooleanField(default=False)),
                ('hammer', models.PositiveIntegerField(default=0)),
                ('happy_cash', models.PositiveIntegerField(default=0)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('adminManager', members.manager.UserAdminManager()),
                ('normalManager', members.manager.UserNormalManager()),
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('postcode', models.CharField(max_length=6)),
                ('address', models.TextField()),
                ('detail', models.TextField()),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('rating_choices_name',
                 models.CharField(choices=[('1', '루키몽'), ('2', '실버몽'),
                                           ('3', '골드몽'), ('4', '파워몽'),
                                           ('5', '슈퍼몽')],
                                  max_length=2,
                                  unique=True)),
                ('ticket_count', models.IntegerField()),
                ('cash_count', models.IntegerField()),
                ('charge_support_benefit',
                 models.IntegerField(blank=True, null=True)),
                ('rating_achieve_benefit',
                 models.IntegerField(blank=True, null=True)),
                ('happy_day_benefit', models.IntegerField(blank=True,
                                                          null=True)),
                ('hammer_benefit', models.IntegerField(blank=True)),
                ('birthday_benefit', models.IntegerField(blank=True,
                                                         null=True)),
            ],
        ),
    ]
Exemplo n.º 30
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            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')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('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')),
                ('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')),
                ('idcardnumber',
                 models.CharField(blank=True,
                                  max_length=18,
                                  null=True,
                                  verbose_name='身份证号')),
                ('name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='姓名')),
                ('gender',
                 models.CharField(choices=[('male', '男'), ('female', '女')],
                                  default='female',
                                  max_length=6,
                                  verbose_name='性别')),
                ('mobile',
                 models.CharField(blank=True,
                                  max_length=11,
                                  null=True,
                                  verbose_name='电话')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=100,
                                   null=True,
                                   verbose_name='邮箱')),
                ('joinedyears',
                 models.DateField(blank=True, null=True,
                                  verbose_name='参加工作年月')),
                ('education',
                 models.IntegerField(
                     choices=[(1, '高中(中专)及以下'), (2, '大学专科'), (3, '大学本科'),
                              (4, '硕士研究生'), (5, '博士研究生及以上')],
                     default=1,
                     help_text=
                     '学历: 1高中(中专)及以下,2(大学专科),3(大学本科),4(硕士研究生),5(博士研究生及以上)',
                     verbose_name='学历')),
                ('title',
                 models.IntegerField(choices=[(1, '无'), (2, '初级'), (3, '中级'),
                                              (4, '高级')],
                                     default=1,
                                     help_text='职称: 1(无),2(初级),3(中级),4(高级)',
                                     verbose_name='职称')),
                ('internel_trainer',
                 models.IntegerField(choices=[(1, '无'), (2, '初级'), (3, '中级'),
                                              (4, '高级')],
                                     default=1,
                                     help_text='内训师: 1(无),2(初级),3(中级),4(高级)',
                                     verbose_name='内训师')),
                ('cmanagerlevel',
                 models.IntegerField(
                     choices=[(1, '无'), (2, '一等'), (3, '二等'),
                              (4, '三等')],
                     default=1,
                     help_text='客户经理等次: 1(无),2(一等),3(二等),4(三等)',
                     verbose_name='客户经理等次')),
                ('cmanagerrank',
                 models.IntegerField(
                     choices=[(1, '无'), (2, '初级'), (3, '中级'),
                              (4, '高级')],
                     default=1,
                     help_text='客户经理级次: 1(无),2(初级),3(中级),4(高级)',
                     verbose_name='客户经理级次')),
                ('clerkrank',
                 models.IntegerField(
                     choices=[(1, '无'), (2, '见习柜员'), (3, '初级柜员'), (4, '中级柜员'),
                              (5, '高级柜员'),
                              (6, '资深柜员')],
                     default=1,
                     help_text='柜员等级: 1(无),2(见习),3(初级),4(中级),5(高级),6(资深)',
                     verbose_name='柜员等级')),
                ('primccbp',
                 models.IntegerField(default=0,
                                     help_text='初级银行从业',
                                     verbose_name='初级银行从业')),
                ('intermediateccbp',
                 models.IntegerField(default=0,
                                     help_text='中级银行从业',
                                     verbose_name='中级银行从业')),
                ('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': '用户',
                'verbose_name_plural': '用户',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]