MySQL Create Table SQL
Table Structure: okayapi_sys_message:/tablelist/okayapi_sys_message.html
-- MySQL Table okayapi_sys_message
-- From: OkayAPI.com
CREATE TABLE `okayapi_sys_message` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(150) NOT NULL COMMENT '标题',
`content` text NOT NULL COMMENT '消息内容',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '消息类型[1:公告;2:提醒;3:信息(私信)',
`target_id` int(10) NOT NULL DEFAULT '0' COMMENT '目标id',
`target_type` varchar(100) NOT NULL COMMENT '目标类型',
`target_display` int(10) NOT NULL DEFAULT '1' COMMENT '接受者是否删除',
`action` varchar(100) NOT NULL COMMENT '动作',
`view` int(10) NOT NULL DEFAULT '0' COMMENT '浏览量',
`sender_id` int(10) NOT NULL DEFAULT '0' COMMENT '发送者id',
`sender_display` tinyint(1) NOT NULL DEFAULT '1' COMMENT '发送者是否删除',
`sender_withdraw` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否撤回 0是撤回',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
KEY `title` (`title`),
KEY `content` (`content`),
KEY `type` (`type`),
KEY `target_id` (`target_id`),
KEY `target_type` (`target_type`),
KEY `target_display` (`target_display`),
KEY `action` (`action`),
KEY `view` (`view`),
KEY `sender_id` (`sender_id`),
KEY `sender_display` (`sender_display`),
KEY `sender_withdraw` (`sender_withdraw`),
KEY `status` (`status`),
PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '系统消息表';
After replication, you can go to the database to create the database table.
MySQL database table structure design
Displaying 1-12 of 12 results.
Field Name | Field Type | Default | IS NULL | Field Comment | Index | Demo Data |
---|---|---|---|---|---|---|
title | varchar(150) | 是 | 标题 | |||
content | text | 是 | 消息内容 | |||
type | tinyint(1) | 0 | 是 | 消息类型[1:公告;2:提醒;3:信息(私信) | 0 | |
target_id | int(10) | 0 | 是 | 目标id | 0 | |
target_type | varchar(100) | 是 | 目标类型 | |||
target_display | int(10) | 1 | 是 | 接受者是否删除 | 1 | |
action | varchar(100) | 是 | 动作 | |||
view | int(10) | 0 | 是 | 浏览量 | 0 | |
sender_id | int(10) | 0 | 是 | 发送者id | 0 | |
sender_display | tinyint(1) | 1 | 是 | 发送者是否删除 | 1 | |
sender_withdraw | tinyint(1) | 1 | 是 | 是否撤回 0是撤回 | 1 | |
status | tinyint(4) | 1 | 否 | 状态[-1:删除;0:禁用;1启用] | 1 |