ALTER TABLE "app_base_user"
    ADD COLUMN "notify_top_show" int2 DEFAULT 1,
    ADD COLUMN "voice_reminder" int2 DEFAULT 1,
    ADD COLUMN "vibrate_reminder" int2 DEFAULT 1;

COMMENT ON COLUMN "public"."app_base_user"."notify_top_show" IS 'app顶部横幅通知';

COMMENT ON COLUMN "public"."app_base_user"."voice_reminder" IS '声音提醒,默认1:开启,0:关闭';

COMMENT ON COLUMN "public"."app_base_user"."vibrate_reminder" IS '震动提醒,默认1:开启,0:关闭';


CREATE TABLE "app_notify_config" (
     "id" int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY,
     "user_id" int4 NOT NULL,
     "msg_type" varchar(32) NOT NULL,
     "show_type" varchar(32) NOT NULL,
     "status" int2 DEFAULT 1,
     "config_status" int2 DEFAULT 0,
     "notify_type" varchar(16),
     "notify_config" text,
     "create_time" timestamp,
     "update_time" timestamp,
     PRIMARY KEY ("id")
);

CREATE INDEX "a-n-uid" ON "public"."app_notify_config" USING btree (
     "user_id"
);

COMMENT ON COLUMN "public"."app_notify_config"."msg_type" IS '消息大类型';

COMMENT ON COLUMN "public"."app_notify_config"."show_type" IS '展示消息大类型';

COMMENT ON COLUMN "public"."app_notify_config"."status" IS '开启状态:默认1:开启,0:未开启';

COMMENT ON COLUMN "public"."app_notify_config"."config_status" IS '是否有个性化配置:默认0:无,1:开启';

COMMENT ON COLUMN "public"."app_notify_config"."notify_type" IS '提醒类型:全部:all.仅关注:follow,互相关注:mutual_follow,仅购买:buy,自定义:private';

COMMENT ON COLUMN "public"."app_notify_config"."notify_config" IS '开售通知配置json';

