CREATE TABLE "group_act_record" (
   "id" int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY,
   "type" varchar(64) NOT NULL,
   "ref_id" int4 NOT NULL,
   "act_type" varchar(64) NOT NULL,
   "status" int2 DEFAULT 1,
   "create_time" timestamp,
   PRIMARY KEY ("id")
);

CREATE INDEX "gar_gid" ON "group_act_record" USING btree (
    "type","ref_id","act_type"
);

COMMENT ON COLUMN "group_act_record"."ref_id" IS '关联记录id(拼团id,订单id)';

COMMENT ON COLUMN "group_act_record"."type" IS '关联类型,拼团:group,订单:order';

COMMENT ON COLUMN "group_act_record"."act_type" IS '活动类型';