DROP TABLE IF EXISTS "frame_notice";
CREATE TABLE "frame_notice" (
  "id" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "user_id" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "title" varchar(100) COLLATE "pg_catalog"."default" NOT NULL,
  "content" text COLLATE "pg_catalog"."default",
  "type" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "level" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "state" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "target" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "target_users" jsonb,
  "publish_time" timestamp(6),
  "revoke_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_notice
-- ----------------------------
CREATE INDEX "IX_frame_notice_create_at" ON "frame_notice" USING btree (
  "create_at" "pg_catalog"."timestamp_ops" ASC NULLS LAST
);
CREATE INDEX "IX_frame_notice_sort_number" ON "frame_notice" USING btree (
  "sort_number" "pg_catalog"."float8_ops" ASC NULLS LAST
);
CREATE INDEX "IX_frame_notice_update_at" ON "frame_notice" USING btree (
  "update_at" "pg_catalog"."timestamp_ops" ASC NULLS LAST
);
CREATE INDEX "IX_frame_notice_user_id" ON "frame_notice" USING btree (
  "user_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table frame_notice
-- ----------------------------
ALTER TABLE "frame_notice" ADD CONSTRAINT "PK_frame_notice" PRIMARY KEY ("id");

-- ----------------------------
-- Foreign Keys structure for table frame_notice
-- ----------------------------
ALTER TABLE "frame_notice" ADD CONSTRAINT "FK_frame_notice_account_user_user_id" FOREIGN KEY ("user_id") REFERENCES "account_user" ("id") ON DELETE CASCADE ON UPDATE NO ACTION;
