{
  "namespaces": [
    "public"
  ],
  "name": "public",
  "tables": [
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "first_name": {
          "name": "first_name",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "last_name": {
          "name": "last_name",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "phone": {
          "name": "phone",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        }
      },
      "name": "admins",
      "schema": "public",
      "indexes": [
        {
          "columnNames": [
            "phone"
          ],
          "composite": false,
          "keyName": "admins_phone_unique",
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "keyName": "admins_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "admins_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "admins_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {},
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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": {
          "name": "name",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        }
      },
      "name": "icon_groups",
      "schema": "public",
      "indexes": [
        {
          "keyName": "icon_groups_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "icon_groups_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "icon_groups_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {},
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "url": {
          "name": "url",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "group_id": {
          "name": "group_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        }
      },
      "name": "icons",
      "schema": "public",
      "indexes": [
        {
          "keyName": "icons_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "icons_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "icons_group_id_index",
          "columnNames": [
            "group_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "icons_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "icons_group_id_foreign": {
          "constraintName": "icons_group_id_foreign",
          "columnNames": [
            "group_id"
          ],
          "localTableName": "public.icons",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.icon_groups",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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": {
          "name": "name",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "title": {
          "name": "title",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        }
      },
      "name": "permissions",
      "schema": "public",
      "indexes": [
        {
          "columnNames": [
            "name"
          ],
          "composite": false,
          "keyName": "permissions_name_unique",
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "keyName": "permissions_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "permissions_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "permissions_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {},
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "hashed_token": {
          "name": "hashed_token",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "owner_id": {
          "name": "owner_id",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "rest_id": {
          "name": "rest_id",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "type": {
          "name": "type",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "user",
            "admin"
          ],
          "mappedType": "enum"
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 6,
          "mappedType": "datetime"
        }
      },
      "name": "refreshtokens",
      "schema": "public",
      "indexes": [
        {
          "keyName": "refreshtokens_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "refreshtokens_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "refreshtokens_expires_at_index",
          "columnNames": [
            "expires_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "refreshtokens_hashed_token_index",
          "columnNames": [
            "hashed_token"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "refreshtokens_owner_id_rest_id_type_index",
          "columnNames": [
            "owner_id",
            "rest_id",
            "type"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "refreshtokens_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {},
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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": {
          "name": "name",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "slug": {
          "name": "slug",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "logo": {
          "name": "logo",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "address": {
          "name": "address",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "menu_color": {
          "name": "menu_color",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "latitude": {
          "name": "latitude",
          "type": "numeric(10,7)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "precision": 10,
          "scale": 7,
          "mappedType": "decimal"
        },
        "longitude": {
          "name": "longitude",
          "type": "numeric(10,7)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "precision": 10,
          "scale": 7,
          "mappedType": "decimal"
        },
        "service_area": {
          "name": "service_area",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "true",
          "mappedType": "boolean"
        },
        "established_year": {
          "name": "established_year",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "integer"
        },
        "phone": {
          "name": "phone",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "instagram": {
          "name": "instagram",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "telegram": {
          "name": "telegram",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "whatsapp": {
          "name": "whatsapp",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "description": {
          "name": "description",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "seo_title": {
          "name": "seo_title",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "seo_description": {
          "name": "seo_description",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "tag_names": {
          "name": "tag_names",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "images": {
          "name": "images",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "vat": {
          "name": "vat",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "default": "0",
          "mappedType": "decimal"
        },
        "domain": {
          "name": "domain",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "score": {
          "name": "score",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "plan": {
          "name": "plan",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "'base'",
          "enumItems": [
            "base",
            "premium"
          ],
          "mappedType": "enum"
        },
        "subscription_id": {
          "name": "subscription_id",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "subscription_end_date": {
          "name": "subscription_end_date",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 6,
          "mappedType": "datetime"
        },
        "subscription_start_date": {
          "name": "subscription_start_date",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 6,
          "mappedType": "datetime"
        }
      },
      "name": "restaurants",
      "schema": "public",
      "indexes": [
        {
          "columnNames": [
            "slug"
          ],
          "composite": false,
          "keyName": "restaurants_slug_unique",
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "columnNames": [
            "subscription_id"
          ],
          "composite": false,
          "keyName": "restaurants_subscription_id_unique",
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "keyName": "restaurants_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "restaurants_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "restaurants_slug_index",
          "columnNames": [
            "slug"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "restaurants_slug_is_active_index",
          "columnNames": [
            "slug",
            "is_active"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "restaurants_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {},
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "method": {
          "name": "method",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "Online",
            "Cash",
            "Wallet",
            "CreditCard"
          ],
          "mappedType": "enum"
        },
        "gateway": {
          "name": "gateway",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "enumItems": [
            "zarinpal"
          ],
          "mappedType": "enum"
        },
        "description": {
          "name": "description",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "card_number": {
          "name": "card_number",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "true",
          "mappedType": "boolean"
        },
        "order": {
          "name": "order",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "0",
          "mappedType": "integer"
        },
        "merchant_id": {
          "name": "merchant_id",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        }
      },
      "name": "payment_methods",
      "schema": "public",
      "indexes": [
        {
          "keyName": "payment_methods_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "payment_methods_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "payment_methods_restaurant_id_index",
          "columnNames": [
            "restaurant_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "payment_methods_restaurant_id_enabled_index",
          "columnNames": [
            "restaurant_id",
            "enabled"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "payment_methods_restaurant_id_method_unique",
          "columnNames": [
            "restaurant_id",
            "method"
          ],
          "composite": true,
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "keyName": "payment_methods_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "payment_methods_restaurant_id_foreign": {
          "constraintName": "payment_methods_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.payment_methods",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "title": {
          "name": "title",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "channels": {
          "name": "channels",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "json"
        }
      },
      "name": "notification_preferences",
      "schema": "public",
      "indexes": [
        {
          "keyName": "notification_preferences_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "notification_preferences_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "notification_preferences_restaurant_id_title_unique",
          "columnNames": [
            "restaurant_id",
            "title"
          ],
          "composite": true,
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "keyName": "notification_preferences_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "notification_preferences_restaurant_id_foreign": {
          "constraintName": "notification_preferences_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.notification_preferences",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "method": {
          "name": "method",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "dineIn",
            "customerPickup",
            "deliveryCar",
            "deliveryCourier"
          ],
          "mappedType": "enum"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "delivery_fee": {
          "name": "delivery_fee",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "0",
          "mappedType": "integer"
        },
        "delivery_fee_type": {
          "name": "delivery_fee_type",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "'fixed'",
          "enumItems": [
            "fixed",
            "distanceBased"
          ],
          "mappedType": "enum"
        },
        "per_kilometer_fee": {
          "name": "per_kilometer_fee",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "default": "0",
          "mappedType": "integer"
        },
        "distance_based_min_cost": {
          "name": "distance_based_min_cost",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "default": "0",
          "mappedType": "integer"
        },
        "min_order_price": {
          "name": "min_order_price",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "0",
          "mappedType": "integer"
        },
        "description": {
          "name": "description",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "true",
          "mappedType": "boolean"
        },
        "order": {
          "name": "order",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "0",
          "mappedType": "integer"
        }
      },
      "name": "deliveries",
      "schema": "public",
      "indexes": [
        {
          "keyName": "deliveries_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "deliveries_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "deliveries_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "deliveries_restaurant_id_foreign": {
          "constraintName": "deliveries_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.deliveries",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "code": {
          "name": "code",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "name": {
          "name": "name",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "description": {
          "name": "description",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "type": {
          "name": "type",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "PERCENTAGE",
            "FIXED"
          ],
          "mappedType": "enum"
        },
        "value": {
          "name": "value",
          "type": "numeric(10,2)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 2,
          "mappedType": "decimal"
        },
        "max_discount": {
          "name": "max_discount",
          "type": "numeric(10,2)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "precision": 10,
          "scale": 2,
          "mappedType": "decimal"
        },
        "min_order_amount": {
          "name": "min_order_amount",
          "type": "numeric(10,2)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "precision": 10,
          "scale": 2,
          "mappedType": "decimal"
        },
        "max_uses": {
          "name": "max_uses",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "integer"
        },
        "used_count": {
          "name": "used_count",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "0",
          "mappedType": "integer"
        },
        "max_uses_per_user": {
          "name": "max_uses_per_user",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "integer"
        },
        "start_date": {
          "name": "start_date",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 6,
          "mappedType": "datetime"
        },
        "end_date": {
          "name": "end_date",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 6,
          "mappedType": "datetime"
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "true",
          "mappedType": "boolean"
        },
        "food_categories": {
          "name": "food_categories",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "foods": {
          "name": "foods",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "user_phone": {
          "name": "user_phone",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        }
      },
      "name": "coupons",
      "schema": "public",
      "indexes": [
        {
          "keyName": "coupons_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "coupons_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "coupons_code_index",
          "columnNames": [
            "code"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "coupons_restaurant_id_is_active_index",
          "columnNames": [
            "restaurant_id",
            "is_active"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "coupons_restaurant_id_code_is_active_index",
          "columnNames": [
            "restaurant_id",
            "code",
            "is_active"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "coupons_code_restaurant_id_unique",
          "columnNames": [
            "code",
            "restaurant_id"
          ],
          "composite": true,
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "keyName": "coupons_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "coupons_restaurant_id_foreign": {
          "constraintName": "coupons_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.coupons",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "subject": {
          "name": "subject",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "content": {
          "name": "content",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "phone": {
          "name": "phone",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "scope": {
          "name": "scope",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "application",
            "restaurant"
          ],
          "mappedType": "enum"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 26,
          "mappedType": "character"
        },
        "status": {
          "name": "status",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "default": "'new'",
          "mappedType": "string"
        }
      },
      "name": "contacts",
      "schema": "public",
      "indexes": [
        {
          "keyName": "contacts_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "contacts_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "contacts_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "contacts_restaurant_id_foreign": {
          "constraintName": "contacts_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.contacts",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "deleteRule": "set null",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "title": {
          "name": "title",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "true",
          "mappedType": "boolean"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "avatar_url": {
          "name": "avatar_url",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "order": {
          "name": "order",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "integer"
        }
      },
      "name": "categories",
      "schema": "public",
      "indexes": [
        {
          "keyName": "categories_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "categories_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "categories_is_active_index",
          "columnNames": [
            "is_active"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "categories_restaurant_id_id_index",
          "columnNames": [
            "restaurant_id",
            "id"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "categories_restaurant_id_is_active_index",
          "columnNames": [
            "restaurant_id",
            "is_active"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "categories_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "categories_restaurant_id_foreign": {
          "constraintName": "categories_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.categories",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "category_id": {
          "name": "category_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "title": {
          "name": "title",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "desc": {
          "name": "desc",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "content": {
          "name": "content",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "price": {
          "name": "price",
          "type": "numeric(10,2)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "precision": 10,
          "scale": 2,
          "mappedType": "decimal"
        },
        "order": {
          "name": "order",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "integer"
        },
        "prepare_time": {
          "name": "prepare_time",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "integer"
        },
        "week_days": {
          "name": "week_days",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "'[]'",
          "mappedType": "json"
        },
        "meal_types": {
          "name": "meal_types",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "'[]'",
          "mappedType": "json"
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "true",
          "mappedType": "boolean"
        },
        "images": {
          "name": "images",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "in_place_serve": {
          "name": "in_place_serve",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "false",
          "mappedType": "boolean"
        },
        "pickup_serve": {
          "name": "pickup_serve",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "false",
          "mappedType": "boolean"
        },
        "score": {
          "name": "score",
          "type": "real",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "default": "null",
          "mappedType": "float"
        },
        "discount": {
          "name": "discount",
          "type": "real",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "0",
          "mappedType": "float"
        },
        "is_special_offer": {
          "name": "is_special_offer",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "false",
          "mappedType": "boolean"
        }
      },
      "name": "foods",
      "schema": "public",
      "indexes": [
        {
          "keyName": "foods_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "foods_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "foods_restaurant_id_is_active_index",
          "columnNames": [
            "restaurant_id",
            "is_active"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "foods_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "foods_restaurant_id_foreign": {
          "constraintName": "foods_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.foods",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "updateRule": "cascade"
        },
        "foods_category_id_foreign": {
          "constraintName": "foods_category_id_foreign",
          "columnNames": [
            "category_id"
          ],
          "localTableName": "public.foods",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.categories",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "food_id": {
          "name": "food_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 26,
          "mappedType": "character"
        },
        "total_stock": {
          "name": "total_stock",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "integer"
        },
        "available_stock": {
          "name": "available_stock",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "integer"
        }
      },
      "name": "inventory",
      "schema": "public",
      "indexes": [
        {
          "columnNames": [
            "food_id"
          ],
          "composite": false,
          "keyName": "inventory_food_id_unique",
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "keyName": "inventory_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "inventory_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "inventory_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "inventory_food_id_foreign": {
          "constraintName": "inventory_food_id_foreign",
          "columnNames": [
            "food_id"
          ],
          "localTableName": "public.inventory",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.foods",
          "deleteRule": "cascade",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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": {
          "name": "name",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "is_system": {
          "name": "is_system",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "false",
          "mappedType": "boolean"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 26,
          "mappedType": "character"
        }
      },
      "name": "roles",
      "schema": "public",
      "indexes": [
        {
          "keyName": "roles_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "roles_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "roles_restaurant_id_index",
          "columnNames": [
            "restaurant_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "roles_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "roles_restaurant_id_foreign": {
          "constraintName": "roles_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.roles",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "deleteRule": "set null",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "admin_id": {
          "name": "admin_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "role_id": {
          "name": "role_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 26,
          "mappedType": "character"
        }
      },
      "name": "admin_roles",
      "schema": "public",
      "indexes": [
        {
          "keyName": "admin_roles_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "admin_roles_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "admin_roles_restaurant_id_index",
          "columnNames": [
            "restaurant_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "admin_roles_admin_id_index",
          "columnNames": [
            "admin_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "admin_roles_admin_id_restaurant_id_index",
          "columnNames": [
            "admin_id",
            "restaurant_id"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "admin_roles_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "admin_roles_admin_id_foreign": {
          "constraintName": "admin_roles_admin_id_foreign",
          "columnNames": [
            "admin_id"
          ],
          "localTableName": "public.admin_roles",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.admins",
          "updateRule": "cascade"
        },
        "admin_roles_role_id_foreign": {
          "constraintName": "admin_roles_role_id_foreign",
          "columnNames": [
            "role_id"
          ],
          "localTableName": "public.admin_roles",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.roles",
          "updateRule": "cascade"
        },
        "admin_roles_restaurant_id_foreign": {
          "constraintName": "admin_roles_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.admin_roles",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "deleteRule": "set null",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "role_id": {
          "name": "role_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "permission_id": {
          "name": "permission_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        }
      },
      "name": "role_permissions",
      "schema": "public",
      "indexes": [
        {
          "keyName": "role_permissions_pkey",
          "columnNames": [
            "role_id",
            "permission_id"
          ],
          "composite": true,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "role_permissions_role_id_foreign": {
          "constraintName": "role_permissions_role_id_foreign",
          "columnNames": [
            "role_id"
          ],
          "localTableName": "public.role_permissions",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.roles",
          "updateRule": "cascade"
        },
        "role_permissions_permission_id_foreign": {
          "constraintName": "role_permissions_permission_id_foreign",
          "columnNames": [
            "permission_id"
          ],
          "localTableName": "public.role_permissions",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.permissions",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "week_day": {
          "name": "week_day",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "integer"
        },
        "open_time": {
          "name": "open_time",
          "type": "time(0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 0,
          "mappedType": "time"
        },
        "close_time": {
          "name": "close_time",
          "type": "time(0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 0,
          "mappedType": "time"
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "true",
          "mappedType": "boolean"
        },
        "rest_id": {
          "name": "rest_id",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        }
      },
      "name": "schedules",
      "schema": "public",
      "indexes": [
        {
          "keyName": "schedules_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "schedules_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "schedules_rest_id_index",
          "columnNames": [
            "rest_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "schedules_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {},
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "unsigned": false,
          "autoincrement": true,
          "primary": true,
          "nullable": false,
          "mappedType": "integer"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "phone": {
          "name": "phone",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 6,
          "mappedType": "datetime"
        }
      },
      "name": "sms_logs",
      "schema": "public",
      "indexes": [
        {
          "keyName": "sms_logs_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "sms_logs_restaurant_id_foreign": {
          "constraintName": "sms_logs_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.sms_logs",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "first_name": {
          "name": "first_name",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "last_name": {
          "name": "last_name",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "phone": {
          "name": "phone",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "birth_date": {
          "name": "birth_date",
          "type": "date",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 0,
          "default": "null",
          "mappedType": "date"
        },
        "marriage_date": {
          "name": "marriage_date",
          "type": "date",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 0,
          "default": "null",
          "mappedType": "date"
        },
        "referrer": {
          "name": "referrer",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "true",
          "mappedType": "boolean"
        },
        "gender": {
          "name": "gender",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "default": "true",
          "mappedType": "boolean"
        },
        "avatar_url": {
          "name": "avatar_url",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        }
      },
      "name": "users",
      "schema": "public",
      "indexes": [
        {
          "columnNames": [
            "phone"
          ],
          "composite": false,
          "keyName": "users_phone_unique",
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "keyName": "users_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "users_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "users_phone_index",
          "columnNames": [
            "phone"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "users_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {},
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "user_id": {
          "name": "user_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "amount": {
          "name": "amount",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "mappedType": "decimal"
        },
        "balance": {
          "name": "balance",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "mappedType": "decimal"
        },
        "type": {
          "name": "type",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [],
          "mappedType": "enum"
        },
        "reason": {
          "name": "reason",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "order_completed_deposit",
            "convert_score_to_point"
          ],
          "mappedType": "enum"
        }
      },
      "name": "point_transactions",
      "schema": "public",
      "indexes": [
        {
          "keyName": "point_transactions_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "point_transactions_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "point_transactions_user_id_restaurant_id_index",
          "columnNames": [
            "user_id",
            "restaurant_id"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "point_transactions_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "point_transactions_user_id_foreign": {
          "constraintName": "point_transactions_user_id_foreign",
          "columnNames": [
            "user_id"
          ],
          "localTableName": "public.point_transactions",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.users",
          "updateRule": "cascade"
        },
        "point_transactions_restaurant_id_foreign": {
          "constraintName": "point_transactions_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.point_transactions",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.users",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "cookie_id": {
          "name": "cookie_id",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "table_number": {
          "name": "table_number",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "user_id": {
          "name": "user_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 26,
          "mappedType": "character"
        },
        "staff_id": {
          "name": "staff_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 26,
          "mappedType": "character"
        },
        "message": {
          "name": "message",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "status": {
          "name": "status",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "'pending'",
          "enumItems": [
            "pending",
            "acknowledged",
            "rejected",
            "completed"
          ],
          "mappedType": "enum"
        }
      },
      "name": "pagers",
      "schema": "public",
      "indexes": [
        {
          "keyName": "pagers_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "pagers_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "pagers_restaurant_id_index",
          "columnNames": [
            "restaurant_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "pagers_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "pagers_restaurant_id_foreign": {
          "constraintName": "pagers_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.pagers",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "updateRule": "cascade"
        },
        "pagers_user_id_foreign": {
          "constraintName": "pagers_user_id_foreign",
          "columnNames": [
            "user_id"
          ],
          "localTableName": "public.pagers",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.users",
          "deleteRule": "set null",
          "updateRule": "cascade"
        },
        "pagers_staff_id_foreign": {
          "constraintName": "pagers_staff_id_foreign",
          "columnNames": [
            "staff_id"
          ],
          "localTableName": "public.pagers",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.admins",
          "deleteRule": "set null",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "user_id": {
          "name": "user_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "delivery_method_id": {
          "name": "delivery_method_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "user_address": {
          "name": "user_address",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "car_address": {
          "name": "car_address",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "payment_method_id": {
          "name": "payment_method_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "order_number": {
          "name": "order_number",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "integer"
        },
        "coupon_discount": {
          "name": "coupon_discount",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "default": "0",
          "mappedType": "decimal"
        },
        "coupon_detail": {
          "name": "coupon_detail",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "items_discount": {
          "name": "items_discount",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "default": "0",
          "mappedType": "decimal"
        },
        "total_discount": {
          "name": "total_discount",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "default": "0",
          "mappedType": "decimal"
        },
        "sub_total": {
          "name": "sub_total",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "mappedType": "decimal"
        },
        "tax": {
          "name": "tax",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "default": "0",
          "mappedType": "decimal"
        },
        "delivery_fee": {
          "name": "delivery_fee",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "default": "0",
          "mappedType": "decimal"
        },
        "total": {
          "name": "total",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "mappedType": "decimal"
        },
        "total_items": {
          "name": "total_items",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "0",
          "mappedType": "integer"
        },
        "description": {
          "name": "description",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "table_number": {
          "name": "table_number",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "status": {
          "name": "status",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "pendingPayment",
            "paid",
            "preparing",
            "deliveredToWaiter",
            "deliveredToReceptionist",
            "shipped",
            "completed",
            "canceled"
          ],
          "mappedType": "enum"
        },
        "history": {
          "name": "history",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        }
      },
      "name": "orders",
      "schema": "public",
      "indexes": [
        {
          "keyName": "orders_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "orders_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "orders_restaurant_id_order_number_index",
          "columnNames": [
            "restaurant_id",
            "order_number"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "orders_restaurant_id_status_index",
          "columnNames": [
            "restaurant_id",
            "status"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "orders_restaurant_id_index",
          "columnNames": [
            "restaurant_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "orders_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "orders_user_id_foreign": {
          "constraintName": "orders_user_id_foreign",
          "columnNames": [
            "user_id"
          ],
          "localTableName": "public.orders",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.users",
          "updateRule": "cascade"
        },
        "orders_restaurant_id_foreign": {
          "constraintName": "orders_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.orders",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "updateRule": "cascade"
        },
        "orders_delivery_method_id_foreign": {
          "constraintName": "orders_delivery_method_id_foreign",
          "columnNames": [
            "delivery_method_id"
          ],
          "localTableName": "public.orders",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.deliveries",
          "updateRule": "cascade"
        },
        "orders_payment_method_id_foreign": {
          "constraintName": "orders_payment_method_id_foreign",
          "columnNames": [
            "payment_method_id"
          ],
          "localTableName": "public.orders",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.payment_methods",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "order_id": {
          "name": "order_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "food_id": {
          "name": "food_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "user_id": {
          "name": "user_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "comment": {
          "name": "comment",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "text"
        },
        "rating": {
          "name": "rating",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "0",
          "mappedType": "integer"
        },
        "positive_points": {
          "name": "positive_points",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "negative_points": {
          "name": "negative_points",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "status": {
          "name": "status",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "'pending'",
          "enumItems": [
            "pending",
            "rejected",
            "approved"
          ],
          "mappedType": "enum"
        }
      },
      "name": "reviews",
      "schema": "public",
      "indexes": [
        {
          "keyName": "reviews_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "reviews_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "reviews_order_id_index",
          "columnNames": [
            "order_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "reviews_user_id_index",
          "columnNames": [
            "user_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "reviews_food_id_status_index",
          "columnNames": [
            "food_id",
            "status"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "reviews_order_id_food_id_user_id_unique",
          "columnNames": [
            "order_id",
            "food_id",
            "user_id"
          ],
          "composite": true,
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "keyName": "reviews_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "reviews_order_id_foreign": {
          "constraintName": "reviews_order_id_foreign",
          "columnNames": [
            "order_id"
          ],
          "localTableName": "public.reviews",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.orders",
          "updateRule": "cascade"
        },
        "reviews_food_id_foreign": {
          "constraintName": "reviews_food_id_foreign",
          "columnNames": [
            "food_id"
          ],
          "localTableName": "public.reviews",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.foods",
          "updateRule": "cascade"
        },
        "reviews_user_id_foreign": {
          "constraintName": "reviews_user_id_foreign",
          "columnNames": [
            "user_id"
          ],
          "localTableName": "public.reviews",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.users",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "order_id": {
          "name": "order_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "amount": {
          "name": "amount",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "mappedType": "decimal"
        },
        "reference_id": {
          "name": "reference_id",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "method": {
          "name": "method",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "Online",
            "Cash",
            "Wallet",
            "CreditCard"
          ],
          "mappedType": "enum"
        },
        "gateway": {
          "name": "gateway",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "enumItems": [
            "zarinpal"
          ],
          "mappedType": "enum"
        },
        "transaction_id": {
          "name": "transaction_id",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "status": {
          "name": "status",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "pending",
            "paid",
            "failed",
            "refunded"
          ],
          "mappedType": "enum"
        },
        "card_pan": {
          "name": "card_pan",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "verify_response": {
          "name": "verify_response",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        },
        "paid_at": {
          "name": "paid_at",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "failed_at": {
          "name": "failed_at",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "description": {
          "name": "description",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "attachments": {
          "name": "attachments",
          "type": "jsonb",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "mappedType": "json"
        }
      },
      "name": "payments",
      "schema": "public",
      "indexes": [
        {
          "columnNames": [
            "order_id"
          ],
          "composite": false,
          "keyName": "payments_order_id_index",
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "columnNames": [
            "reference_id"
          ],
          "composite": false,
          "keyName": "payments_reference_id_unique",
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "keyName": "payments_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "payments_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "payments_order_id_index",
          "columnNames": [
            "order_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "payments_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "payments_order_id_foreign": {
          "constraintName": "payments_order_id_foreign",
          "columnNames": [
            "order_id"
          ],
          "localTableName": "public.payments",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.orders",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "order_id": {
          "name": "order_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "food_id": {
          "name": "food_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "quantity": {
          "name": "quantity",
          "type": "int",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "integer"
        },
        "unit_price": {
          "name": "unit_price",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "mappedType": "decimal"
        },
        "discount": {
          "name": "discount",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "default": "0",
          "mappedType": "decimal"
        },
        "total_price": {
          "name": "total_price",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "mappedType": "decimal"
        }
      },
      "name": "order_items",
      "schema": "public",
      "indexes": [
        {
          "keyName": "order_items_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "order_items_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "order_items_order_id_index",
          "columnNames": [
            "order_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "order_items_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "order_items_order_id_foreign": {
          "constraintName": "order_items_order_id_foreign",
          "columnNames": [
            "order_id"
          ],
          "localTableName": "public.order_items",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.orders",
          "updateRule": "cascade"
        },
        "order_items_food_id_foreign": {
          "constraintName": "order_items_food_id_foreign",
          "columnNames": [
            "food_id"
          ],
          "localTableName": "public.order_items",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.foods",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "user_id": {
          "name": "user_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 26,
          "mappedType": "character"
        },
        "admin_id": {
          "name": "admin_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 26,
          "mappedType": "character"
        },
        "title": {
          "name": "title",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "pager.created",
            "order.created",
            "payment.success",
            "review.created",
            "order.status.changed"
          ],
          "mappedType": "enum"
        },
        "content": {
          "name": "content",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "seen_at": {
          "name": "seen_at",
          "type": "timestamptz",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 6,
          "mappedType": "datetime"
        }
      },
      "name": "notifications",
      "schema": "public",
      "indexes": [
        {
          "keyName": "notifications_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "notifications_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "notifications_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "notifications_restaurant_id_foreign": {
          "constraintName": "notifications_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.notifications",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "updateRule": "cascade"
        },
        "notifications_user_id_foreign": {
          "constraintName": "notifications_user_id_foreign",
          "columnNames": [
            "user_id"
          ],
          "localTableName": "public.notifications",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.users",
          "deleteRule": "set null",
          "updateRule": "cascade"
        },
        "notifications_admin_id_foreign": {
          "constraintName": "notifications_admin_id_foreign",
          "columnNames": [
            "admin_id"
          ],
          "localTableName": "public.notifications",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.admins",
          "deleteRule": "set null",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "user_id": {
          "name": "user_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "food_id": {
          "name": "food_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        }
      },
      "name": "favorites",
      "schema": "public",
      "indexes": [
        {
          "keyName": "favorites_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "favorites_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "favorites_user_id_food_id_unique",
          "columnNames": [
            "user_id",
            "food_id"
          ],
          "composite": true,
          "constraint": true,
          "primary": false,
          "unique": true
        },
        {
          "keyName": "favorites_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "favorites_user_id_foreign": {
          "constraintName": "favorites_user_id_foreign",
          "columnNames": [
            "user_id"
          ],
          "localTableName": "public.favorites",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.users",
          "updateRule": "cascade"
        },
        "favorites_food_id_foreign": {
          "constraintName": "favorites_food_id_foreign",
          "columnNames": [
            "food_id"
          ],
          "localTableName": "public.favorites",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.foods",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "user_id": {
          "name": "user_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "title": {
          "name": "title",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "address": {
          "name": "address",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "city": {
          "name": "city",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 255,
          "mappedType": "string"
        },
        "province": {
          "name": "province",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "postal_code": {
          "name": "postal_code",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "latitude": {
          "name": "latitude",
          "type": "real",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "float"
        },
        "longitude": {
          "name": "longitude",
          "type": "real",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "mappedType": "float"
        },
        "phone": {
          "name": "phone",
          "type": "varchar(255)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": true,
          "length": 255,
          "mappedType": "string"
        },
        "is_default": {
          "name": "is_default",
          "type": "boolean",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "default": "false",
          "mappedType": "boolean"
        }
      },
      "name": "user_addresses",
      "schema": "public",
      "indexes": [
        {
          "keyName": "user_addresses_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "user_addresses_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "user_addresses_user_id_index",
          "columnNames": [
            "user_id"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "user_addresses_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "user_addresses_user_id_foreign": {
          "constraintName": "user_addresses_user_id_foreign",
          "columnNames": [
            "user_id"
          ],
          "localTableName": "public.user_addresses",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.users",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    },
    {
      "columns": {
        "id": {
          "name": "id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "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"
        },
        "user_id": {
          "name": "user_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "restaurant_id": {
          "name": "restaurant_id",
          "type": "char(26)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "length": 26,
          "mappedType": "character"
        },
        "amount": {
          "name": "amount",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "mappedType": "decimal"
        },
        "balance": {
          "name": "balance",
          "type": "numeric(10,0)",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "precision": 10,
          "scale": 0,
          "mappedType": "decimal"
        },
        "type": {
          "name": "type",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "credit",
            "debit"
          ],
          "mappedType": "enum"
        },
        "reason": {
          "name": "reason",
          "type": "text",
          "unsigned": false,
          "autoincrement": false,
          "primary": false,
          "nullable": false,
          "enumItems": [
            "order_payment",
            "order_refund",
            "convert_score_to_wallet",
            "withdraw",
            "deposit"
          ],
          "mappedType": "enum"
        }
      },
      "name": "wallet_transactions",
      "schema": "public",
      "indexes": [
        {
          "keyName": "wallet_transactions_created_at_index",
          "columnNames": [
            "created_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "wallet_transactions_deleted_at_index",
          "columnNames": [
            "deleted_at"
          ],
          "composite": false,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "wallet_transactions_user_id_restaurant_id_index",
          "columnNames": [
            "user_id",
            "restaurant_id"
          ],
          "composite": true,
          "constraint": false,
          "primary": false,
          "unique": false
        },
        {
          "keyName": "wallet_transactions_pkey",
          "columnNames": [
            "id"
          ],
          "composite": false,
          "constraint": true,
          "primary": true,
          "unique": true
        }
      ],
      "checks": [],
      "foreignKeys": {
        "wallet_transactions_user_id_foreign": {
          "constraintName": "wallet_transactions_user_id_foreign",
          "columnNames": [
            "user_id"
          ],
          "localTableName": "public.wallet_transactions",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.users",
          "updateRule": "cascade"
        },
        "wallet_transactions_restaurant_id_foreign": {
          "constraintName": "wallet_transactions_restaurant_id_foreign",
          "columnNames": [
            "restaurant_id"
          ],
          "localTableName": "public.wallet_transactions",
          "referencedColumnNames": [
            "id"
          ],
          "referencedTableName": "public.restaurants",
          "updateRule": "cascade"
        }
      },
      "nativeEnums": {}
    }
  ],
  "nativeEnums": {}
}
