-- Table: public.ReferralDoctor

-- DROP TABLE public."ReferralDoctor";

CREATE TABLE public."ReferralDoctor"
(
    "ReferralDoctorId" integer NOT NULL DEFAULT nextval('"Referral_Doctor_Master_Seq"'::regclass),
    "Salutation" character varying(10) COLLATE pg_catalog."default",
    "FirstName" character varying(50) COLLATE pg_catalog."default" NOT NULL,
    "LastName" character varying(50) COLLATE pg_catalog."default" NOT NULL,
    "Mobile" character varying(10) COLLATE pg_catalog."default",
    "Email" text COLLATE pg_catalog."default",
    "Active" boolean DEFAULT true,
    "LocationId" integer,
    "CreatedBy" integer,
    "CreatedDate" timestamp without time zone,
    "ModifiedBy" integer,
    "ModifiedDate" timestamp without time zone,
    CONSTRAINT "ReferralDoctor_pkey" PRIMARY KEY ("ReferralDoctorId"),
    CONSTRAINT "ReferralDoctor_CreatedBy_fkey" FOREIGN KEY ("CreatedBy")
        REFERENCES public."Account" ("AccountId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT "ReferralDoctor_LocationId_fkey" FOREIGN KEY ("LocationId")
        REFERENCES public."Location" ("LocationId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT "ReferralDoctor_ModifiedBy_fkey" FOREIGN KEY ("ModifiedBy")
        REFERENCES public."Account" ("AccountId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)

TABLESPACE pg_default;

ALTER TABLE public."ReferralDoctor"
    OWNER to postgres;