项目数据库设计
项目说明
- 用户登录
- 选购商品
- 加购
- 检查库存
- 提交订单
- 货到付款:发货,收款确认
- 线上付款:发货
# 用户模块
完成用户注册和登录验证
# 用户实体
- 姓名
- 登录名
- 密码
- 手机号
- 证件类型
- 证件号码
- 性别
- 手机号
- 邮箱
- 邮编
- 所在地区(省市区)
- 详细地址
- 注册时间
- 积分
- 用户级别
- 级别积分上限
- 级别积分下限
- 生日
- 用户状态
- 用户余额
# customer_inf 用户信息表
- 自增主键ID customer_inf_id int unsigned auto_increment not null primary_key
- 用户id customer_id int unsigned not null
- 用户真实姓名 customer_name varchar(20) not null
- 证件类型(1.身份证 2.军官证 3.护照) identity_card_type tinyint not null default 1
- 证件号码 identity_card_no varchar(20)
- 手机号 mobile_phone int unsigned
- 邮箱 customer_email varchar(50)
- 性别 gender char(1)
- 用户积分 user_point int not null default 0
- 注册时间 register_time timestap not null
- 会员生日 birthday datetime
- 会员级别 customer_level tinyint not null default 1
- 用户余额 user_money decimal(8,2) not null default 0.00
- 最后修改时间 modified_time datetime not null default current_timestap
# customer_login 用户登录表
- 用户id customer_id int unsigned not null primary_key
- 用户登录名 login_name varchar(20) not null
- md5加密的密码 password char(32) not null
- 用户状态 user_status tinyint not null default 1
- 最后修改时间 modified_time datetime not null default current_timestap
# customer_level_inf 用户级别表
- 会员级别ID customer_level_id tinyint not null auto_increment primary_key
- 会员级别名称 level_name varchar(10) not null
- 该级别最低积分 min_point int unsigned not null default 0
- 该级别最高积分 max_point int unsigned not null default 0
- 最后修改时间 modified_time datetime not null default current_timestap
# customer_addr 用户地址表
- 自增主键ID customer_addr_id int unsigned auto_increment primary_key
- 登录表的ID customer_id int unsigned not null
- 邮编 zip smallint not null
- 所在地区 varchar(20) not null
- 详细地址 address varchar(100) not null
- 是否设为默认地址 is_default tinyint not null
- 最后修改时间 modified_time datetime not null default current_timestap
# customer_point_log 用户积分日志表
- 积分日志ID point_id int unsigned not null primary_key
- 用户ID customer_id int unsigned not null
- 积分来源 source tinyint unsigned not null
- 积分来源相关编号 refer_number int unsigned not null 0
- 变更积分数 change_point smallint not null default 0
- 积分日志生成时间 create_time datetime not null
# customer_balance_log 用户余额变更日志表
- 余额日志ID balance_id int unsigned not null auto_increment primary_key
- 用户ID customer_id int unsigned not null
- 积分来源 source tinyint unsigned not null
- 相关单据ID source_sn int unsigned not null
- 记录生成时间 create_time datetime not null default current_timestap
- 变动金额 amount decimal(8,2) not null default 0.00
# customer_login_log 用户登录日志表
- 登录日志id login_id int unsigned not null auto_increment primary_key
- 用户ID customer_id int unsigned not null
- 登录时间 login_time datetime not null
- 登录IP login_ip int unsigned not null
- 登录类型 login_type tinyint not null
# 商品模块
前后台商品管理和浏览
# 商品实体
- 名称
- 国条码
- 分类
- 品牌名称
- 供应商
- 描述
- 图片信息
- 成本
- 销售价格
- 上下架状态
- 颜色
- 重量
- 长宽高
- 有效期
- 生产时间
# brand_info 品牌信息表
- 品牌ID brand_id smallint unsigned auto_increment not null primary_key
- 品牌名称 brand_name varchar(20) not null
- 联系电话 telephone varchar(15) not null
- 品牌网站 brand_web varchar(50)
- 品牌logo varchar(50) brand_logo
- 品牌描述 brand_desc varchar(150)
- 品牌状态(0 禁用 1 启用)brand_status tinyint not null default 0
- 排序 brand_order tinyint not null default 0
- 最后修改时间 modified_time datetime not null default current_timestap
# product_category 商品分类信息表
- 分类ID category_id smallint unsigned auto_increment not null primary_key
- 分类名称 category_name varchar(10) not null
- 分类编码 category_code varchar(10) not null
- 父分类ID parent_id smallint unsigned not null
- 分类层级 category_level tinyint not null default 1
- 分类状态 category_status tinyint not null default 1
- 最后修改时间 modified_time datetime not null default current_timestap
# 供应商信息表 supplier_info
- 供应商唯一id supplier_id int unsigned auto_increment not null primary_key
- 供应商编码 supplier_code char(8) not null
- 供应商名称 supplier_name char(50) not null
- 供应商类型(1.自营 2.平台) supplier_type tinyint not null
- 供应商联系人 link_man varchar(10) not null
- 联系电话
# 订单模块
订单以及购物车的生产和管理
# 订单实体
# 仓配模块
仓库的库存和物流的管理
编辑 (opens new window)