CREATE TABLE "public"."member_manage" (
"id" int4 NOT NULL GENERATED ALWAYS AS IDENTITY (
  INCREMENT 1
  MINVALUE  1
  MAXVALUE 2147483647
  START 1
  ),
"level" int4,
"level_name" varchar(32),
"growth_value" int4,
"keep_value" int4,
"type" int4,
"status" int4 default 0,
"create_time" timestamp,
"update_time" timestamp,
CONSTRAINT "member_manage_pkey" PRIMARY KEY ("id")
);


COMMENT ON COLUMN "public"."member_manage"."level" IS '会员等级';

COMMENT ON COLUMN "public"."member_manage"."growth_value" IS '成长值';

COMMENT ON COLUMN "public"."member_manage"."status" IS '状态,0:新建,1:审核通过';

COMMENT ON COLUMN "public"."member_manage"."keep_value" IS '保级门槛';

COMMENT ON COLUMN "public"."member_manage"."type" IS '类型：1.用户 2.商家';

COMMENT ON COLUMN "public"."member_manage"."level_name" IS '等级名称';


ALTER TABLE "public"."app_base_user"
    ADD COLUMN "member_level" int2,
    ADD COLUMN "member_name" varchar(32),
    ADD COLUMN "current_month_growth" int4,
    ADD COLUMN "member_init_flag" int2  default 0,
    ADD COLUMN "member_keep_growth" int4;

COMMENT ON COLUMN "public"."app_base_user"."member_level" IS '会员等级';

COMMENT ON COLUMN "public"."app_base_user"."member_name" IS '会员名称';

COMMENT ON COLUMN "public"."app_base_user"."current_month_growth" IS '当月已获取成长值';

COMMENT ON COLUMN "public"."app_base_user"."member_init_flag" IS '月初初始化标志,默认0:未开始,1:已初始化';

COMMENT ON COLUMN "public"."app_base_user"."member_keep_growth" IS '当前会员保级所需成长值';


