# Generated by Django 2.2.1 on 2019-06-24 13:51

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('channelaudit', '0003_auto_20190623_1249'),
    ]

    operations = [
        migrations.CreateModel(
            name='CaseIdentify',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device_id', models.CharField(blank=True, max_length=64, null=True, verbose_name='设备ID')),
                ('card_type', models.CharField(blank=True, choices=[('', '身份证'), ('J', '港澳居住证'), ('I', '外国人永久居住证')], max_length=3, null=True, verbose_name='证件类型，身份证为空，港澳居住证:J，外国人永久居住证：I')),
                ('name', models.CharField(blank=True, max_length=64, null=True, verbose_name='姓名')),
                ('gender', models.IntegerField(blank=True, choices=[(0, '男'), (1, '女')], null=True, verbose_name='性别')),
                ('nation', models.CharField(blank=True, max_length=64, null=True, verbose_name='民族(身份证专有)')),
                ('birthday', models.CharField(blank=True, max_length=64, null=True, verbose_name='出生年月')),
                ('address', models.CharField(blank=True, max_length=512, null=True, verbose_name='住址信息')),
                ('id_number', models.CharField(blank=True, max_length=64, null=True, unique=True, verbose_name='证件号码')),
                ('authority', models.CharField(blank=True, max_length=64, null=True, verbose_name='签发机关')),
                ('validity', models.CharField(blank=True, max_length=64, null=True, verbose_name='有效期')),
                ('visa_times', models.CharField(blank=True, max_length=64, null=True, verbose_name='签发次数(港澳台)')),
                ('pass_num', models.CharField(blank=True, max_length=64, null=True, verbose_name='通行证号(港澳台)')),
                ('en_name', models.CharField(blank=True, max_length=64, null=True, verbose_name='英文名(外国人)')),
                ('country', models.CharField(blank=True, max_length=64, null=True, verbose_name='国家名(外国人)')),
                ('country_code', models.CharField(blank=True, max_length=64, null=True, verbose_name='国家代码(外国人)')),
                ('dept_code', models.CharField(blank=True, max_length=64, null=True, verbose_name='签发机构代码(外国人)')),
                ('id_image', models.ImageField(blank=True, null=True, upload_to='IdImage', verbose_name='身份证')),
                ('id_image_url', models.URLField(blank=True, null=True, verbose_name='身份证图片URL')),
                ('face_image', models.ImageField(blank=True, null=True, upload_to='FaceImage', verbose_name='现场拍摄人脸')),
                ('face_image_url', models.URLField(blank=True, null=True, verbose_name='现场抓拍图URL')),
                ('verify_time', models.DateTimeField(blank=True, null=True, verbose_name='认证时间')),
                ('verify_result', models.IntegerField(choices=[(0, '成功'), (1, '失败'), (2, '真人检测失败'), (4, '指纹校验失败'), (5, 'OCR校验失败')], default=0, verbose_name='认证结果')),
                ('verify_score', models.FloatField(blank=True, null=True, verbose_name='比对分值')),
                ('is_reissue_upload', models.IntegerField(blank=True, choices=[(0, '正常上传'), (1, '数据补传')], null=True, verbose_name='是否补传')),
                ('is_del', models.IntegerField(choices=[(0, '不删除'), (1, '删除')], default=0, verbose_name='是否删除')),
                ('create_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='创建者')),
                ('create_time', models.DateTimeField(blank=True, default=datetime.datetime.now, null=True, verbose_name='创建时间')),
                ('update_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='更新者')),
                ('update_time', models.DateTimeField(blank=True, default=datetime.datetime.now, null=True, verbose_name='更新时间')),
                ('remark', models.CharField(blank=True, max_length=1024, null=True, verbose_name='备注')),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='channelaudit.CaseProject', verbose_name='项目ID')),
            ],
            options={
                'verbose_name': '刷证记录',
                'verbose_name_plural': '刷证记录',
                'unique_together': {('project', 'id_number')},
            },
        ),
        migrations.CreateModel(
            name='CaseIdentifyConfidence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_number', models.CharField(blank=True, max_length=64, null=True, verbose_name='身份证号码')),
                ('confidence', models.CharField(blank=True, choices=[('high', '高'), ('medium', '中'), ('low', '低')], max_length=10, null=True, verbose_name='匹配度')),
                ('first_snap_time', models.DateTimeField(blank=True, null=True, verbose_name='首次抓拍时间')),
                ('second_snap_time', models.DateTimeField(blank=True, null=True, verbose_name='获取报备时间之前(第一个时间)')),
                ('next_first_snap_time', models.DateTimeField(blank=True, null=True, verbose_name='获取到报备时间后(首次抓拍时间)')),
                ('customer_type', models.IntegerField(choices=[(1, '疑似飞单'), (2, '疑似截客'), (3, '未刷证'), (4, '未报备'), (5, '正常客户'), (6, '确认风险'), (7, '确认正常'), (8, '漏拍')], default=4, verbose_name='客户类型')),
                ('is_del', models.IntegerField(blank=True, choices=[(0, '不删除'), (1, '删除')], null=True, verbose_name='是否删除0:不删除，1：删除')),
                ('create_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='创建者')),
                ('create_time', models.DateTimeField(blank=True, null=True, verbose_name='创建时间')),
                ('update_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='更新者')),
                ('update_time', models.DateTimeField(blank=True, null=True, verbose_name='更新时间')),
                ('remark', models.CharField(blank=True, max_length=1024, null=True, verbose_name='备注')),
                ('identity', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='common.CaseIdentify', verbose_name='身份信息ID')),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='channelaudit.CaseProject', verbose_name='项目ID')),
            ],
            options={
                'verbose_name': '到访记录',
                'verbose_name_plural': '到访记录',
                'unique_together': {('project', 'id_number', 'confidence')},
            },
        ),
        migrations.CreateModel(
            name='CaseChannel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('custom_name', models.CharField(blank=True, max_length=128, null=True, verbose_name='客户姓名')),
                ('customer_id_card', models.CharField(max_length=64, verbose_name='证件号码')),
                ('customer_phone', models.CharField(blank=True, max_length=64, null=True, verbose_name='客户电话')),
                ('customer_status', models.CharField(blank=True, max_length=64, null=True, verbose_name='订单状态')),
                ('dynatown', models.CharField(blank=True, max_length=64, null=True, verbose_name='置业顾问')),
                ('agent', models.CharField(blank=True, max_length=64, null=True, verbose_name='经纪人')),
                ('channel_company', models.CharField(blank=True, max_length=64, null=True, verbose_name='渠道身份')),
                ('report_time', models.DateTimeField(verbose_name='报备时间')),
                ('special_report_time', models.CharField(blank=True, max_length=64, null=True, verbose_name='特殊报备时间，如果/，则为正常客户')),
                ('first_look_time', models.DateTimeField(blank=True, null=True, verbose_name='首次带看时间')),
                ('special_first_look_time', models.CharField(blank=True, max_length=32, null=True, verbose_name='特殊带看时间')),
                ('brush_card_time', models.DateTimeField(blank=True, null=True, verbose_name='刷证时间')),
                ('sign_time', models.DateTimeField(blank=True, null=True, verbose_name='签约时间')),
                ('sign_room_num', models.CharField(blank=True, max_length=64, null=True, verbose_name='签约房号')),
                ('is_del', models.IntegerField(choices=[(0, '不删除'), (1, '删除')], default=0, verbose_name='是否删除')),
                ('create_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='创建者')),
                ('create_time', models.DateTimeField(blank=True, default=datetime.datetime.now, null=True, verbose_name='创建时间')),
                ('update_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='更新者')),
                ('update_time', models.DateTimeField(blank=True, default=datetime.datetime.now, null=True, verbose_name='更新时间')),
                ('remark', models.CharField(blank=True, max_length=1024, null=True, verbose_name='备注')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='channelaudit.CaseProject', verbose_name='项目ID')),
            ],
            options={
                'verbose_name': '稽核列表',
                'verbose_name_plural': '稽核列表',
                'unique_together': {('project', 'customer_id_card')},
            },
        ),
    ]

# Generated by Django 2.2.1 on 2019-06-24 13:51

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('channelaudit', '0003_auto_20190623_1249'),
    ]

    operations = [
        migrations.CreateModel(
            name='CaseIdentify',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('device_id', models.CharField(blank=True, max_length=64, null=True, verbose_name='设备ID')),
                ('card_type', models.CharField(blank=True, choices=[('', '身份证'), ('J', '港澳居住证'), ('I', '外国人永久居住证')], max_length=3, null=True, verbose_name='证件类型，身份证为空，港澳居住证:J，外国人永久居住证：I')),
                ('name', models.CharField(blank=True, max_length=64, null=True, verbose_name='姓名')),
                ('gender', models.IntegerField(blank=True, choices=[(0, '男'), (1, '女')], null=True, verbose_name='性别')),
                ('nation', models.CharField(blank=True, max_length=64, null=True, verbose_name='民族(身份证专有)')),
                ('birthday', models.CharField(blank=True, max_length=64, null=True, verbose_name='出生年月')),
                ('address', models.CharField(blank=True, max_length=512, null=True, verbose_name='住址信息')),
                ('id_number', models.CharField(blank=True, max_length=64, null=True, unique=True, verbose_name='证件号码')),
                ('authority', models.CharField(blank=True, max_length=64, null=True, verbose_name='签发机关')),
                ('validity', models.CharField(blank=True, max_length=64, null=True, verbose_name='有效期')),
                ('visa_times', models.CharField(blank=True, max_length=64, null=True, verbose_name='签发次数(港澳台)')),
                ('pass_num', models.CharField(blank=True, max_length=64, null=True, verbose_name='通行证号(港澳台)')),
                ('en_name', models.CharField(blank=True, max_length=64, null=True, verbose_name='英文名(外国人)')),
                ('country', models.CharField(blank=True, max_length=64, null=True, verbose_name='国家名(外国人)')),
                ('country_code', models.CharField(blank=True, max_length=64, null=True, verbose_name='国家代码(外国人)')),
                ('dept_code', models.CharField(blank=True, max_length=64, null=True, verbose_name='签发机构代码(外国人)')),
                ('id_image', models.ImageField(blank=True, null=True, upload_to='IdImage', verbose_name='身份证')),
                ('id_image_url', models.URLField(blank=True, null=True, verbose_name='身份证图片URL')),
                ('face_image', models.ImageField(blank=True, null=True, upload_to='FaceImage', verbose_name='现场拍摄人脸')),
                ('face_image_url', models.URLField(blank=True, null=True, verbose_name='现场抓拍图URL')),
                ('verify_time', models.DateTimeField(blank=True, null=True, verbose_name='认证时间')),
                ('verify_result', models.IntegerField(choices=[(0, '成功'), (1, '失败'), (2, '真人检测失败'), (4, '指纹校验失败'), (5, 'OCR校验失败')], default=0, verbose_name='认证结果')),
                ('verify_score', models.FloatField(blank=True, null=True, verbose_name='比对分值')),
                ('is_reissue_upload', models.IntegerField(blank=True, choices=[(0, '正常上传'), (1, '数据补传')], null=True, verbose_name='是否补传')),
                ('is_del', models.IntegerField(choices=[(0, '不删除'), (1, '删除')], default=0, verbose_name='是否删除')),
                ('create_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='创建者')),
                ('create_time', models.DateTimeField(blank=True, default=datetime.datetime.now, null=True, verbose_name='创建时间')),
                ('update_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='更新者')),
                ('update_time', models.DateTimeField(blank=True, default=datetime.datetime.now, null=True, verbose_name='更新时间')),
                ('remark', models.CharField(blank=True, max_length=1024, null=True, verbose_name='备注')),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='channelaudit.CaseProject', verbose_name='项目ID')),
            ],
            options={
                'verbose_name': '刷证记录',
                'verbose_name_plural': '刷证记录',
                'unique_together': {('project', 'id_number')},
            },
        ),
        migrations.CreateModel(
            name='CaseIdentifyConfidence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_number', models.CharField(blank=True, max_length=64, null=True, verbose_name='身份证号码')),
                ('confidence', models.CharField(blank=True, choices=[('high', '高'), ('medium', '中'), ('low', '低')], max_length=10, null=True, verbose_name='匹配度')),
                ('first_snap_time', models.DateTimeField(blank=True, null=True, verbose_name='首次抓拍时间')),
                ('second_snap_time', models.DateTimeField(blank=True, null=True, verbose_name='获取报备时间之前(第一个时间)')),
                ('next_first_snap_time', models.DateTimeField(blank=True, null=True, verbose_name='获取到报备时间后(首次抓拍时间)')),
                ('customer_type', models.IntegerField(choices=[(1, '疑似飞单'), (2, '疑似截客'), (3, '未刷证'), (4, '未报备'), (5, '正常客户'), (6, '确认风险'), (7, '确认正常'), (8, '漏拍')], default=4, verbose_name='客户类型')),
                ('is_del', models.IntegerField(blank=True, choices=[(0, '不删除'), (1, '删除')], null=True, verbose_name='是否删除0:不删除，1：删除')),
                ('create_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='创建者')),
                ('create_time', models.DateTimeField(blank=True, null=True, verbose_name='创建时间')),
                ('update_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='更新者')),
                ('update_time', models.DateTimeField(blank=True, null=True, verbose_name='更新时间')),
                ('remark', models.CharField(blank=True, max_length=1024, null=True, verbose_name='备注')),
                ('identity', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='common.CaseIdentify', verbose_name='身份信息ID')),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='channelaudit.CaseProject', verbose_name='项目ID')),
            ],
            options={
                'verbose_name': '到访记录',
                'verbose_name_plural': '到访记录',
                'unique_together': {('project', 'id_number', 'confidence')},
            },
        ),
        migrations.CreateModel(
            name='CaseChannel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('custom_name', models.CharField(blank=True, max_length=128, null=True, verbose_name='客户姓名')),
                ('customer_id_card', models.CharField(max_length=64, verbose_name='证件号码')),
                ('customer_phone', models.CharField(blank=True, max_length=64, null=True, verbose_name='客户电话')),
                ('customer_status', models.CharField(blank=True, max_length=64, null=True, verbose_name='订单状态')),
                ('dynatown', models.CharField(blank=True, max_length=64, null=True, verbose_name='置业顾问')),
                ('agent', models.CharField(blank=True, max_length=64, null=True, verbose_name='经纪人')),
                ('channel_company', models.CharField(blank=True, max_length=64, null=True, verbose_name='渠道身份')),
                ('report_time', models.DateTimeField(verbose_name='报备时间')),
                ('special_report_time', models.CharField(blank=True, max_length=64, null=True, verbose_name='特殊报备时间，如果/，则为正常客户')),
                ('first_look_time', models.DateTimeField(blank=True, null=True, verbose_name='首次带看时间')),
                ('special_first_look_time', models.CharField(blank=True, max_length=32, null=True, verbose_name='特殊带看时间')),
                ('brush_card_time', models.DateTimeField(blank=True, null=True, verbose_name='刷证时间')),
                ('sign_time', models.DateTimeField(blank=True, null=True, verbose_name='签约时间')),
                ('sign_room_num', models.CharField(blank=True, max_length=64, null=True, verbose_name='签约房号')),
                ('is_del', models.IntegerField(choices=[(0, '不删除'), (1, '删除')], default=0, verbose_name='是否删除')),
                ('create_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='创建者')),
                ('create_time', models.DateTimeField(blank=True, default=datetime.datetime.now, null=True, verbose_name='创建时间')),
                ('update_by', models.CharField(blank=True, max_length=64, null=True, verbose_name='更新者')),
                ('update_time', models.DateTimeField(blank=True, default=datetime.datetime.now, null=True, verbose_name='更新时间')),
                ('remark', models.CharField(blank=True, max_length=1024, null=True, verbose_name='备注')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='channelaudit.CaseProject', verbose_name='项目ID')),
            ],
            options={
                'verbose_name': '稽核列表',
                'verbose_name_plural': '稽核列表',
                'unique_together': {('project', 'customer_id_card')},
            },
        ),
    ]

# Generated by Django 2.2.1 on 2019-06-24 13:51