{
  "namespaces": [
    "public"
  ],
  "name": "public",
  "tables": [
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "store_status": {
          "name": "store_status",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "'ACTIVE'",
          "enumItems": [
            "ACTIVE",
            "INACTIVE",
            "SUSPENDED"
          ],
          "mappedType": "enum"
        },
        "name": {
          "name": "name",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "handle": {
          "name": "handle",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "description": {
          "name": "description",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "photo": {
          "name": "photo",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "email": {
          "name": "email",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "phone": {
          "name": "phone",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "address_line": {
          "name": "address_line",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "city": {
          "name": "city",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "state": {
          "name": "state",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "postal_code": {
          "name": "postal_code",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "country_code": {
          "name": "country_code",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "tax_id": {
          "name": "tax_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "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": "seller",
      "schema": "public",
      "indexes": [
        {
          "keyName": "IDX_seller_handle_unique",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE UNIQUE INDEX IF NOT EXISTS \"IDX_seller_handle_unique\" ON \"seller\" (handle) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "IDX_seller_deleted_at",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_seller_deleted_at\" ON \"seller\" (deleted_at) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "seller_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"
        },
        "email": {
          "name": "email",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "role": {
          "name": "role",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "'owner'",
          "enumItems": [
            "owner",
            "admin",
            "member"
          ],
          "mappedType": "enum"
        },
        "seller_id": {
          "name": "seller_id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "token": {
          "name": "token",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 6,
          "mappedType": "datetime"
        },
        "accepted": {
          "name": "accepted",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "false",
          "mappedType": "boolean"
        },
        "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": "member_invite",
      "schema": "public",
      "indexes": [
        {
          "keyName": "IDX_member_invite_seller_id",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_member_invite_seller_id\" ON \"member_invite\" (seller_id) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "IDX_member_invite_deleted_at",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_member_invite_deleted_at\" ON \"member_invite\" (deleted_at) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "member_invite_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "member_invite_seller_id_foreign": {
          "constraintName": "member_invite_seller_id_foreign",
          "columnNames": [
            "seller_id"
          ],
          "localTableName": "public.member_invite",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.seller",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "role": {
          "name": "role",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "'owner'",
          "enumItems": [
            "owner",
            "admin",
            "member"
          ],
          "mappedType": "enum"
        },
        "name": {
          "name": "name",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "email": {
          "name": "email",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "bio": {
          "name": "bio",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "phone": {
          "name": "phone",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "photo": {
          "name": "photo",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "seller_id": {
          "name": "seller_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": "member",
      "schema": "public",
      "indexes": [
        {
          "keyName": "IDX_member_seller_id",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_member_seller_id\" ON \"member\" (seller_id) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "IDX_member_deleted_at",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_member_deleted_at\" ON \"member\" (deleted_at) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "member_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "member_seller_id_foreign": {
          "constraintName": "member_seller_id_foreign",
          "columnNames": [
            "seller_id"
          ],
          "localTableName": "public.member",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.seller",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "text"
        },
        "store_information": {
          "name": "store_information",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "false",
          "mappedType": "boolean"
        },
        "stripe_connection": {
          "name": "stripe_connection",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "false",
          "mappedType": "boolean"
        },
        "locations_shipping": {
          "name": "locations_shipping",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "false",
          "mappedType": "boolean"
        },
        "products": {
          "name": "products",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "false",
          "mappedType": "boolean"
        },
        "seller_id": {
          "name": "seller_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": "seller_onboarding",
      "schema": "public",
      "indexes": [
        {
          "keyName": "IDX_seller_onboarding_seller_id_unique",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE UNIQUE INDEX IF NOT EXISTS \"IDX_seller_onboarding_seller_id_unique\" ON \"seller_onboarding\" (seller_id) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "IDX_seller_onboarding_deleted_at",
          "columnNames": [],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false,
          "expression": "CREATE INDEX IF NOT EXISTS \"IDX_seller_onboarding_deleted_at\" ON \"seller_onboarding\" (deleted_at) WHERE deleted_at IS NULL"
        },
        {
          "keyName": "seller_onboarding_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "seller_onboarding_seller_id_foreign": {
          "constraintName": "seller_onboarding_seller_id_foreign",
          "columnNames": [
            "seller_id"
          ],
          "localTableName": "public.seller_onboarding",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.seller",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    }
  ],
  "nativeEnums": {}
}
