You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
5.3 KiB
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

SET NAMES utf8mb4;
-- ----------------------------
--
-- ----------------------------
DROP TABLE IF EXISTS `crm_contract`;
CREATE TABLE `crm_contract`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '',
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '',
`customer_id` bigint DEFAULT NULL COMMENT '',
`business_id` bigint DEFAULT NULL COMMENT '',
`process_instance_id` bigint DEFAULT NULL COMMENT '',
`order_date` datetime DEFAULT NULL COMMENT '',
`owner_user_id` bigint DEFAULT NULL COMMENT '',
`no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`start_time` datetime DEFAULT NULL COMMENT '',
`end_time` datetime DEFAULT NULL COMMENT '',
`price` int DEFAULT NULL COMMENT '',
`discount_percent` int DEFAULT NULL COMMENT '',
`product_price` int DEFAULT NULL COMMENT '',
`ro_user_ids` varchar(4096) DEFAULT NULL COMMENT '',
`rw_user_ids` varchar(4096) DEFAULT NULL COMMENT '',
`contact_id` bigint DEFAULT NULL COMMENT '',
`sign_user_id` bigint DEFAULT NULL COMMENT '',
`contact_last_time` datetime DEFAULT NULL COMMENT '',
--
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '',
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_unicode_ci COMMENT ='';
DROP TABLE IF EXISTS `crm_clue`;
CREATE TABLE `crm_clue` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '',
`transform_status` tinyint DEFAULT NULL COMMENT '',
`follow_up_status` tinyint DEFAULT NULL COMMENT '',
`name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '线',
`customer_id` bigint NOT NULL COMMENT 'id',
`contact_next_time` datetime DEFAULT NULL COMMENT '',
`telephone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`mobile` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`owner_user_id` bigint NOT NULL COMMENT '',
`contact_last_time` datetime DEFAULT NULL COMMENT '',
`remark` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '',
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB COMMENT = '线' ;