• 电子商城开发之目录与数据库表的创建


    1.前台功能
    ---首页
    ---品牌页面
    ---商品详情
    ---商品评论管理
    ---购物车管理
    ---结算页面
    ---用户登陆和退出
    ---个人中心管理
    ---订单提交页面

    2.后台功能
    ---登陆系统
    ---用户管理
    ---分类管理
    ---品牌管理
    ---商品管理
    ---订单状态管理
    ---订单管理

    -----------------------------------------------------------------------------------------

    数据库表的创建:

    user表: 
    //用户管理表
    ---id
    ---username
    ---password
    ---email //邮箱
    ---regtime //注册时间
    ---admin //权限等级

    shopclass: 
    //商品分类表
    ---id
    ---product_class //商品类型
    ---brand_class //商品品牌

    brand:
    //商品信息表
    ---id
    ---name
    ---shopclass_id 
    ---price //商品价格
    ---stock //商品库存
    ---upself //是否上架
    ---image //商品图片

    order:
    //订单表
    ---id
    ---ordernum //订单号
    ---user_id
    ---brand_id
    ---price //交易价格
    ---time //交易时间
    ---orderstatus //订单状态
    ---rec_name //收件人
    ---rec_tel //收件人联系方式
    ---rec_address //收件人地址

    comments:
    //商品评论表
    ---id
    ---content //评论内容
    ---evaluate //评价等级
    ---user_id 
    ---brand_id


    -----------------------------------------------------------------------------------------
    sql语句:

    create table if not exists user(
    id int unsigned not null auto_increment,
    username varchar(50) not null,
    password varchar(50) not null,
    regtime int not null,
    admin tinyint not null,
    email varchar(50) not null,
    primary key(id)
    );

    create table if not exists shopclass(
    id int unsigned not null auto_increment,
    product_class varchar(50) not null,
    brand_class varchar(50) not null,
    primary key(id)
    );

    create table if not exists brand(
    id int unsigned not null auto_increment,
    name varchar(50) not null,
    stock int not null,
    price float not null,
    upshelf tinyint not null,
    image varchar(100) not null,
    shopcclass_id int not null,
    primary key(id)
    );

    create table if not exists order1(
    id int unsigned not null auto_increment,
    ordernum varchar(50) not null,
    user_id int not null,
    brand_id int not null,
    price float not null,
    time int not null,
    orderstatus varchar(50) not null,
    rec_name varchar(50) not null,
    rec_tel varchar(20) not null,
    rec_address varchar(200) not null,
    primary key(id)
    );

    create table if not exists comments(
    id int unsigned not null auto_increment,
    content text,
    evaluate int not null,
    user_id int not null,
    brand_id int not null,
    primary key(id)
    );

    -------------------------------------------------------------------------------------------------------------

    目录结构:

    |--index.php //跳转至前台首页

    |--public //公共文件

    |--common //函数库
    |--config.inc.php //公共配置文件
    |--functions.php //函数库文件

    |--images //公共图片

    |--css //公共样式

    |--uploads //公共图片上传

    |--js

    |--admin //后台

    |--index.php //后台网站首页

    |--login //后台登陆
    |--login.php //后台登陆页
    |--check.php //登陆验证页
    |--logout.php //后台退出页

    |--public //公共资源目录

    |--css //后台css文件

    |--images //后台图片

    |--header.php //页头

    |--menu.php //导航栏页面

    |--main.php //后台首页

    |--acl.php //网站后台权限

    |--user //用户管理

    |--index.php

    |--add.php

    |--insert.php

    |--edit.php

    |--update.php

    |--del.php

    |--shopclass //商品分类管理

    |--index.php

    |--add.php

    |--insert.php

    |--edit.php

    |--update.php

    |--del.php

    |--brand //商品信息

    |--index.php

    |--add.php

    |--insert.php

    |--edit.php

    |--update.php

    |--del.php

    |--order //订单管理信息
    |--index.php

    |--status.php

    |--update.php

    |--comments //商品评论

    |--index.php

    |--add.php

    |--insert.php

    |--edit.php

    |--update.php

    |--del.php

    |--home //前台
    |--public //公共资源

    |--css //前台css

    |--images //前台图片

    |--header.php //前台导航

    |--footer.php //前台底部页面

    |--acl.php //网站前台权限

    |--index.php //前台首页

    |--brandlist.php //品牌列表页

    |--shopinfo.php //商品详情页

    |--shopcar //购物车管理

    |--addcar.php //加入购物车

    |--clearcar.php //清空购物车

    |--opcar.php //管理购物车

    |--account.php //结算页面

    |--ordercommit.php //提交订单

    |--center.php //个人中心

    |--user
    |--register.php //注册
    |--login.php //登陆
    |--check.php //验证
    |--logout.php //退出

  • 相关阅读:
    shiro之cache问题
    SpringMVC关于请求参数乱码问题
    js递归错误
    说说Javac
    说说CDN
    谈谈HTTP
    谈谈Ajax(二)
    谈谈Ajax(一)
    记一次关于SSM框架的使用错误
    MP实战系列(十四)之分页使用
  • 原文地址:https://www.cnblogs.com/w84036937/p/5403517.html
Copyright © 2020-2023  润新知