/*
  Warnings:

  - A unique constraint covering the columns `[receiptNumber]` on the table `OrderPayment` will be added. If there are existing duplicate values, this will fail.
  - Added the required column `receiptNumber` to the `OrderPayment` table without a default value. This is not possible if the table is not empty.

*/
-- CreateEnum
CREATE TYPE "obm_core"."PaymentStatus" AS ENUM ('PAID', 'PARTIAL', 'REFUNDED', 'DECLINED');

-- AlterTable
ALTER TABLE "obm_core"."Order" ADD COLUMN     "latitude" DOUBLE PRECISION,
ADD COLUMN     "longitude" DOUBLE PRECISION;

-- AlterTable
ALTER TABLE "obm_core"."OrderPayment" ADD COLUMN     "comment" TEXT,
ADD COLUMN     "receiptNumber" TEXT NOT NULL,
ADD COLUMN     "reference" TEXT,
ADD COLUMN     "status" "obm_core"."PaymentStatus" NOT NULL DEFAULT 'PAID',
ADD COLUMN     "whtAmount" DECIMAL(10,2) NOT NULL DEFAULT 0;

-- CreateIndex
CREATE UNIQUE INDEX "OrderPayment_receiptNumber_key" ON "obm_core"."OrderPayment"("receiptNumber");
