# Generated manually for gongdan

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Gongdan',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gongdan_id', models.CharField(db_index=True, max_length=32, unique=True, verbose_name='工单号')),
                ('leixing', models.IntegerField(choices=[(1, '订单投诉'), (2, '充值投诉'), (3, '罚款投诉'), (4, '管事投诉'), (5, '被骗投诉')], db_index=True, verbose_name='投诉类型')),
                ('order_id', models.CharField(blank=True, db_index=True, max_length=64, null=True, verbose_name='订单ID')),
                ('chongzhi_id', models.CharField(blank=True, db_index=True, max_length=64, null=True, verbose_name='充值单ID')),
                ('fadan_id', models.CharField(blank=True, db_index=True, max_length=32, null=True, verbose_name='罚单ID')),
                ('guanshi_id', models.CharField(blank=True, db_index=True, max_length=32, null=True, verbose_name='被投诉管事UID')),
                ('shuoming', models.CharField(max_length=500, verbose_name='投诉说明')),
                ('shenqingren_id', models.CharField(db_index=True, max_length=32, verbose_name='申请人UserUID')),
                ('club_id', models.CharField(blank=True, db_index=True, max_length=16, null=True, verbose_name='俱乐部')),
                ('zhuangtai', models.IntegerField(choices=[(1, '处理中'), (2, '已处理'), (3, '不满意'), (4, '已关闭')], db_index=True, default=1, verbose_name='状态')),
                ('chuli_jieguo', models.CharField(blank=True, max_length=500, null=True, verbose_name='处理结果说明')),
                ('chuliren_id', models.CharField(blank=True, db_index=True, max_length=32, null=True, verbose_name='处理人UID')),
                ('chuliren_name', models.CharField(blank=True, max_length=64, null=True, verbose_name='处理人展示名')),
                ('chuli_time', models.DateTimeField(blank=True, null=True, verbose_name='处理时间')),
                ('shengji_cishu', models.IntegerField(default=0, verbose_name='升级次数')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('UpdateTime', models.DateTimeField(auto_now=True)),
            ],
            options={'db_table': 'gongdan', 'verbose_name': '投诉工单', 'ordering': ['-CreateTime']},
        ),
        migrations.CreateModel(
            name='GongdanImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gongdan_hao', models.CharField(db_index=True, max_length=32, verbose_name='工单号冗余')),
                ('url', models.CharField(max_length=512, verbose_name='图片URL')),
                ('paixu', models.IntegerField(default=0, verbose_name='排序')),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('gongdan', models.ForeignKey(db_column='gongdan_pk', on_delete=django.db.models.deletion.CASCADE, related_name='images', to='gongdan.gongdan')),
            ],
            options={'db_table': 'gongdan_image', 'verbose_name': '工单证据图', 'ordering': ['paixu', 'id']},
        ),
        migrations.CreateModel(
            name='GongdanShengji',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gongdan_hao', models.CharField(db_index=True, max_length=32, verbose_name='工单号冗余')),
                ('cishu', models.IntegerField(verbose_name='第几次升级')),
                ('shuoming', models.CharField(max_length=500, verbose_name='补充说明')),
                ('shenqingren_id', models.CharField(db_index=True, max_length=32, verbose_name='申请人')),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('gongdan', models.ForeignKey(db_column='gongdan_pk', on_delete=django.db.models.deletion.CASCADE, related_name='shengji_list', to='gongdan.gongdan')),
            ],
            options={
                'db_table': 'gongdan_shengji',
                'verbose_name': '工单升级记录',
                'ordering': ['cishu', 'id'],
                'unique_together': {('gongdan', 'cishu')},
            },
        ),
    ]
