ALTER TABLE "card_group_info"
    ADD COLUMN "use_member_discount" int2 default 0;

COMMENT ON COLUMN "card_group_info"."use_member_discount" IS '参与会员折扣：默认0不参与 平台会员折扣 1 品牌会员折扣 2';

CREATE TABLE "brand_member_discount_record" (
    "id" int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "type" varchar(255),
    "order_id" int8,
    "discount" numeric(18,2),
    "discount_amount" numeric(18,2),
    "merchant_group_id" int8,
    "status" int2,
    "create_time" timestamp(6),
    PRIMARY KEY ("id")
);

COMMENT ON COLUMN "brand_member_discount_record"."type" IS '折扣类型: common 品牌会员常规折扣';
COMMENT ON COLUMN "brand_member_discount_record"."order_id" IS '订单id';
COMMENT ON COLUMN "brand_member_discount_record"."discount" IS '折扣率';
COMMENT ON COLUMN "brand_member_discount_record"."discount_amount" IS '折扣金额';
COMMENT ON COLUMN "brand_member_discount_record"."merchant_group_id" IS '品牌id';
COMMENT ON COLUMN "brand_member_discount_record"."status" IS '状态：101已支付、205退款完成';





