# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company.  All rights reserved.
BK-LOG 蓝鲸日志平台 is licensed under the MIT License.
License for BK-LOG 蓝鲸日志平台:
--------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
# Generated by Django 1.11.23 on 2019-10-04 07:31
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="EtlStorageConfig",
            fields=[
                ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="创建时间")),
                ("created_by", models.CharField(default="", max_length=32, verbose_name="创建者")),
                ("updated_at", models.DateTimeField(auto_now=True, null=True, verbose_name="更新时间")),
                ("updated_by", models.CharField(blank=True, default="", max_length=32, verbose_name="修改者")),
                ("is_deleted", models.BooleanField(default=False, verbose_name="是否删除")),
                ("deleted_at", models.DateTimeField(blank=True, null=True, verbose_name="删除时间")),
                ("deleted_by", models.CharField(blank=True, max_length=32, null=True, verbose_name="删除者")),
                ("clean_config_id", models.AutoField(primary_key=True, serialize=False, verbose_name="清洗配置ID")),
                ("clean_config_name", models.CharField(max_length=128, verbose_name="清洗配置名称")),
                ("collector_config_id", models.CharField(max_length=128, verbose_name="采集配置ID")),
                ("clean_type", models.CharField(max_length=64, verbose_name="清洗类型")),
                ("clean_data_id", models.IntegerField(default=None, null=True, verbose_name="清洗侧data id")),
                ("table_id", models.CharField(default=None, max_length=255, null=True, verbose_name="结果表ID")),
            ],
            options={
                "verbose_name": "清洗配置",
                "verbose_name_plural": "清洗配置",
            },
        ),
        migrations.CreateModel(
            name="CleanType",
            fields=[
                ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="创建时间")),
                ("created_by", models.CharField(default="", max_length=32, verbose_name="创建者")),
                ("updated_at", models.DateTimeField(auto_now=True, null=True, verbose_name="更新时间")),
                ("updated_by", models.CharField(blank=True, default="", max_length=32, verbose_name="修改者")),
                ("is_deleted", models.BooleanField(default=False, verbose_name="是否删除")),
                ("deleted_at", models.DateTimeField(blank=True, null=True, verbose_name="删除时间")),
                ("deleted_by", models.CharField(blank=True, max_length=32, null=True, verbose_name="删除者")),
                ("clean_type", models.CharField(max_length=64, primary_key=True, serialize=False, verbose_name="清洗类型")),
                ("clean_type_name", models.CharField(max_length=64, verbose_name="清洗类型名称")),
                (
                    "clean_provider",
                    models.CharField(
                        choices=[("transfer", "Transfer"), ("bkdata", "数据平台")], max_length=32, verbose_name="清洗能力"
                    ),
                ),
                ("is_display", models.BooleanField(default=True, verbose_name="是否展示")),
                ("is_active", models.BooleanField(default=True, verbose_name="是否可用")),
                ("description", models.TextField(default="", verbose_name="描述")),
            ],
            options={
                "verbose_name": "清洗场景",
                "verbose_name_plural": "清洗场景",
            },
        ),
        migrations.CreateModel(
            name="CollectorConfig",
            fields=[
                ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="创建时间")),
                ("created_by", models.CharField(default="", max_length=32, verbose_name="创建者")),
                ("updated_at", models.DateTimeField(auto_now=True, null=True, verbose_name="更新时间")),
                ("updated_by", models.CharField(blank=True, default="", max_length=32, verbose_name="修改者")),
                ("is_deleted", models.BooleanField(default=False, verbose_name="是否删除")),
                ("deleted_at", models.DateTimeField(blank=True, null=True, verbose_name="删除时间")),
                ("deleted_by", models.CharField(blank=True, max_length=32, null=True, verbose_name="删除者")),
                ("collector_config_id", models.AutoField(primary_key=True, serialize=False, verbose_name="采集配置ID")),
                ("collector_config_name", models.CharField(max_length=64, verbose_name="采集配置名称")),
                ("bk_app_code", models.CharField(default="bk_log_search", max_length=64, verbose_name="接入的来源APP")),
                (
                    "collector_scenario_id",
                    models.CharField(
                        choices=[("row", "行日志文件"), ("section", "段日志文件"), ("win_event", "win event日志")],
                        max_length=64,
                        verbose_name="采集场景",
                    ),
                ),
                ("bk_biz_id", models.IntegerField(verbose_name="业务id")),
                ("category_id", models.CharField(max_length=64, verbose_name="数据分类")),
                (
                    "target_object_type",
                    models.CharField(choices=[("HOST", "主机"), ("SERVICE", "服务实例")], max_length=32, verbose_name="对象类型"),
                ),
                (
                    "target_node_type",
                    models.CharField(
                        choices=[("TOPO", "TOPO"), ("INSTANCE", "主机实例")], max_length=32, verbose_name="节点类型"
                    ),
                ),
                ("target_nodes", apps.models.JsonField(default=None, null=True, verbose_name="采集目标")),
                (
                    "target_subscription_diff",
                    apps.models.JsonField(default="[]", null=True, verbose_name="与上一次采集订阅的差异"),
                ),
                ("description", models.TextField(default="", verbose_name="描述")),
                ("is_active", models.BooleanField(default=True, verbose_name="是否可用")),
                ("bk_data_id", models.IntegerField(default=None, null=True, verbose_name="采集链路data_id")),
                ("table_id", models.CharField(default=None, max_length=255, null=True, verbose_name="结果表ID")),
                ("clean_config_id", models.IntegerField(default=None, null=True, verbose_name="清洗配置id")),
                ("subscription_id", models.IntegerField(default=None, null=True, verbose_name="节点管理订阅ID")),
                (
                    "task_id_list",
                    apps.models.MultiStrSplitByCommaField(
                        default=None, max_length=255, null=True, verbose_name="最后一次部署任务"
                    ),
                ),
                ("bkdata_data_id", models.IntegerField(default=None, null=True, verbose_name="接入数据平台data id")),
                ("index_set_id", models.IntegerField(default=None, null=True, verbose_name="索引集id")),
            ],
            options={
                "verbose_name": "用户采集配置",
                "verbose_name_plural": "用户采集配置",
                "ordering": ("-updated_at",),
            },
        ),
    ]
