-- ----------------------------
-- Table structure for msg_summary
-- ----------------------------
DROP TABLE IF EXISTS "public"."msg_summary";
CREATE TABLE "public"."msg_summary" (
    "id"           VARCHAR(36) COLLATE "pg_catalog"."default"   NOT NULL PRIMARY KEY,
    "type"         VARCHAR(128) COLLATE "pg_catalog"."default"  NOT NULL,
    "title"        VARCHAR(128) COLLATE "pg_catalog"."default"  NOT NULL,
    "content"      VARCHAR(1024) COLLATE "pg_catalog"."default" NOT NULL,
    "sender"       VARCHAR(36) COLLATE "pg_catalog"."default",
    "ext1"         VARCHAR(1024) COLLATE "pg_catalog"."default",
    "ext2"         VARCHAR(1024) COLLATE "pg_catalog"."default",
    "ext3"         TEXT COLLATE "pg_catalog"."default",
    "gmt_create"   TIMESTAMP(3)                                 NOT NULL,
    "gmt_modified" TIMESTAMP(3)                                 NOT NULL,
    "sys_id"       VARCHAR(36) COLLATE "pg_catalog"."default"   NOT NULL
);
COMMENT ON TABLE "public"."msg_summary" IS '消息内容表';
COMMENT ON COLUMN "public"."msg_summary"."id" IS '主键';
COMMENT ON COLUMN "public"."msg_summary"."type" IS '消息类型';
COMMENT ON COLUMN "public"."msg_summary"."title" IS '消息标题';
COMMENT ON COLUMN "public"."msg_summary"."content" IS '消息内容';
COMMENT ON COLUMN "public"."msg_summary"."sender" IS '发送人';
COMMENT ON COLUMN "public"."msg_summary"."ext1" IS '扩展字段1';
COMMENT ON COLUMN "public"."msg_summary"."ext2" IS '扩展字段2';
COMMENT ON COLUMN "public"."msg_summary"."ext3" IS '扩展字段3';
COMMENT ON COLUMN "public"."msg_summary"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "public"."msg_summary"."gmt_modified" IS '更新时间';
COMMENT ON COLUMN "public"."msg_summary"."sys_id" IS '系统ID';


-- ----------------------------
-- Table structure for msg_receive
-- ----------------------------
DROP TABLE IF EXISTS "public"."msg_receive";
CREATE TABLE "public"."msg_receive" (
    "id"            VARCHAR(36) COLLATE "pg_catalog"."default" NOT NULL PRIMARY KEY,
    "msg_id"        VARCHAR(36) COLLATE "pg_catalog"."default" NOT NULL,
    "receiver"      VARCHAR(64) COLLATE "pg_catalog"."default" NOT NULL,
    "receive_state" int4,
    "receive_time"  TIMESTAMP(3),
    "read_state"    int4,
    "read_time"     TIMESTAMP(3),
    "ext1"          VARCHAR(1024) COLLATE "pg_catalog"."default",
    "ext2"          VARCHAR(1024) COLLATE "pg_catalog"."default",
    "ext3"          TEXT COLLATE "pg_catalog"."default",
    "gmt_create"    TIMESTAMP(3)                               NOT NULL,
    "gmt_modified"  TIMESTAMP(3)                               NOT NULL,
    "sys_id"        VARCHAR(36) COLLATE "pg_catalog"."default" NOT NULL
);
COMMENT ON TABLE "public"."msg_receive" IS '消息接收记录表';
COMMENT ON COLUMN "public"."msg_receive"."id" IS '主键';
COMMENT ON COLUMN "public"."msg_receive"."msg_id" IS '消息Id';
COMMENT ON COLUMN "public"."msg_receive"."receiver" IS '接收人';
COMMENT ON COLUMN "public"."msg_receive"."receive_state" IS '接收状态';
COMMENT ON COLUMN "public"."msg_receive"."receive_time" IS '接收时间';
COMMENT ON COLUMN "public"."msg_receive"."read_state" IS '阅读状态';
COMMENT ON COLUMN "public"."msg_receive"."read_time" IS '阅读时间';
COMMENT ON COLUMN "public"."msg_receive"."ext1" IS '扩展字段1';
COMMENT ON COLUMN "public"."msg_receive"."ext2" IS '扩展字段2';
COMMENT ON COLUMN "public"."msg_receive"."ext3" IS '扩展字段3';
COMMENT ON COLUMN "public"."msg_receive"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "public"."msg_receive"."gmt_modified" IS '更新时间';
COMMENT ON COLUMN "public"."msg_receive"."sys_id" IS '系统ID';