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

    dependencies = [
        ('biz', '0027_merge_20180522_1553'),
    ]

    operations = [
        migrations.CreateModel(
            name='OrderComment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('score', models.PositiveSmallIntegerField()),
                ('content', models.TextField(max_length=300)),
                ('images', biz.models.StringListField(null=True)),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='comments',
                                   to='biz.PayOrder')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='order_comments',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'order_comment',
                'ordering': ('-created_time', ),
            },
        ),
    ]
Ejemplo n.º 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('biz', '0084_merge_20180909_2215'),
    ]

    operations = [
        migrations.CreateModel(
            name='Feedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField(max_length=300)),
                ('images', biz.models.StringListField(null=True)),
                ('mark', models.BooleanField(default=False)),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='feedback', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-created_time',),
            },
        ),
        migrations.AlterModelOptions(
            name='albumpicture',
            options={'ordering': ('-created_time',), 'verbose_name': '照片'},
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('biz', '0006_merge_20180504_1214'),
    ]

    operations = [
        migrations.CreateModel(
            name='OperationLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('refer_type',
                 models.CharField(choices=[('BOXER_IDENTIFICATION', '拳手认证')],
                                  max_length=50)),
                ('refer_pk', models.BigIntegerField()),
                ('operation_type',
                 models.CharField(choices=[
                     ('BOXER_AUTHENTICATION_APPROVED', '拳手认证通过'),
                     ('BOXER_AUTHENTICATION_REFUSE', '拳手认证驳回'),
                     ('LOCK', '拳手接单状态锁定'), ('UNLOCK', '拳手接单状态解锁')
                 ],
                                  max_length=50,
                                  null=True)),
                ('operate_time', models.DateTimeField()),
                ('content',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('operator',
                 models.ForeignKey(db_index=False,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   related_name='+',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'operation_log',
            },
        ),
        migrations.AddField(
            model_name='boxeridentification',
            name='allowed_lessons',
            field=biz.models.StringListField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='boxeridentification',
            name='refuse_reason',
            field=models.CharField(blank=True, max_length=100, null=True),
        ),
        migrations.AlterField(
            model_name='boxeridentification',
            name='is_locked',
            field=models.BooleanField(default=False),
        ),
    ]
Ejemplo n.º 4
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='CoinChangeLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('updated_time', models.DateTimeField(auto_now=True)),
                ('last_amount', models.IntegerField(default=0)),
                ('change_amount', models.IntegerField(default=0)),
                ('remain_amount', models.IntegerField(default=0)),
                ('operator', models.CharField(max_length=20, null=True)),
                ('remarks', models.CharField(max_length=50, null=True)),
                ('change_type', models.CharField(choices=[(b'INCREASE_COIN_RECHARGE', '\u6536\u5165-\u5145\u503c'), (b'INCREASE_COIN_OFFICIAL_RECHARGE', '\u5b98\u65b9\u5145\u503c'), (b'INCREASE_GUESSING_AWARD', '\u7ade\u731c\u5956\u52b1'), (b'INCREASE_USER_DONATE', '\u6536\u5165-\u7528\u6237\u6253\u8d4f'), (b'INCREASE_USER_VIDEO_DONATE', '\u6536\u5165-\u7528\u6237\u89c6\u9891\u6253\u8d4f'), (b'INCREASE_COIN_REJECT_WITHDRAW_REBACK', '\u63d0\u73b0\u88ab\u62d2\u7edd-\u9000\u56de\u6b3e\u9879'), (b'INCREASE_WITHDRAW_FAILED_REBACK', '\u63d0\u73b0\u5931\u8d25-\u9000\u56de\u6b3e\u9879'), (b'REDUCE_USER_DONATE', '\u652f\u51fa-\u7528\u6237\u6253\u8d4f'), (b'REDUCE_USER_VIDEO_DONATE', '\u652f\u51fa-\u7528\u6237\u89c6\u9891\u6253\u8d4f'), (b'REDUCE_SHOPPING_EXCHANGE', '\u5546\u57ce\u5151\u6362'), (b'REDUCE_GUESSING_BET', '\u7ade\u731c\u4e0b\u6ce8'), (b'REDUCE_START_VOTE', '\u652f\u51fa\u660e\u661f\u6295\u7968'), (b'REDUCE_WITHDRAW_APPLY', '\u63d0\u73b0\u7533\u8bf7\u63d0\u73b0')], max_length=30, null=True)),
            ],
            options={
                'ordering': ['-created_time', '-id'],
                'db_table': 'coin_change_log',
            },
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.CharField(max_length=140)),
                ('images', biz.models.StringListField(null=True)),
                ('video', models.URLField(null=True)),
                ('is_deleted', models.BooleanField(db_index=True, default=False)),
                ('created_time', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('updated_time', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'discover_message',
            },
        ),
        migrations.CreateModel(
            name='MoneyChangeLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('updated_time', models.DateTimeField(auto_now=True)),
                ('last_amount', models.IntegerField(default=0)),
                ('change_amount', models.IntegerField(default=0)),
                ('remain_amount', models.IntegerField(default=0)),
                ('operator', models.CharField(max_length=20, null=True)),
                ('remarks', models.CharField(max_length=50, null=True)),
                ('change_type', models.CharField(choices=[(b'INCREASE_MONEY_RECHARGE', '\u5145\u503c'), (b'INCREASE_MONEY_OFFICIAL_RECHARGE', '\u5b98\u65b9\u5145\u503c'), (b'INCREASE_ORDER', '\u7ea6\u5355(\u6536\u5165)'), (b'INCREASE_MONEY_REJECT_WITHDRAW_REBACK', '\u63d0\u73b0(\u5ba1\u6838\u672a\u901a\u8fc7)'), (b'REDUCE_WITHDRAW', '\u63d0\u73b0'), (b'REDUCE_ORDER', '\u7ea6\u5355(\u652f\u51fa)'), (b'REDUCE_PAY_FOR_VIDEO', '\u4ed8\u8d39\u89c6\u9891'), (b'REDUCE_SIGN_UP', '\u62a5\u540d')], max_length=30, null=True)),
            ],
            options={
                'ordering': ['-created_time', '-id'],
                'db_table': 'money_change_log',
            },
        ),
        migrations.AddField(
            model_name='user',
            name='coin_balance',
            field=models.IntegerField(default=0),
        ),
        migrations.AddField(
            model_name='user',
            name='money_balance',
            field=models.IntegerField(default=0),
        ),
        migrations.AddField(
            model_name='moneychangelog',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='money_change_log', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='message',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='messages', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='coinchangelog',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='coin_change_log', to=settings.AUTH_USER_MODEL),
        ),
    ]
Ejemplo n.º 5
0
class Migration(migrations.Migration):

    dependencies = [
        ('biz', '0004_auto_20180427_1800'),
    ]

    operations = [
        migrations.CreateModel(
            name='BoxerIdentification',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('updated_time', models.DateTimeField(auto_now=True)),
                ('real_name', models.CharField(max_length=10)),
                ('height', models.IntegerField()),
                ('weight', models.IntegerField()),
                ('birthday', models.DateField()),
                ('identity_number',
                 models.CharField(
                     max_length=18,
                     validators=[biz.validator.validate_identity_number])),
                ('mobile',
                 models.CharField(max_length=11,
                                  validators=[biz.validator.validate_mobile])),
                ('is_professional_boxer', models.BooleanField(default=False)),
                ('club', models.CharField(blank=True, max_length=50,
                                          null=True)),
                ('job', models.CharField(max_length=10)),
                ('introduction', models.TextField(max_length=300)),
                ('experience',
                 models.TextField(blank=True, max_length=500, null=True)),
                ('authentication_state',
                 models.CharField(choices=[('WAITING', '待审核'),
                                           ('REFUSE', '已驳回'),
                                           ('APPROVED', '已通过')],
                                  default='WAITING',
                                  max_length=10)),
                ('is_locked', models.BooleanField(default=True)),
                ('honor_certificate_images',
                 biz.models.StringListField(null=True)),
                ('competition_video', models.URLField(null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='boxer_identification',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'boxer_identification',
            },
        ),
        migrations.AlterField(
            model_name='coinchangelog',
            name='operator',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='moneychangelog',
            name='operator',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to=settings.AUTH_USER_MODEL),
        ),
    ]