feat: CRM 客户限制

This commit is contained in:
Wanwan
2023-11-11 20:49:52 +08:00
parent 2915b46fa5
commit 5b295d56b6
21 changed files with 754 additions and 3 deletions

View File

@@ -6,4 +6,6 @@ DELETE FROM "crm_receivable";
DELETE FROM "crm_receivable_plan";
DELETE FROM "crm_customer";
DELETE FROM "crm_customer";
DELETE FROM "crm_customer_limit_config";

View File

@@ -122,4 +122,20 @@ CREATE TABLE IF NOT EXISTS "crm_customer" (
"deleted" bit NOT NULL DEFAULT FALSE,
"tenant_id" bigint NOT NULL,
PRIMARY KEY ("id")
) COMMENT '客户表';
) COMMENT '客户表';
CREATE TABLE IF NOT EXISTS "crm_customer_limit_config" (
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"type" int NOT NULL,
"user_ids" varchar,
"dept_ids" varchar,
"max_count" int NOT NULL,
"deal_count_enabled" varchar,
"creator" varchar DEFAULT '',
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updater" varchar DEFAULT '',
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
"deleted" bit NOT NULL DEFAULT FALSE,
"tenant_id" bigint NOT NULL,
PRIMARY KEY ("id")
) COMMENT '客户限制配置表';