-- SEQUENCE: public.ProviderAvailabilityChargeType_ProviderAvailabilityChargeTypeId_seq

-- DROP SEQUENCE IF EXISTS public."ProviderAvailabilityChargeType_ProviderAvailabilityChargeTypeId_seq";

CREATE SEQUENCE IF NOT EXISTS public."ProviderAvailabilityChargeType_ProviderAvailabilityChargeTypeId_seq"
    INCREMENT 1
    START 1
    MINVALUE 1
    MAXVALUE 9223372036854775807
    CACHE 1;

ALTER SEQUENCE public."ProviderAvailabilityChargeType_ProviderAvailabilityChargeTypeId_seq"
    OWNER TO postgres;



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


-- Table: public.ProviderAvailabilityChargeType

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

CREATE TABLE IF NOT EXISTS public."ProviderAvailabilityChargeType"
(
    "ProviderAvailabilityChargeTypeId" integer NOT NULL DEFAULT nextval('"ProviderAvailabilityChargeType_ProviderAvailabilityChargeTypeId"'::regclass),
    "ProviderAvailabilitySlotId" integer NOT NULL,
    "ChargeTypesId" integer NOT NULL,
    "Charge" integer,
    "Active" boolean NOT NULL DEFAULT true,
    "CreatedBy" integer NOT NULL,
    "CreatedDate" timestamp(6) without time zone NOT NULL,
    "ModifiedBy" integer,
    "ModifiedDate" timestamp(6) without time zone,
    CONSTRAINT "ProviderAvailabilityChargeType_pkey" PRIMARY KEY ("ProviderAvailabilityChargeTypeId"),
    CONSTRAINT "FK_ProviderAvailabilityChargeType_ProviderAvailabilitySlotId" FOREIGN KEY ("ProviderAvailabilitySlotId")
        REFERENCES public."ProviderAvailabilitySlot" ("ProviderAvailabilitySlotId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE CASCADE,
    CONSTRAINT "ProviderAvailabilityChargeType_ChargeTypesId_fkey" FOREIGN KEY ("ChargeTypesId")
        REFERENCES public."ChargeTypes" ("ChargeTypesId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)

TABLESPACE pg_default;

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

COMMENT ON COLUMN public."ProviderAvailabilityChargeType"."ProviderAvailabilityChargeTypeId"
    IS ' ';
	