|
|
@ -5,7 +5,7 @@ CREATE TABLE `user` (
|
|
|
|
`password` varchar(50) NOT NULL DEFAULT '',
|
|
|
|
`password` varchar(50) NOT NULL DEFAULT '',
|
|
|
|
`nickname` varchar(50) NOT NULL DEFAULT '',
|
|
|
|
`nickname` varchar(50) NOT NULL DEFAULT '',
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
`updated_at` timestamp,
|
|
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
|
|
`avator` varchar(100) NOT NULL DEFAULT '',
|
|
|
|
`avator` varchar(100) NOT NULL DEFAULT '',
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
@ -24,7 +24,7 @@ CREATE TABLE `visitor` (
|
|
|
|
`source_ip` varchar(50) NOT NULL DEFAULT '',
|
|
|
|
`source_ip` varchar(50) NOT NULL DEFAULT '',
|
|
|
|
`to_id` varchar(50) NOT NULL DEFAULT '',
|
|
|
|
`to_id` varchar(50) NOT NULL DEFAULT '',
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
`updated_at` timestamp,
|
|
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
|
|
`visitor_id` varchar(100) NOT NULL DEFAULT '',
|
|
|
|
`visitor_id` varchar(100) NOT NULL DEFAULT '',
|
|
|
|
`status` tinyint(4) NOT NULL DEFAULT '0',
|
|
|
|
`status` tinyint(4) NOT NULL DEFAULT '0',
|
|
|
@ -44,7 +44,7 @@ CREATE TABLE `message` (
|
|
|
|
`visitor_id` varchar(100) NOT NULL DEFAULT '',
|
|
|
|
`visitor_id` varchar(100) NOT NULL DEFAULT '',
|
|
|
|
`content` varchar(2048) NOT NULL DEFAULT '',
|
|
|
|
`content` varchar(2048) NOT NULL DEFAULT '',
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
`updated_at` timestamp,
|
|
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
|
|
`mes_type` enum('kefu','visitor') NOT NULL DEFAULT 'visitor',
|
|
|
|
`mes_type` enum('kefu','visitor') NOT NULL DEFAULT 'visitor',
|
|
|
|
`status` enum('read','unread') NOT NULL DEFAULT 'unread',
|
|
|
|
`status` enum('read','unread') NOT NULL DEFAULT 'unread',
|
|
|
|