DROP TABLE IF EXISTS "frame_user_notice"; CREATE TABLE "frame_user_notice" ( "id" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, "user_id" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, "notice_id" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, "is_read" bool NOT NULL, "read_time" timestamp(6), "sort_number" float8 NOT NULL, "is_enable" bool NOT NULL, "is_delete" bool NOT NULL, "create_at" timestamp(6) NOT NULL, "create_by" varchar(50) COLLATE "pg_catalog"."default", "update_at" timestamp(6) NOT NULL, "update_by" varchar(50) COLLATE "pg_catalog"."default", "remark" text COLLATE "pg_catalog"."default", "extend" text COLLATE "pg_catalog"."default" ) ; -- ---------------------------- -- Indexes structure for table frame_user_notice -- ---------------------------- CREATE INDEX "IX_frame_user_notice_create_at" ON "frame_user_notice" USING btree ( "create_at" "pg_catalog"."timestamp_ops" ASC NULLS LAST ); CREATE INDEX "IX_frame_user_notice_notice_id" ON "frame_user_notice" USING btree ( "notice_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST ); CREATE INDEX "IX_frame_user_notice_sort_number" ON "frame_user_notice" USING btree ( "sort_number" "pg_catalog"."float8_ops" ASC NULLS LAST ); CREATE INDEX "IX_frame_user_notice_update_at" ON "frame_user_notice" USING btree ( "update_at" "pg_catalog"."timestamp_ops" ASC NULLS LAST ); CREATE INDEX "IX_frame_user_notice_user_id" ON "frame_user_notice" USING btree ( "user_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST ); -- ---------------------------- -- Primary Key structure for table frame_user_notice -- ---------------------------- ALTER TABLE "frame_user_notice" ADD CONSTRAINT "PK_frame_user_notice" PRIMARY KEY ("id"); -- ---------------------------- -- Foreign Keys structure for table frame_user_notice -- ---------------------------- ALTER TABLE "frame_user_notice" ADD CONSTRAINT "FK_frame_user_notice_account_user_user_id" FOREIGN KEY ("user_id") REFERENCES "account_user" ("id") ON DELETE CASCADE ON UPDATE NO ACTION; ALTER TABLE "frame_user_notice" ADD CONSTRAINT "FK_frame_user_notice_frame_notice_notice_id" FOREIGN KEY ("notice_id") REFERENCES "frame_notice" ("id") ON DELETE CASCADE ON UPDATE NO ACTION;