text: # -*- 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.
  We undertake not to change the open source license (MIT license) applicable to the current version of
  the project delivered to anyone in the future.
  """
  # Generated by Django 1.11.23 on 2020-11-11 02:50
  from __future__ import unicode_literals
  
  import apps.models
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ("log_extract", "0016_tasks_ex_data"),
      ]
  
      operations = [
          migrations.CreateModel(
              name="ExtractLink",
              fields=[
                  ("link_id", models.AutoField(primary_key=True, serialize=False, verbose_name="链路id")),
                  (
                      "link_type",
                      models.CharField(
                          choices=[("common", "内网链路"), ("qcloud_cos", "腾讯云cos链路")],
                          default="common",
                          max_length=20,
                          verbose_name="链路类型",
                      ),
                  ),
                  ("operator", models.CharField(max_length=255, verbose_name="执行人")),
                  ("op_bk_biz_id", models.IntegerField(verbose_name="执行bk_biz_id")),
                  (
                      "qcloud_secret_id",
                      apps.models.EncryptionField(
                          blank=True, default="", help_text="内网链路不需要填写", null=True, verbose_name="腾讯云SecretId"
                      ),
                  ),
                  (
                      "qcloud_secret_key",
                      apps.models.EncryptionField(
                          blank=True, default="", help_text="内网链路不需要填写", null=True, verbose_name="腾讯云SecretKey"
                      ),
                  ),
                  (
                      "qcloud_cos_bucket",
                      models.CharField(
                          blank=True, default="", help_text="内网链路不需要填写", max_length=255, verbose_name="腾讯云Cos桶名称"
                      ),
                  ),
                  (
                      "qcloud_cos_region",
                      models.CharField(
                          blank=True, default="", help_text="内网链路不需要填写", max_length=255, verbose_name="腾讯云Cos区域"
                      ),
                  ),
                  ("is_enable", models.BooleanField(default=True, verbose_name="是否启用")),
              ],
              options={
                  "verbose_name": "提取链路",
                  "verbose_name_plural": "提取链路",
              },
          ),
          migrations.CreateModel(
              name="ExtractLinkHost",
              fields=[
                  ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                  ("target_dir", models.CharField(default="", max_length=255, verbose_name="挂载目录")),
                  ("bk_cloud_id", models.IntegerField(verbose_name="主机云区域id")),
                  ("ip", models.GenericIPAddressField(verbose_name="主机ip")),
                  ("link", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="log_extract.ExtractLink")),
              ],
              options={
                  "verbose_name": "链路中转机",
                  "verbose_name_plural": "链路中转机",
              },
          ),
          migrations.AddField(
              model_name="tasks",
              name="cos_file_name",
              field=models.CharField(blank=True, max_length=255, null=True, verbose_name="cos对象文件名称"),
          ),
          migrations.AddField(
              model_name="tasks",
              name="link_id",
              field=models.IntegerField(blank=True, null=True, verbose_name="链路id"),
          ),
      ]
  