{
  "namespaces": [
    "public"
  ],
  "name": "public",
  "tables": [
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "status": {
          "name": "status",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "'pending'",
          "enumItems": [
            "pending",
            "active",
            "disabled"
          ],
          "mappedType": "enum"
        },
        "reference_id": {
          "name": "reference_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "data": {
          "name": "data",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "json"
        },
        "context": {
          "name": "context",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 6,
          "default": "now()",
          "mappedType": "datetime"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 6,
          "default": "now()",
          "mappedType": "datetime"
        },
        "deleted_at": {
          "name": "deleted_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 6,
          "mappedType": "datetime"
        }
      },
      "name": "payout_account",
      "schema": "public",
      "indexes": [
        {
          "keyName": "IDX_payout_account_deleted_at",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_payout_account_deleted_at\" ON \"payout_account\" (deleted_at) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "payout_account_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {},
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "currency_code": {
          "name": "currency_code",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "amount": {
          "name": "amount",
          "type": "numeric",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "decimal"
        },
        "data": {
          "name": "data",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "payout_account_id": {
          "name": "payout_account_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "raw_amount": {
          "name": "raw_amount",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "json"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 6,
          "default": "now()",
          "mappedType": "datetime"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 6,
          "default": "now()",
          "mappedType": "datetime"
        },
        "deleted_at": {
          "name": "deleted_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 6,
          "mappedType": "datetime"
        }
      },
      "name": "payout",
      "schema": "public",
      "indexes": [
        {
          "keyName": "IDX_payout_payout_account_id",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_payout_payout_account_id\" ON \"payout\" (payout_account_id) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "IDX_payout_deleted_at",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_payout_deleted_at\" ON \"payout\" (deleted_at) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "payout_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "payout_payout_account_id_foreign": {
          "constraintName": "payout_payout_account_id_foreign",
          "columnNames": [
            "payout_account_id"
          ],
          "localTableName": "public.payout",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.payout_account",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "data": {
          "name": "data",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "context": {
          "name": "context",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "payout_account_id": {
          "name": "payout_account_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 6,
          "default": "now()",
          "mappedType": "datetime"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 6,
          "default": "now()",
          "mappedType": "datetime"
        },
        "deleted_at": {
          "name": "deleted_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 6,
          "mappedType": "datetime"
        }
      },
      "name": "onboarding",
      "schema": "public",
      "indexes": [
        {
          "keyName": "IDX_onboarding_payout_account_id_unique",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE UNIQUE INDEX IF NOT EXISTS \"IDX_onboarding_payout_account_id_unique\" ON \"onboarding\" (payout_account_id) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "IDX_onboarding_deleted_at",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_onboarding_deleted_at\" ON \"onboarding\" (deleted_at) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "onboarding_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "onboarding_payout_account_id_foreign": {
          "constraintName": "onboarding_payout_account_id_foreign",
          "columnNames": [
            "payout_account_id"
          ],
          "localTableName": "public.onboarding",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.payout_account",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "currency_code": {
          "name": "currency_code",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "amount": {
          "name": "amount",
          "type": "numeric",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "decimal"
        },
        "data": {
          "name": "data",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "payout_id": {
          "name": "payout_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "raw_amount": {
          "name": "raw_amount",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "json"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 6,
          "default": "now()",
          "mappedType": "datetime"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 6,
          "default": "now()",
          "mappedType": "datetime"
        },
        "deleted_at": {
          "name": "deleted_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 6,
          "mappedType": "datetime"
        }
      },
      "name": "payout_reversal",
      "schema": "public",
      "indexes": [
        {
          "keyName": "IDX_payout_reversal_payout_id",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_payout_reversal_payout_id\" ON \"payout_reversal\" (payout_id) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "IDX_payout_reversal_deleted_at",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_payout_reversal_deleted_at\" ON \"payout_reversal\" (deleted_at) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "payout_reversal_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "payout_reversal_payout_id_foreign": {
          "constraintName": "payout_reversal_payout_id_foreign",
          "columnNames": [
            "payout_id"
          ],
          "localTableName": "public.payout_reversal",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.payout",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    }
  ],
  "nativeEnums": {}
}
