create sequence "DoctorUnitMaster_DoctorUnitMasterId_seq";

CREATE TABLE "DoctorUnitMaster"
(
    "DoctorUnitMasterId" bigint NOT NULL DEFAULT nextval('"DoctorUnitMaster_DoctorUnitMasterId_seq"'::regclass),
    "UnitName" character varying(255) not null ,
	"Code" character varying(255) ,
	"LocationId" bigint NOT NULL,
	"Active" bool default false,
    "CreatedBy" bigint NOT NULL,
    "CreatedDate" timestamp without time zone NOT NULL,
    "ModifiedBy" bigint,
    "ModifiedDate" timestamp without time zone,
    CONSTRAINT "DoctorUnitMaster_pkey" PRIMARY KEY ("DoctorUnitMasterId"),
    CONSTRAINT "FK_DoctorUnitMaster_CreatedBy" FOREIGN KEY ("CreatedBy")
        REFERENCES public."Account" ("AccountId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT "FK_DoctorUnitMaster_ModifiedBy" FOREIGN KEY ("ModifiedBy")
        REFERENCES public."Account" ("AccountId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
	 CONSTRAINT "FK_Location_LocationId" FOREIGN KEY ("LocationId")
        REFERENCES public."Location" ("LocationId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
	
)








