from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('merchant_ops', '0002_merchantstaffmember_merchant_remark'),
    ]

    operations = [
        migrations.CreateModel(
            name='MerchantOrderActionLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('club_id', models.CharField(db_index=True, default='xq', max_length=16)),
                ('merchant_id', models.CharField(db_index=True, max_length=7)),
                ('order_id', models.CharField(db_index=True, max_length=32)),
                ('action_code', models.PositiveSmallIntegerField(db_index=True, verbose_name='行为码')),
                ('operator_user_id', models.CharField(db_index=True, max_length=7)),
                ('operator_type', models.CharField(max_length=16, verbose_name='MERCHANT/STAFF')),
                ('staff_member_id', models.BigIntegerField(blank=True, db_index=True, null=True)),
                ('role_code', models.CharField(blank=True, default='', max_length=32)),
                ('role_name', models.CharField(blank=True, default='', max_length=64)),
                ('amount', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
                ('leixing_id', models.IntegerField(blank=True, db_index=True, null=True)),
                ('remark', models.CharField(blank=True, default='', max_length=500)),
                ('CreateTime', models.DateTimeField(auto_now_add=True, db_index=True)),
            ],
            options={
                'verbose_name': '商家订单操作流水',
                'db_table': 'merchant_order_action_log',
            },
        ),
        migrations.AddIndex(
            model_name='merchantorderactionlog',
            index=models.Index(fields=['merchant_id', 'operator_user_id', '-CreateTime'], name='merchant_or_merchan_op_idx'),
        ),
        migrations.AddIndex(
            model_name='merchantorderactionlog',
            index=models.Index(fields=['merchant_id', 'action_code', '-CreateTime'], name='merchant_or_merchan_ac_idx'),
        ),
        migrations.AddIndex(
            model_name='merchantorderactionlog',
            index=models.Index(fields=['merchant_id', 'leixing_id', '-CreateTime'], name='merchant_or_merchan_lx_idx'),
        ),
    ]
