{
  "id": "9ad404b9-6819-41d5-9665-51d971657203",
  "prevId": "6ab02de2-616e-466f-8a63-22f3d44fcb91",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.article_categories": {
      "name": "article_categories",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "slug": {
          "name": "slug",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "article_categories_slug_unique": {
          "name": "article_categories_slug_unique",
          "nullsNotDistinct": false,
          "columns": [
            "slug"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.articles": {
      "name": "articles",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "title": {
          "name": "title",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "image_url": {
          "name": "image_url",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "slug": {
          "name": "slug",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "excerpt": {
          "name": "excerpt",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "article_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'article'"
        },
        "article_category_id": {
          "name": "article_category_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "is_published": {
          "name": "is_published",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_featured": {
          "name": "is_featured",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "order": {
          "name": "order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "tags": {
          "name": "tags",
          "type": "text[]",
          "primaryKey": false,
          "notNull": false
        },
        "meta_title": {
          "name": "meta_title",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "meta_description": {
          "name": "meta_description",
          "type": "varchar(500)",
          "primaryKey": false,
          "notNull": false
        },
        "published_at": {
          "name": "published_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "articles_article_category_id_article_categories_id_fk": {
          "name": "articles_article_category_id_article_categories_id_fk",
          "tableFrom": "articles",
          "tableTo": "article_categories",
          "columnsFrom": [
            "article_category_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "articles_user_id_users_id_fk": {
          "name": "articles_user_id_users_id_fk",
          "tableFrom": "articles",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "articles_slug_unique": {
          "name": "articles_slug_unique",
          "nullsNotDistinct": false,
          "columns": [
            "slug"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.product_category_on_articles": {
      "name": "product_category_on_articles",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "article_id": {
          "name": "article_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "product_category_id": {
          "name": "product_category_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {
        "product_category_on_articles_article_id_articles_id_fk": {
          "name": "product_category_on_articles_article_id_articles_id_fk",
          "tableFrom": "product_category_on_articles",
          "tableTo": "articles",
          "columnsFrom": [
            "article_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "cascade"
        },
        "product_category_on_articles_product_category_id_product_categories_id_fk": {
          "name": "product_category_on_articles_product_category_id_product_categories_id_fk",
          "tableFrom": "product_category_on_articles",
          "tableTo": "product_categories",
          "columnsFrom": [
            "product_category_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "cascade"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.balance_mutations": {
      "name": "balance_mutations",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "amount": {
          "name": "amount",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "balance_mutation_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "ref_type": {
          "name": "ref_type",
          "type": "balance_mutation_ref_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "ref_id": {
          "name": "ref_id",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "balance_before": {
          "name": "balance_before",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "balance_after": {
          "name": "balance_after",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "notes": {
          "name": "notes",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "balance_mutations_user_id_users_id_fk": {
          "name": "balance_mutations_user_id_users_id_fk",
          "tableFrom": "balance_mutations",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.banners": {
      "name": "banners",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "title": {
          "name": "title",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "image": {
          "name": "image",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "href_url": {
          "name": "href_url",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "app_url": {
          "name": "app_url",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "banner_location": {
          "name": "banner_location",
          "type": "banner_location",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'home_top'"
        },
        "order": {
          "name": "order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "is_available": {
          "name": "is_available",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "product_category_id": {
          "name": "product_category_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "banners_product_category_id_product_categories_id_fk": {
          "name": "banners_product_category_id_product_categories_id_fk",
          "tableFrom": "banners",
          "tableTo": "product_categories",
          "columnsFrom": [
            "product_category_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.app_config": {
      "name": "app_config",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "key": {
          "name": "key",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "app_config_key_idx": {
          "name": "app_config_key_idx",
          "columns": [
            {
              "expression": "key",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "app_config_key_unique": {
          "name": "app_config_key_unique",
          "nullsNotDistinct": false,
          "columns": [
            "key"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.deposits": {
      "name": "deposits",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "deposit_id": {
          "name": "deposit_id",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "ref_id": {
          "name": "ref_id",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "payment_method_id": {
          "name": "payment_method_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "amount_pay": {
          "name": "amount_pay",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "amount_received": {
          "name": "amount_received",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "amount_fee": {
          "name": "amount_fee",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "phone_number": {
          "name": "phone_number",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": false
        },
        "email": {
          "name": "email",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "pay_code": {
          "name": "pay_code",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "pay_url": {
          "name": "pay_url",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "qr_code": {
          "name": "qr_code",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "deposit_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "expired_at": {
          "name": "expired_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {
        "deposits_deposit_id_index": {
          "name": "deposits_deposit_id_index",
          "columns": [
            {
              "expression": "deposit_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "deposits_user_id_users_id_fk": {
          "name": "deposits_user_id_users_id_fk",
          "tableFrom": "deposits",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "deposits_payment_method_id_payment_methods_id_fk": {
          "name": "deposits_payment_method_id_payment_methods_id_fk",
          "tableFrom": "deposits",
          "tableTo": "payment_methods",
          "columnsFrom": [
            "payment_method_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "deposits_deposit_id_unique": {
          "name": "deposits_deposit_id_unique",
          "nullsNotDistinct": false,
          "columns": [
            "deposit_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.file_manager": {
      "name": "file_manager",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "url": {
          "name": "url",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "mime_type": {
          "name": "mime_type",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "size": {
          "name": "size",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.product_grouping_to_product_categories": {
      "name": "product_grouping_to_product_categories",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "product_grouping_id": {
          "name": "product_grouping_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "product_category_id": {
          "name": "product_category_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "product_grouping_to_product_categories_product_grouping_id_product_groupings_id_fk": {
          "name": "product_grouping_to_product_categories_product_grouping_id_product_groupings_id_fk",
          "tableFrom": "product_grouping_to_product_categories",
          "tableTo": "product_groupings",
          "columnsFrom": [
            "product_grouping_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "product_grouping_to_product_categories_product_category_id_product_categories_id_fk": {
          "name": "product_grouping_to_product_categories_product_category_id_product_categories_id_fk",
          "tableFrom": "product_grouping_to_product_categories",
          "tableTo": "product_categories",
          "columnsFrom": [
            "product_category_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.product_groupings": {
      "name": "product_groupings",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "image_url": {
          "name": "image_url",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "redirect_url": {
          "name": "redirect_url",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "app_key": {
          "name": "app_key",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "platform": {
          "name": "platform",
          "type": "app_platform",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'web'"
        },
        "type": {
          "name": "type",
          "type": "product_grouping_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'modal'"
        },
        "menu_type": {
          "name": "menu_type",
          "type": "product_grouping_menu_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'fast_menu'"
        },
        "is_available": {
          "name": "is_available",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_featured": {
          "name": "is_featured",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "label": {
          "name": "label",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "category": {
          "name": "category",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "order": {
          "name": "order",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "is_special_feature": {
          "name": "is_special_feature",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "special_feature_key": {
          "name": "special_feature_key",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.input_fields": {
      "name": "input_fields",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "identifier": {
          "name": "identifier",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "is_required": {
          "name": "is_required",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "placeholder": {
          "name": "placeholder",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "type": {
          "name": "type",
          "type": "input_field_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'text'"
        },
        "options": {
          "name": "options",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.input_on_category": {
      "name": "input_on_category",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "input_field_id": {
          "name": "input_field_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "category_id": {
          "name": "category_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "input_on_category_input_field_id_input_fields_id_fk": {
          "name": "input_on_category_input_field_id_input_fields_id_fk",
          "tableFrom": "input_on_category",
          "tableTo": "input_fields",
          "columnsFrom": [
            "input_field_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "input_on_category_category_id_product_categories_id_fk": {
          "name": "input_on_category_category_id_product_categories_id_fk",
          "tableFrom": "input_on_category",
          "tableTo": "product_categories",
          "columnsFrom": [
            "category_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.inquiries": {
      "name": "inquiries",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "product_snapshot_id": {
          "name": "product_snapshot_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "payment_snapshot_id": {
          "name": "payment_snapshot_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "price": {
          "name": "price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "cost_price": {
          "name": "cost_price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "discount_price": {
          "name": "discount_price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "fee": {
          "name": "fee",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "admin_fee": {
          "name": "admin_fee",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "total_price": {
          "name": "total_price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "profit": {
          "name": "profit",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "inquiry_provider": {
          "name": "inquiry_provider",
          "type": "product_provider",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'digiflazz'"
        },
        "inquiry_provider_code": {
          "name": "inquiry_provider_code",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": false
        },
        "inquiry_ref_id": {
          "name": "inquiry_ref_id",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "inquiry_response": {
          "name": "inquiry_response",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "customer_input": {
          "name": "customer_input",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'{}'::jsonb"
        },
        "customer_input_merged": {
          "name": "customer_input_merged",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "customer_name": {
          "name": "customer_name",
          "type": "varchar(150)",
          "primaryKey": false,
          "notNull": false
        },
        "customer_phone": {
          "name": "customer_phone",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": false
        },
        "customer_email": {
          "name": "customer_email",
          "type": "varchar(150)",
          "primaryKey": false,
          "notNull": false
        },
        "offer_applied": {
          "name": "offer_applied",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "status": {
          "name": "status",
          "type": "inquiry_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'AWAIT_CONFIRMATION'"
        },
        "expired_at": {
          "name": "expired_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "inquiries_user_idx": {
          "name": "inquiries_user_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "inquiries_status_idx": {
          "name": "inquiries_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "inquiries_user_id_users_id_fk": {
          "name": "inquiries_user_id_users_id_fk",
          "tableFrom": "inquiries",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "inquiries_product_snapshot_id_product_snapshots_id_fk": {
          "name": "inquiries_product_snapshot_id_product_snapshots_id_fk",
          "tableFrom": "inquiries",
          "tableTo": "product_snapshots",
          "columnsFrom": [
            "product_snapshot_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "inquiries_payment_snapshot_id_payment_snapshots_id_fk": {
          "name": "inquiries_payment_snapshot_id_payment_snapshots_id_fk",
          "tableFrom": "inquiries",
          "tableTo": "payment_snapshots",
          "columnsFrom": [
            "payment_snapshot_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.offer_on_orders": {
      "name": "offer_on_orders",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "offer_id": {
          "name": "offer_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "order_id": {
          "name": "order_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true,
          "default": "'00000000-0000-0000-0000-000000000000'"
        },
        "discount_total": {
          "name": "discount_total",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "offer_on_orders_offer_id_offers_id_fk": {
          "name": "offer_on_orders_offer_id_offers_id_fk",
          "tableFrom": "offer_on_orders",
          "tableTo": "offers",
          "columnsFrom": [
            "offer_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "offer_on_orders_order_id_orders_id_fk": {
          "name": "offer_on_orders_order_id_orders_id_fk",
          "tableFrom": "offer_on_orders",
          "tableTo": "orders",
          "columnsFrom": [
            "order_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "offer_on_orders_user_id_users_id_fk": {
          "name": "offer_on_orders_user_id_users_id_fk",
          "tableFrom": "offer_on_orders",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.offer_payment_methods": {
      "name": "offer_payment_methods",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "offer_id": {
          "name": "offer_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "payment_method_id": {
          "name": "payment_method_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "offer_payment_methods_offer_id_offers_id_fk": {
          "name": "offer_payment_methods_offer_id_offers_id_fk",
          "tableFrom": "offer_payment_methods",
          "tableTo": "offers",
          "columnsFrom": [
            "offer_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "offer_payment_methods_payment_method_id_payment_methods_id_fk": {
          "name": "offer_payment_methods_payment_method_id_payment_methods_id_fk",
          "tableFrom": "offer_payment_methods",
          "tableTo": "payment_methods",
          "columnsFrom": [
            "payment_method_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.offer_users": {
      "name": "offer_users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "offer_id": {
          "name": "offer_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "offer_users_offer_id_offers_id_fk": {
          "name": "offer_users_offer_id_offers_id_fk",
          "tableFrom": "offer_users",
          "tableTo": "offers",
          "columnsFrom": [
            "offer_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "offer_users_user_id_users_id_fk": {
          "name": "offer_users_user_id_users_id_fk",
          "tableFrom": "offer_users",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.offer_products": {
      "name": "offer_products",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "offer_id": {
          "name": "offer_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "product_id": {
          "name": "product_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "offer_products_offer_id_offers_id_fk": {
          "name": "offer_products_offer_id_offers_id_fk",
          "tableFrom": "offer_products",
          "tableTo": "offers",
          "columnsFrom": [
            "offer_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "offer_products_product_id_products_id_fk": {
          "name": "offer_products_product_id_products_id_fk",
          "tableFrom": "offer_products",
          "tableTo": "products",
          "columnsFrom": [
            "product_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.offers": {
      "name": "offers",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "sub_name": {
          "name": "sub_name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "image_url": {
          "name": "image_url",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "code": {
          "name": "code",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": true
        },
        "quota": {
          "name": "quota",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "usage_count": {
          "name": "usage_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "usage_limit": {
          "name": "usage_limit",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "type": {
          "name": "type",
          "type": "offer_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'voucher'"
        },
        "discount_static": {
          "name": "discount_static",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "discount_percentage": {
          "name": "discount_percentage",
          "type": "numeric(5, 2)",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "discount_maximum": {
          "name": "discount_maximum",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "min_amount": {
          "name": "min_amount",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "start_date": {
          "name": "start_date",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "end_date": {
          "name": "end_date",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "is_available": {
          "name": "is_available",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_need_redeem": {
          "name": "is_need_redeem",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_new_user": {
          "name": "is_new_user",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_featured": {
          "name": "is_featured",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "label": {
          "name": "label",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": false
        },
        "is_all_users": {
          "name": "is_all_users",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_allow_guest": {
          "name": "is_allow_guest",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_all_payment_methods": {
          "name": "is_all_payment_methods",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_all_products": {
          "name": "is_all_products",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_unlimited_date": {
          "name": "is_unlimited_date",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_unlimited_quota": {
          "name": "is_unlimited_quota",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_combinable_with_voucher": {
          "name": "is_combinable_with_voucher",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_deleted": {
          "name": "is_deleted",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "deleted_at": {
          "name": "deleted_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "offers_code_unique": {
          "name": "offers_code_unique",
          "nullsNotDistinct": false,
          "columns": [
            "code"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.orders": {
      "name": "orders",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "order_id": {
          "name": "order_id",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "transaction_ref": {
          "name": "transaction_ref",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "inquiry_id": {
          "name": "inquiry_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "product_snapshot_id": {
          "name": "product_snapshot_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "payment_snapshot_id": {
          "name": "payment_snapshot_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "price": {
          "name": "price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "cost_price": {
          "name": "cost_price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "discount_price": {
          "name": "discount_price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "fee": {
          "name": "fee",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "total_price": {
          "name": "total_price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "profit": {
          "name": "profit",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "sn_number": {
          "name": "sn_number",
          "type": "varchar(150)",
          "primaryKey": false,
          "notNull": true
        },
        "notes": {
          "name": "notes",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "payment_status": {
          "name": "payment_status",
          "type": "payment_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "order_status": {
          "name": "order_status",
          "type": "order_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'none'"
        },
        "refund_status": {
          "name": "refund_status",
          "type": "refund_status",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'none'"
        },
        "customer_input": {
          "name": "customer_input",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "customer_input_json": {
          "name": "customer_input_json",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "customer_email": {
          "name": "customer_email",
          "type": "varchar(150)",
          "primaryKey": false,
          "notNull": false
        },
        "customer_phone": {
          "name": "customer_phone",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": false
        },
        "customer_ip": {
          "name": "customer_ip",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": false
        },
        "customer_ua": {
          "name": "customer_ua",
          "type": "varchar(500)",
          "primaryKey": false,
          "notNull": false
        },
        "customer_device_id": {
          "name": "customer_device_id",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "voucher_code": {
          "name": "voucher_code",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "additional_data": {
          "name": "additional_data",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "order_raw_response": {
          "name": "order_raw_response",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "callback_raw_response": {
          "name": "callback_raw_response",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "metadata": {
          "name": "metadata",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "order_success_at": {
          "name": "order_success_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "payment_success_at": {
          "name": "payment_success_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "orders_order_id_index": {
          "name": "orders_order_id_index",
          "columns": [
            {
              "expression": "order_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "orders_inquiry_id_inquiries_id_fk": {
          "name": "orders_inquiry_id_inquiries_id_fk",
          "tableFrom": "orders",
          "tableTo": "inquiries",
          "columnsFrom": [
            "inquiry_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "orders_user_id_users_id_fk": {
          "name": "orders_user_id_users_id_fk",
          "tableFrom": "orders",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "orders_product_snapshot_id_product_snapshots_id_fk": {
          "name": "orders_product_snapshot_id_product_snapshots_id_fk",
          "tableFrom": "orders",
          "tableTo": "product_snapshots",
          "columnsFrom": [
            "product_snapshot_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "orders_payment_snapshot_id_payment_snapshots_id_fk": {
          "name": "orders_payment_snapshot_id_payment_snapshots_id_fk",
          "tableFrom": "orders",
          "tableTo": "payment_snapshots",
          "columnsFrom": [
            "payment_snapshot_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "orders_order_id_unique": {
          "name": "orders_order_id_unique",
          "nullsNotDistinct": false,
          "columns": [
            "order_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.payment_categories": {
      "name": "payment_categories",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.payment_methods": {
      "name": "payment_methods",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "payment_method_category_id": {
          "name": "payment_method_category_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "image_url": {
          "name": "image_url",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "fee_static": {
          "name": "fee_static",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "fee_percentage": {
          "name": "fee_percentage",
          "type": "numeric(5, 2)",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "fee_type": {
          "name": "fee_type",
          "type": "payment_method_fee_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'merchant'"
        },
        "is_available": {
          "name": "is_available",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "is_featured": {
          "name": "is_featured",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "label": {
          "name": "label",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": false
        },
        "provider_name": {
          "name": "provider_name",
          "type": "payment_method_provider",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'tripay'"
        },
        "provider_code": {
          "name": "provider_code",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": true
        },
        "min_amount": {
          "name": "min_amount",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "max_amount": {
          "name": "max_amount",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "type": {
          "name": "type",
          "type": "payment_method_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'bank_transfer'"
        },
        "is_need_phone_number": {
          "name": "is_need_phone_number",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_need_email": {
          "name": "is_need_email",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "allow_access": {
          "name": "allow_access",
          "type": "text[]",
          "primaryKey": false,
          "notNull": false,
          "default": "'{\"order\"}'"
        },
        "expired_in": {
          "name": "expired_in",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "is_deleted": {
          "name": "is_deleted",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "instruction": {
          "name": "instruction",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "cut_off_start": {
          "name": "cut_off_start",
          "type": "time with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "cut_off_end": {
          "name": "cut_off_end",
          "type": "time with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "deleted_at": {
          "name": "deleted_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "payment_methods_payment_method_category_id_payment_categories_id_fk": {
          "name": "payment_methods_payment_method_category_id_payment_categories_id_fk",
          "tableFrom": "payment_methods",
          "tableTo": "payment_categories",
          "columnsFrom": [
            "payment_method_category_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.product_categories": {
      "name": "product_categories",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "slug": {
          "name": "slug",
          "type": "varchar(200)",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "sub_name": {
          "name": "sub_name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "image_url": {
          "name": "image_url",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "banner_url": {
          "name": "banner_url",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "icon_url": {
          "name": "icon_url",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "publisher": {
          "name": "publisher",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "is_available": {
          "name": "is_available",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "is_featured": {
          "name": "is_featured",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "label": {
          "name": "label",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": false
        },
        "delivery_type": {
          "name": "delivery_type",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": true
        },
        "tags1": {
          "name": "tags1",
          "type": "json",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::json"
        },
        "tags2": {
          "name": "tags2",
          "type": "json",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::json"
        },
        "is_seo_enabled": {
          "name": "is_seo_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "seo_title": {
          "name": "seo_title",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "seo_description": {
          "name": "seo_description",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "seo_image": {
          "name": "seo_image",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "type": {
          "name": "type",
          "type": "product_category_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'game'"
        },
        "is_special_feature": {
          "name": "is_special_feature",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "special_feature_key": {
          "name": "special_feature_key",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": false
        },
        "product_billing_type": {
          "name": "product_billing_type",
          "type": "product_billing_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'prepaid'"
        },
        "product_fullfillment_type": {
          "name": "product_fullfillment_type",
          "type": "product_fullfillment_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'automatic_direct'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "product_categories_slug_unique": {
          "name": "product_categories_slug_unique",
          "nullsNotDistinct": false,
          "columns": [
            "slug"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.product_sub_categories": {
      "name": "product_sub_categories",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "sub_name": {
          "name": "sub_name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "image_url": {
          "name": "image_url",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "is_available": {
          "name": "is_available",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "is_featured": {
          "name": "is_featured",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "label": {
          "name": "label",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": false
        },
        "product_category_id": {
          "name": "product_category_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "product_sub_categories_product_category_id_product_categories_id_fk": {
          "name": "product_sub_categories_product_category_id_product_categories_id_fk",
          "tableFrom": "product_sub_categories",
          "tableTo": "product_categories",
          "columnsFrom": [
            "product_category_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.products": {
      "name": "products",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "product_sub_category_id": {
          "name": "product_sub_category_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "sub_name": {
          "name": "sub_name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "description": {
          "name": "description",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "is_featured": {
          "name": "is_featured",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_available": {
          "name": "is_available",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "label": {
          "name": "label",
          "type": "varchar(25)",
          "primaryKey": false,
          "notNull": false
        },
        "label_image": {
          "name": "label_image",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "image_url": {
          "name": "image_url",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "sku_code": {
          "name": "sku_code",
          "type": "varchar(15)",
          "primaryKey": false,
          "notNull": true
        },
        "price": {
          "name": "price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "profit_static": {
          "name": "profit_static",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "profit_percentage": {
          "name": "profit_percentage",
          "type": "numeric(5, 2)",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "profit_max": {
          "name": "profit_max",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "profit_min": {
          "name": "profit_min",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "stock": {
          "name": "stock",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "provider_code": {
          "name": "provider_code",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": true
        },
        "provider_name": {
          "name": "provider_name",
          "type": "product_provider",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'atlantich2h'"
        },
        "provider_price": {
          "name": "provider_price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "provider_max_price": {
          "name": "provider_max_price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "provider_input_separator": {
          "name": "provider_input_separator",
          "type": "varchar(3)",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "billing_type": {
          "name": "billing_type",
          "type": "product_billing_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'prepaid'"
        },
        "fullfillment_type": {
          "name": "fullfillment_type",
          "type": "product_fullfillment_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'automatic_direct'"
        },
        "cut_off_start": {
          "name": "cut_off_start",
          "type": "time with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "cut_off_end": {
          "name": "cut_off_end",
          "type": "time with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "products_product_sub_category_id_product_sub_categories_id_fk": {
          "name": "products_product_sub_category_id_product_sub_categories_id_fk",
          "tableFrom": "products",
          "tableTo": "product_sub_categories",
          "columnsFrom": [
            "product_sub_category_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sessions": {
      "name": "sessions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "id_token": {
          "name": "id_token",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "login_type": {
          "name": "login_type",
          "type": "user_registered_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'local'"
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "access_token": {
          "name": "access_token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "access_token_expires_at": {
          "name": "access_token_expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "refresh_token": {
          "name": "refresh_token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "refresh_token_expires_at": {
          "name": "refresh_token_expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "user_agent": {
          "name": "user_agent",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "ip_address": {
          "name": "ip_address",
          "type": "varchar(45)",
          "primaryKey": false,
          "notNull": true
        },
        "device_id": {
          "name": "device_id",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "device_fingerprint": {
          "name": "device_fingerprint",
          "type": "varchar(64)",
          "primaryKey": false,
          "notNull": false
        },
        "device_name": {
          "name": "device_name",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "is_from": {
          "name": "is_from",
          "type": "login_is_from",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'web'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "sessions_user_id_users_id_fk": {
          "name": "sessions_user_id_users_id_fk",
          "tableFrom": "sessions",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.payment_snapshots": {
      "name": "payment_snapshots",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "payment_method_id": {
          "name": "payment_method_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "type": {
          "name": "type",
          "type": "payment_method_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'bank_transfer'"
        },
        "provider_ref_id": {
          "name": "provider_ref_id",
          "type": "varchar",
          "primaryKey": false,
          "notNull": true
        },
        "fee_static": {
          "name": "fee_static",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "fee_percentage": {
          "name": "fee_percentage",
          "type": "numeric(5, 2)",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "fee_type": {
          "name": "fee_type",
          "type": "payment_method_fee_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'merchant'"
        },
        "provider_code": {
          "name": "provider_code",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": true
        },
        "provider_name": {
          "name": "provider_name",
          "type": "payment_method_provider",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'tripay'"
        },
        "allow_access": {
          "name": "allow_access",
          "type": "text[]",
          "primaryKey": false,
          "notNull": false,
          "default": "'{\"order\"}'"
        },
        "is_need_phone_number": {
          "name": "is_need_phone_number",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "phone_number": {
          "name": "phone_number",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": false
        },
        "is_need_email": {
          "name": "is_need_email",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "email": {
          "name": "email",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "pay_code": {
          "name": "pay_code",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "pay_url": {
          "name": "pay_url",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "qr_code": {
          "name": "qr_code",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "expired_in": {
          "name": "expired_in",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "expired_at": {
          "name": "expired_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "payment_snapshots_payment_method_id_payment_methods_id_fk": {
          "name": "payment_snapshots_payment_method_id_payment_methods_id_fk",
          "tableFrom": "payment_snapshots",
          "tableTo": "payment_methods",
          "columnsFrom": [
            "payment_method_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "cascade"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.product_snapshots": {
      "name": "product_snapshots",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "product_id": {
          "name": "product_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "is_special_feature": {
          "name": "is_special_feature",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "special_feature_key": {
          "name": "special_feature_key",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": false
        },
        "metadata": {
          "name": "metadata",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "provider_ref_id": {
          "name": "provider_ref_id",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "category_name": {
          "name": "category_name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false,
          "default": "''"
        },
        "sub_category_name": {
          "name": "sub_category_name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false,
          "default": "''"
        },
        "sku_code": {
          "name": "sku_code",
          "type": "varchar(15)",
          "primaryKey": false,
          "notNull": true
        },
        "price": {
          "name": "price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "profit_static": {
          "name": "profit_static",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "profit_percentage": {
          "name": "profit_percentage",
          "type": "numeric(5, 2)",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "provider_code": {
          "name": "provider_code",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": true
        },
        "provider_name": {
          "name": "provider_name",
          "type": "product_provider",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'atlantich2h'"
        },
        "provider_price": {
          "name": "provider_price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "provider_max_price": {
          "name": "provider_max_price",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "provider_input_separator": {
          "name": "provider_input_separator",
          "type": "varchar(3)",
          "primaryKey": false,
          "notNull": true,
          "default": "''"
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "billing_type": {
          "name": "billing_type",
          "type": "product_billing_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'prepaid'"
        },
        "fullfillment_type": {
          "name": "fullfillment_type",
          "type": "product_fullfillment_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": false,
          "default": "'automatic_direct'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "product_snapshots_product_id_products_id_fk": {
          "name": "product_snapshots_product_id_products_id_fk",
          "tableFrom": "product_snapshots",
          "tableTo": "products",
          "columnsFrom": [
            "product_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "cascade"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.users": {
      "name": "users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "oauth_id": {
          "name": "oauth_id",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "image_url": {
          "name": "image_url",
          "type": "varchar",
          "primaryKey": false,
          "notNull": false
        },
        "registered_type": {
          "name": "registered_type",
          "type": "user_registered_type",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'local'"
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "password": {
          "name": "password",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "phone": {
          "name": "phone",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "user_role",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true,
          "default": "'user'"
        },
        "balance": {
          "name": "balance",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "pin_hash": {
          "name": "pin_hash",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "pin_attempts": {
          "name": "pin_attempts",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "pin_locked_until": {
          "name": "pin_locked_until",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "pin_set_at": {
          "name": "pin_set_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "is_banned": {
          "name": "is_banned",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_email_verified": {
          "name": "is_email_verified",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_deleted": {
          "name": "is_deleted",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "deleted_at": {
          "name": "deleted_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "users_email_unique": {
          "name": "users_email_unique",
          "nullsNotDistinct": false,
          "columns": [
            "email"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {
    "public.app_platform": {
      "name": "app_platform",
      "schema": "public",
      "values": [
        "web",
        "app"
      ]
    },
    "public.article_type": {
      "name": "article_type",
      "schema": "public",
      "values": [
        "article",
        "page"
      ]
    },
    "public.balance_mutation_ref_type": {
      "name": "balance_mutation_ref_type",
      "schema": "public",
      "values": [
        "order",
        "deposit",
        "withdrawal",
        "other"
      ]
    },
    "public.balance_mutation_type": {
      "name": "balance_mutation_type",
      "schema": "public",
      "values": [
        "credit",
        "debit"
      ]
    },
    "public.banner_location": {
      "name": "banner_location",
      "schema": "public",
      "values": [
        "home_top",
        "home_middle",
        "home_bottom",
        "category_top",
        "category_middle",
        "category_bottom",
        "product_top",
        "product_middle",
        "product_bottom"
      ]
    },
    "public.deposit_status": {
      "name": "deposit_status",
      "schema": "public",
      "values": [
        "pending",
        "completed",
        "failed",
        "cancelled",
        "expired"
      ]
    },
    "public.input_field_type": {
      "name": "input_field_type",
      "schema": "public",
      "values": [
        "text",
        "number",
        "email",
        "password",
        "select",
        "radio",
        "checkbox",
        "textarea"
      ]
    },
    "public.inquiry_status": {
      "name": "inquiry_status",
      "schema": "public",
      "values": [
        "AWAIT_CONFIRMATION",
        "CONFIRMED",
        "USED",
        "EXPIRED",
        "FAILED",
        "CANCELED"
      ]
    },
    "public.login_is_from": {
      "name": "login_is_from",
      "schema": "public",
      "values": [
        "web",
        "mobile",
        "mobile_app",
        "desktop"
      ]
    },
    "public.offer_type": {
      "name": "offer_type",
      "schema": "public",
      "values": [
        "discount",
        "flash_sale",
        "cashback",
        "voucher"
      ]
    },
    "public.order_status": {
      "name": "order_status",
      "schema": "public",
      "values": [
        "none",
        "pending",
        "completed",
        "cancelled",
        "failed"
      ]
    },
    "public.payment_method_allow_access": {
      "name": "payment_method_allow_access",
      "schema": "public",
      "values": [
        "deposit",
        "order"
      ]
    },
    "public.payment_method_fee_type": {
      "name": "payment_method_fee_type",
      "schema": "public",
      "values": [
        "merchant",
        "buyer",
        "both"
      ]
    },
    "public.payment_method_provider": {
      "name": "payment_method_provider",
      "schema": "public",
      "values": [
        "tripay",
        "flipbusiness",
        "doku",
        "xendit",
        "midtrans",
        "ipaymu",
        "duitku",
        "balance",
        "manual"
      ]
    },
    "public.payment_method_type": {
      "name": "payment_method_type",
      "schema": "public",
      "values": [
        "bank_transfer",
        "virtual_account",
        "retail",
        "qr_code",
        "e_wallet",
        "credit_card",
        "voucher",
        "balance",
        "link_payment",
        "manual"
      ]
    },
    "public.payment_status": {
      "name": "payment_status",
      "schema": "public",
      "values": [
        "pending",
        "success",
        "failed",
        "expired",
        "cancelled"
      ]
    },
    "public.product_billing_type": {
      "name": "product_billing_type",
      "schema": "public",
      "values": [
        "prepaid",
        "postpaid"
      ]
    },
    "public.product_category_type": {
      "name": "product_category_type",
      "schema": "public",
      "values": [
        "game",
        "voucher",
        "aktivasi_perdana",
        "aktivasi_voucher",
        "e_money",
        "e_wallet",
        "e_wallet_bebas_nominal",
        "pulsa",
        "kuota",
        "masa_aktif",
        "telepon_dan_sms",
        "pln_prepaid",
        "pln_postpaid",
        "pln_non_taglist",
        "pdam",
        "pulsa_postpaid",
        "kuota_recomendation",
        "internet_postpaid",
        "bpjs_keuangan_postpaid",
        "bpjs_ketenagakerjaan_postpaid",
        "multifinanc_postpaid",
        "pbb_postpaid",
        "gas_postpaid",
        "insurance_postpaid",
        "entertainment",
        "finance",
        "ecommerce",
        "topup",
        "billing",
        "send_money",
        "other"
      ]
    },
    "public.product_fullfillment_type": {
      "name": "product_fullfillment_type",
      "schema": "public",
      "values": [
        "manual_direct",
        "manual_direct_with_voucher",
        "automatic_direct",
        "automatic_direct_with_voucher"
      ]
    },
    "public.product_grouping_menu_type": {
      "name": "product_grouping_menu_type",
      "schema": "public",
      "values": [
        "home_menu",
        "fast_menu",
        "category_menu",
        "other_menu"
      ]
    },
    "public.product_grouping_type": {
      "name": "product_grouping_type",
      "schema": "public",
      "values": [
        "redirect",
        "modal",
        "category"
      ]
    },
    "public.product_provider": {
      "name": "product_provider",
      "schema": "public",
      "values": [
        "digiflazz",
        "moogold",
        "atlantich2h",
        "vipreseller",
        "vocagame"
      ]
    },
    "public.refund_status": {
      "name": "refund_status",
      "schema": "public",
      "values": [
        "none",
        "processing",
        "completed",
        "failed"
      ]
    },
    "public.user_registered_type": {
      "name": "user_registered_type",
      "schema": "public",
      "values": [
        "google",
        "facebook",
        "github",
        "local"
      ]
    },
    "public.user_role": {
      "name": "user_role",
      "schema": "public",
      "values": [
        "admin",
        "user",
        "guest"
      ]
    }
  },
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}