-- ----------------------------
-- 客户表
-- ----------------------------
drop table if exists sys_customer;
create table sys_customer (
customer_id bigint(20) not null auto_increment comment '客户id',
customer_name varchar(30) default '' comment '客户姓名',
phonenumber varchar(11) default '' comment '手机号码',
sex varchar(20) default null comment '客户性别',
birthday datetime comment '客户生日',
remark varchar(500) default null comment '客户描述',
primary key (customer_id)
) engine=innodb auto_increment=1 comment = '客户表';
-- ----------------------------
-- 商品表
-- ----------------------------
drop table if exists sys_goods;
create table sys_goods (
goods_id bigint(20) not null auto_increment comment '商品id',
customer_id bigint(20) not null comment '客户id',
name varchar(30) default '' comment '商品名称',
weight int(5) default null comment '商品重量',
price decimal(6,2) default null comment '商品价格',
date datetime comment '商品时间',
type char(1) default null comment '商品种类',
primary key (goods_id)
) engine=innodb auto_increment=1 comment = '商品表';
-- ----------------------------
-- 产品表
-- ----------------------------
drop table if exists sys_product;
create table sys_product (
product_id bigint(20) not null auto_increment comment '产品id',
parent_id bigint(20) default 0 comment '父产品id',
product_name varchar(30) default '' comment '产品名称',
order_num int(4) default 0 comment '显示顺序',
status char(1) default '0' comment '产品状态(0正常 1停用)',
primary key (product_id)
) engine=innodb auto_increment=1 comment = '产品表';
-- ----------------------------
-- 学生表
-- ----------------------------
drop table if exists sys_student;
create table sys_student (
student_id int(11) auto_increment comment '编号',
student_name varchar(30) default '' comment '学生名称',
student_age int(3) default null comment '年龄',
student_hobby varchar(30) default '' comment '爱好(0代码 1音乐 2电影)',
student_sex char(1) default '0' comment '性别(0男 1女 2未知)',
student_status char(1) default '0' comment '状态(0正常 1停用)',
student_birthday datetime comment '生日',
primary key (student_id)
) engine=innodb auto_increment=1 comment = '学生信息表';
-- ----------------------------
-- 电话本
-- ----------------------------
-- auto-generated definition
create table biz_book
(
book_id bigint auto_increment comment '电话本ID'
primary key,
book_name varchar(50) not null comment '姓名',
book_phone varchar(50) not null comment '手机号',
book_birthday datetime not null comment '生日',
create_time datetime null comment '创建时间'
)
comment '电话本';
ruoyi-vue常用表格
于 2022-04-25 22:56:28 首次发布