{
  "namespaces": [
    "public"
  ],
  "name": "public",
  "tables": [
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "customer_id": {
          "name": "customer_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "customer_note": {
          "name": "customer_note",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "shipping_option_id": {
          "name": "shipping_option_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "vendor_reviewer_id": {
          "name": "vendor_reviewer_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "vendor_reviewer_note": {
          "name": "vendor_reviewer_note",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "vendor_review_date": {
          "name": "vendor_review_date",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 6,
          "mappedType": "datetime"
        },
        "admin_reviewer_id": {
          "name": "admin_reviewer_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "admin_reviewer_note": {
          "name": "admin_reviewer_note",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "admin_review_date": {
          "name": "admin_review_date",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 6,
          "mappedType": "datetime"
        },
        "status": {
          "name": "status",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "'pending'",
          "enumItems": [
            "pending",
            "refunded",
            "withdrawn",
            "escalated",
            "canceled"
          ],
          "mappedType": "enum"
        },
        "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": "order_return_request",
      "schema": "public",
      "indexes": [
        {
          "keyName": "IDX_order_return_request_deleted_at",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_return_request_deleted_at\" ON \"order_return_request\" (deleted_at) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "order_return_request_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"
        },
        "line_item_id": {
          "name": "line_item_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "reason_id": {
          "name": "reason_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "quantity": {
          "name": "quantity",
          "type": "integer",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "integer"
        },
        "return_request_id": {
          "name": "return_request_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": "order_return_request_line_item",
      "schema": "public",
      "indexes": [
        {
          "keyName": "IDX_order_return_request_line_item_return_request_id",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_return_request_line_item_return_request_id\" ON \"order_return_request_line_item\" (return_request_id) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "IDX_order_return_request_line_item_deleted_at",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_order_return_request_line_item_deleted_at\" ON \"order_return_request_line_item\" (deleted_at) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "order_return_request_line_item_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "order_return_request_line_item_return_request_id_foreign": {
          "constraintName": "order_return_request_line_item_return_request_id_foreign",
          "columnNames": [
            "return_request_id"
          ],
          "localTableName": "public.order_return_request_line_item",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.order_return_request",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    }
  ],
  "nativeEnums": {}
}