create sequence "NewLabCancelBookingHeader_NewLabCancelBookingHeaderId_seq"
-------------------------------------------------------------------------------
-- Table: public.NewLabCancelBookingHeader

-- DROP TABLE IF EXISTS public."NewLabCancelBookingHeader";

CREATE TABLE IF NOT EXISTS public."NewLabCancelBookingHeader"
(
    "NewLabCancelBookingHeaderId" integer NOT NULL DEFAULT nextval('"NewLabCancelBookingHeader_NewLabCancelBookingHeaderId_seq"'::regclass),
    "NewLabBookingHeaderId" integer,
    "TotalReturnAmount" numeric(8,2),
    "CreatedBy" integer,
    "CreatedDate" timestamp without time zone,
    CONSTRAINT "NewLabCancelBookingHeader_pkey" PRIMARY KEY ("NewLabCancelBookingHeaderId"),
    CONSTRAINT "NewLabBookingHeader_CreatedBy_fkey" FOREIGN KEY ("CreatedBy")
        REFERENCES public."Account" ("AccountId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT "NewLabCancelBookingHeader_NewLabBookingHeaderId_fkey" FOREIGN KEY ("NewLabBookingHeaderId")
        REFERENCES public."NewLabBookingHeader" ("NewLabBookingHeaderId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS public."NewLabCancelBookingHeader"
    OWNER to postgres;

--------------------------------------------------------------------------------------------------------------------

create sequence "NewLabCancelBookingDetail_NewLabCancelBookingDetailId_seq"

------------------------------------------------------------------------------------------------------------------------

-- Table: public.NewLabCancelBookingDetail

-- DROP TABLE IF EXISTS public."NewLabCancelBookingDetail";

CREATE TABLE IF NOT EXISTS public."NewLabCancelBookingDetail"
(
    "NewLabCancelBookingDetailId" integer NOT NULL DEFAULT nextval('"NewLabCancelBookingDetail_NewLabCancelBookingDetailId_seq"'::regclass),
    "NewLabCancelBookingHeaderId" integer,
    "NewLabBookingDetailId" integer,
    "ReturnAmount" numeric(8,2),
    CONSTRAINT "NewLabCancelBookingDetail_pkey" PRIMARY KEY ("NewLabCancelBookingDetailId"),
    CONSTRAINT "NewLabCancelBookingDetail_NewLabBookingDetailId_fkey" FOREIGN KEY ("NewLabBookingDetailId")
        REFERENCES public."NewLabBookingDetail" ("NewLabBookingDetailId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT "NewLabCancelBookingDetail_NewLabCancelBookingHeaderId_fkey" FOREIGN KEY ("NewLabCancelBookingHeaderId")
        REFERENCES public."NewLabCancelBookingHeader" ("NewLabCancelBookingHeaderId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS public."NewLabCancelBookingDetail"
    OWNER to postgres;