{
  "name": "客户",
  "table": {
    "name": "customer",
    "comment": "客户表",
    "engine": "InnoDB"
  },
  "columns": [
    {
      "label": "ID",
      "name": "id",
      "type": "ID",
      "comment": "ID"
    },
    {
      "label": "来源",
      "name": "channel_id",
      "type": "bigInteger",
      "comment": "客户来源"
    },
    {
      "label": "公司名称",
      "name": "name",
      "type": "string",
      "length": 200,
      "comment": "公司全称",
      "unique": true
    },
    {
      "label": "公司简称",
      "name": "short_name",
      "type": "string",
      "length": 200,
      "comment": "简称",
      "nullable": true,
      "index": true
    },
    {
      "name": "credit_no",
      "type": "string",
      "length": 200,
      "comment": "统一社会信用代码",
      "nullable": true,
      "unique": true
    },
    {
      "name": "oper_name",
      "type": "string",
      "length": 50,
      "comment": "法人代表",
      "nullable": true,
      "index": true
    },
    {
      "label": "注册资本(万元)",
      "name": "reg_capi",
      "type": "integer",
      "comment": "注册资本(万元)",
      "nullable": true,
      "index": true
    },
    {
      "label": "注册时间",
      "name": "opened_at",
      "type": "date",
      "comment": "注册时间",
      "nullable": true,
      "index": true
    },
    {
      "label": "省份",
      "name": "province",
      "type": "string",
      "length": 50,
      "comment": "总部所在省份",
      "nullable": true,
      "index": true
    },
    {
      "label": "城市",
      "name": "city",
      "type": "string",
      "length": 100,
      "comment": "总部所在城市",
      "nullable": true,
      "index": true
    },
    {
      "label": "地址",
      "name": "address",
      "type": "string",
      "length": 255,
      "comment": "总部地址",
      "nullable": true,
      "index": true
    },
    {
      "label": "经度",
      "name": "lng",
      "type": "unsignedDecimal",
      "precision": 12,
      "scale": 6,
      "comment": "经度",
      "nullable": true,
      "index": true
    },
    {
      "label": "纬度",
      "name": "lat",
      "type": "unsignedDecimal",
      "comment": "纬度",
      "precision": 12,
      "scale": 6,
      "nullable": true,
      "index": true
    },
    {
      "label": "经营状态",
      "name": "company_status",
      "type": "string",
      "length": 255,
      "comment": "经营状态",
      "nullable": true,
      "index": true
    },
    {
      "label": "LOGO",
      "name": "logo",
      "type": "json",
      "comment": "LOGO",
      "nullable": true
    },
    {
      "label": "简介",
      "name": "summary",
      "type": "string",
      "length": 600,
      "comment": "简介",
      "nullable": true,
      "index": true
    },
    {
      "label": "官网",
      "name": "link",
      "type": "string",
      "length": 200,
      "comment": "官网地址",
      "nullable": true
    },
    {
      "label": "联系人",
      "name": "contact_name",
      "type": "string",
      "length": 200,
      "comment": "联系人姓名",
      "nullable": true,
      "index": true
    },
    {
      "label": "联系人职务",
      "name": "contact_title",
      "type": "string",
      "length": 200,
      "comment": "联系人职务",
      "nullable": true,
      "index": true
    },
    {
      "label": "联系电话",
      "name": "contact_mobile",
      "type": "string",
      "comment": "联系电话",
      "nullable": true,
      "index": true
    },
    {
      "label": "联系微信",
      "name": "contact_wechat",
      "type": "string",
      "comment": "联系微信",
      "nullable": true,
      "index": true
    },
    {
      "label": "介绍",
      "name": "desc",
      "type": "text",
      "comment": "介绍",
      "nullable": true
    },
    {
      "label": "领域",
      "name": "fields",
      "type": "json",
      "comment": "服务领域(多选)",
      "nullable": true,
      "index": true
    },
    {
      "label": "行业",
      "name": "industries",
      "type": "json",
      "comment": "行业覆盖(多选)",
      "nullable": true,
      "index": true
    },
    {
      "label": "标签",
      "name": "tags",
      "type": "json",
      "comment": "标签(多选)",
      "nullable": true,
      "index": true
    },
    {
      "label": "关系",
      "name": "relation",
      "type": "enum",
      "default": "正在接洽",
      "option": ["已有合作", "正在接洽", "潜在客户"],
      "comment": "合作关系: 已有合作, 正在接洽, 潜在客户",
      "index": true
    }
  ],
  "relations": {},
  "option": {
    "timestamps": true,
    "soft_deletes": true
  }
}
