create database shop;
use shop;
create table admin(
aId tinyint(3) unsigned not null auto_increment,
aName varchar(20) not null,
aPw char(32) not null,
aEm varchar(50) not null,
primary key(aId),
unique key(aName)
)engine=InnoBD auto_increment=7 default charset=utf8;
create table cate(
cId smallint(5) unsigned not null auto_increment,
cName varchar(20) not null,
primary key(cId),
unique key(cName)
)engine=InnoBD auto_increment=5 default charset=utf8;
create table pro (
pId int(10) unsigned not null auto_increment,
pName varchar(255) not null,
pSn varchar(50) not null,
pNum int(10) unsigned default 1,
mPrice decimal(10,2) not null,
iPrice decimal(10,2) not null,
pDesc text,
pubTime int(10) unsigned not null,
isShow tinyint(1) default 1,
isHot tinyint(1) default 0,
cId smallint(5) unsigned not null,
primary key (id),
unique key pName (pName),
unique key pName_2 (pName)
) engine=InnoDB auto_increment=20 default charset=utf8;
create table user (
uId int(10) unsigned not null auto_increment,
username varchar(20) not null,
password char(32) not null,
sex enum('男','女','保密') not null default '保密',
email varchar(50) not null,
face varchar(50) not null,
regTime int(10) unsigned not null,
activeFlag tinyint(1) default 0,
primary key (uId),
unique key username (username)
) engine=InnoDB auto_increment=6 default charset=utf8;
create table album (
alId int(10) unsigned not null auto_increment,
pId int(10) unsigned not null,
albumPath varchar(50) not null,
primary key (alid)
) engine=InnoDB auto_increment=34 default charset=utf8;
数据库
最新推荐文章于 2024-10-30 11:02:01 发布