mysql table creation specification

Common fields

CREATE TABLE `che`.`<table_name>` (
    `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引id',
    `username` varchar(255) COMMENT '用户名',
    `password` varchar(32) COMMENT '密码',
    `title` varchar(255) COMMENT '标题',
    `content` text COMMENT '内容',
    `pic` varchar(255) COMMENT '封面图',
    `pics` text COMMENT '相册',
    `status` tinyint(1) DEFAULT 0 COMMENT '0正常状态 1冻结状态',
    `ext` varchar(255) COMMENT '扩展字段',
    `create_time` int(11) DEFAULT 0 COMMENT '创建时间',
    `update_time` int(11) DEFAULT 0 COMMENT '更新时间',
    PRIMARY KEY (`id`)
) COMMENT='';

Common table names

goods
article
link
nav
slide
order_goods
user
bill

goods_cat goods_rec classification and recommendation bits

The associated id
table name corresponds to the table name _id
user => user_id

The same set of logic, the prefix is ​​the same.
For example, the same order, the prefix is ​​the same: order_

用户:
user
user_bill
user_bank
user_address

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325145864&siteId=291194637