Esempio n. 1
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': '照片'},
        ),
    ]
Esempio n. 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('biz', '0012_auto_20180509_1920'),
    ]

    operations = [
        migrations.CreateModel(
            name='BoxingClub',
            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)),
                ('club_name', models.CharField(max_length=20, unique=True)),
                ('address', models.CharField(max_length=30)),
                ('longitude',
                 models.DecimalField(decimal_places=6, max_digits=9)),
                ('latitude', models.DecimalField(decimal_places=6,
                                                 max_digits=8)),
                ('phone',
                 models.CharField(max_length=11,
                                  validators=[biz.validator.validate_mobile])),
                ('opening_hours', models.CharField(max_length=30)),
                ('images', biz.models.StringListField()),
                ('introduction', models.CharField(max_length=120)),
            ],
            options={
                'db_table': 'club',
            },
        ),
    ]
Esempio n. 3
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', ),
            },
        ),
    ]
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),
        ),
    ]
Esempio n. 5
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),
        ),
    ]
Esempio n. 6
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),
        ),
    ]
Esempio n. 7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_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')),
                ('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')),
                ('mobile',
                 models.CharField(
                     db_index=True,
                     error_messages={
                         b'unique':
                         '\u624b\u673a\u53f7\u5df2\u5b58\u5728\u3002'
                     },
                     max_length=11,
                     unique=True,
                     validators=[biz.validator.validate_mobile])),
                ('weibo_openid',
                 models.CharField(blank=True,
                                  max_length=128,
                                  null=True,
                                  unique=True)),
                ('wechat_openid',
                 models.CharField(blank=True,
                                  max_length=128,
                                  null=True,
                                  unique=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={
                'ordering': ['-id'],
                'abstract': False,
                'verbose_name_plural': 'users',
                'db_table': 'user',
                'verbose_name': 'user',
            },
            managers=[
                ('objects', biz.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            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)),
                ('nick_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('name', models.CharField(blank=True, max_length=30,
                                          null=True)),
                ('nation',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('birthday', models.DateTimeField(blank=True, null=True)),
                ('weight',
                 models.CharField(blank=True, max_length=10, null=True)),
                ('height',
                 models.CharField(blank=True, max_length=10, null=True)),
                ('profession',
                 models.CharField(blank=True, max_length=20, null=True)),
                ('avatar', models.URLField(blank=True, null=True)),
                ('gender', models.BooleanField(default=True)),
                ('address',
                 models.CharField(blank=True, max_length=254, null=True)),
                ('bio', models.CharField(blank=True, max_length=30,
                                         null=True)),
                ('alipay_account',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='user_profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'user_profile',
            },
        ),
    ]