mysql创建表结构
📦 详细表说明
1. banner 表(轮播图表)
用途:存储网站轮播图信息
结构:
| 字段名 | 类型 | 约束 | 说明 ||-----------------|--------------|-----------------------|--------------------|| id | char(32) | 主键,唯一,非空 | 唯一标识 || img_url | varchar(255) | 非空 | 图片存储路径 || create_time | timestamp | 默认当前时间 | 创建时间 || update_time | timestamp | 默认当前时间,更新触发 | 最后修改时间 |
create table banner( id char(32) primary key not null unique comment \"id\", img_url varchar(255) not null comment \"图片地址\", create_time timestamp default current_timestamp comment \"创建时间\", update_time timestamp default current_timestamp on update current_timestamp comment \"更新时间\") comment \"轮播图表\"
2. admins 表(管理员表)
用途:超级管理员账户体系
结构:
create table admins( id char(32) primary key not null unique comment \"id\", username varchar(50) not null comment \"姓名\", work_number varchar(20) not null comment \"工号\", password varchar