[
  {
    "namespace": "com.huawei.hwclouds.drs.avro",
    "name": "Field",
    "type": "record",
    "fields": [
      {
        "name": "name",
        "type": "string"
      },
      {
        "name": "dataTypeNumber",
        "type": "int",
        "doc": "4, Integer",
        "doc": "12, Character",
        "doc": "3, Decimal",
        "doc": "6, Float",
        "doc": "8, Double",
        "doc": "-7, Bit",
        "doc": "91, Date",
        "doc": "92, Time",
        "doc": "94, DateTime",
        "doc": "93, Timestamp",
        "doc": "2004, BinaryObject"
      }
    ]
  },
  {
    "namespace": "com.huawei.hwclouds.drs.avro",
    "type": "record",
    "name": "Integer",
    "fields": [
      {
        "name": "precision",
        "type": "int"
      },
      {
        "name": "value",
        "type": "string"
      }
    ]
  },
  {
    "namespace": "com.huawei.hwclouds.drs.avro",
    "type": "record",
    "name": "Character",
    "fields": [
      {
        "name": "charset",
        "type": "string"
      },
      {
        "name": "value",
        "type": "bytes"
      }
    ]
  },
  {
    "namespace": "com.huawei.hwclouds.drs.avro",
    "type": "record",
    "name": "Float",
    "fields": [
      {
        "name": "value",
        "type": "double"
      },
      {
        "name": "precision",
        "type": "int"
      },
      {
        "name": "scale",
        "type": "int"
      }
    ]
  },
  {
    "namespace": "com.huawei.hwclouds.drs.avro",
    "type": "record",
    "name": "Decimal",
    "fields": [
      {
        "name": "value",
        "type": "string"
      },
      {
        "name": "precision",
        "type": "int"
      },
      {
        "name": "scale",
        "type": "int"
      }
    ]
  },
  {
    "namespace": "com.huawei.hwclouds.drs.avro",
    "type": "record",
    "name": "Timestamp",
    "fields": [
      {
        "name": "timestamp",
        "type": "long"
      },
      {
        "name": "millis",
        "type": "int"
      }
    ]
  },
  {
    "namespace": "com.huawei.hwclouds.drs.avro",
    "type": "record",
    "name": "TimestampWithTimezone",
    "fields": [
      {
          "name": "value",
          "type": "string",
          "doc": "format:YYYY-MM-DD HH24:MI:SS.ff"
      },
      {
          "name": "timezone",
          "type": "string"
      }
    ]
  },
  {
      "namespace": "com.huawei.hwclouds.drs.avro",
      "type": "record",
      "name": "Date",
      "fields": [
        {
          "name": "value",
          "type": "string",
          "doc": "Field.dataTypeNumber = 91(Date) format:YYYY-MM-DD",
          "doc": "Field.dataTypeNumber = 92(Time) format:HH24:MI:SS",
          "doc": "Field.dataTypeNumber = 94(DateTime) format:YYYY-MM-DD HH24:MI:SS.ff"
        }
      ]
    },
  {
    "namespace": "com.huawei.hwclouds.drs.avro",
    "type": "record",
    "name": "Bit",
    "fields": [
      {
        "name": "precision",
        "type": "int"
      },
      {
        "name": "value",
        "type": "string"
      }
    ]
  },
  {
    "namespace": "com.huawei.hwclouds.drs.avro",
    "type": "record",
    "name": "BinaryObject",
    "fields": [
      {
        "name": "type",
        "type": "string"
      },
      {
        "name": "value",
        "type": "bytes"
      }
    ]
  },
    {
        "namespace": "com.huawei.hwclouds.drs.avro",
        "type": "record",
        "name": "Record",
        "fields": [
          {
            "name": "version",
            "type": "string",
            "doc": "version infomation"
          },
          {
            "name": "seqno",
            "type": "long",
            "doc": "seqno"
          },
          {
            "name": "shardId",
            "type": "long",
            "doc": "shardId"
          },
          {
            "name": "eventid",
            "type": "string",
            "doc": "eventid"
          },
          {
            "name": "updateTimestamp",
            "type": "long",
            "doc": "updateTimestamp"
          },
          {
            "name": "tableName",
            "default": null,
            "type": [
              "null",
              "string"
            ]
          },
          {
            "name": "operation",
            "type": "string",
            "doc": "INSERT,DELETE,UPDATE,DDL"
          },
          {
            "name": "columnCount",
            "type": "long",
            "doc": "field column count"
          },
          {
            "name": "fields",
            "default": null,
            "type": [
              "null",
              {
                "type": "array",
                "items": "com.huawei.hwclouds.drs.avro.Field"
              }
            ]
          },
          {
            "name": "beforeImages",
            "default": null,
            "type": [
              "null",
              {
                "type": "array",
                "items": [
                  "null",
                  "com.huawei.hwclouds.drs.avro.Integer",
                  "com.huawei.hwclouds.drs.avro.Character",
                  "com.huawei.hwclouds.drs.avro.Decimal",
                  "com.huawei.hwclouds.drs.avro.Float",
                  "com.huawei.hwclouds.drs.avro.Timestamp",
                  "com.huawei.hwclouds.drs.avro.Date",
                  "com.huawei.hwclouds.drs.avro.Bit",
                  "com.huawei.hwclouds.drs.avro.BinaryObject",
				  "com.huawei.hwclouds.drs.avro.TimestampWithTimezone"
                ]
              }
            ]
          },
          {
            "name": "afterImages",
            "default": null,
            "type": [
              "null",
              {
                "type": "array",
                "items": [
                  "null",
                  "com.huawei.hwclouds.drs.avro.Integer",
                  "com.huawei.hwclouds.drs.avro.Character",
                  "com.huawei.hwclouds.drs.avro.Decimal",
                  "com.huawei.hwclouds.drs.avro.Float",
                  "com.huawei.hwclouds.drs.avro.Timestamp",
                  "com.huawei.hwclouds.drs.avro.Date",
                  "com.huawei.hwclouds.drs.avro.Bit",
                  "com.huawei.hwclouds.drs.avro.BinaryObject",
				  "com.huawei.hwclouds.drs.avro.TimestampWithTimezone"
                ]
              }
            ]
          },
          {
            "name": "signature",
            "default": null,
            "type": [
              "null",
              "string"
            ],
            "doc":"signature"
          },
          {
            "name": "transactionId",
            "default": null,
            "type": [
              "null",
              "long"
            ],
            "doc":"Transaction Id"
          },
          {
            "name": "rowid",
            "default": null,
            "type": [
              "null",
              "string"
            ],
            "doc":"rowid"
          },
          {
            "name": "sourceDb",
            "default": null,
            "type": [
              "null",
              "string"
            ],
            "doc":"mysql,oracle"
          }
        ]
    }
]
