当前位置:文档之家› 餐饮管理系统数据库设计

餐饮管理系统数据库设计

餐饮管理系统数据库设计
1.Tb_employee员工表
Roleid 角色id int not null, Employeenum 工号int primary key, Username 用户名varchar(20) not null, Password 密码varchar(50) not null,
Sex 性别char(2) not null,
Tel 电话varchar(20) not null,
Address 地址varchar(50) not null,
Stature 身高int not null,
Weight 体重float not null, Employeestate 员工状态varchar(20) not null(在职/离职), Deptid 部门id int not null,Supermanagerid 上级工号int not null
2.Tb_role 角色表
Roleid 角色id int primary key, Rolename 角色名称varchar(20) not null, Rolewage 角色工资float not null
3.Tb_popedom 权限表
Popedomid 权限id int primary key, Roleid 角色id int not null, Popedomarea 权限范围varchar(50) not null
4.Tb_dept 部门表
Deptid 部门id int primary key, Deptname 部门名称varchar(50) not null, employeenum 部门经理工号varchar(20) not null
5.tb_depot 仓库表
depotid 仓库id int primary key, depotname 仓库名称varchar(20) not null,\ employeenum 仓库管理员工号int not null
6.tb_cargo 货物表
cargoid 货物批号int not null, cargoname 货物名称varchar(50) not null, cargobrand 货物品牌varchar(50) not null,
cargoamount 货物数量int not null,
depotid 仓库id int not null,
employeeid 清点货物人工号int not null,
supplyid 供货商id int not null,
cargostate 货物状态varchar(20) not null ,
cargoprice 货物进价单价float not null,
cargosaleprice 货物出售单价float not null,
cargotypeid 货物类别id int not null,
cargotime 进货时间datetime not null,
saletime 售出时间datetime not null,
limittime 保质期int not null(以“月”为单位),producetime 生产日期datetime not null
7.tb_supply 供货商表
supplyid 供货商id int primary key, supplyname 供货商名称varchar(50) not null,
supplytel 供货商电话varchar(20) not null,
supplyaddress 供货商地址varchar(50) not null, supplymanager 供货商负责人varchar(20) not null
8.tb_cargotype 货物类别
cargotypeid 货物类别id int primary key, cargotypename 货物类别名称varchar(20) not null,
9.tb_worksummarize 工作总结表
Employeenum 员工工号int not null,
starttime 起始时间datetime not null,
endtime 终止时间datetime not null,
strikeday 休息天数int not null,
overstrikeday 剩余休息天数i nt not null,
workstatus 工作状况varchar(1000) not null,
wagechange 工资变动float not null
wageoriginal 原本工资float not null,
wagefact 实际工资float not null
10.tb_reject 货物报废表
rejectid 报废id int primary key,
cargoname货物名称varchar(50) not null,
cargobrand 货物品牌varchar(50) not null cargorejectamount 货物数量i nt not null,
rejectreason 报废原因varchar(500) not null,
employeenum 报废者工号int not null,
rejecttime 报废记录时间datetime not null
11.tb_cargolose 货物遗失表
cargoloseid 货物遗失id int primary key,
cargoname 货物名称varchar(50) not null,
cargobrand 货物品牌varchar(50) not null,
cargoalosemount 货物遗失数量int not null,
employeenum 负责人工号int not null,
cargoprice 赔偿单价float not null,
cargotime 记录时间datetime not null
12.tb_table餐桌表
tableid 桌号int primary key,
employeenum 负责人工号int not null,
tablepersonmount 座次int not null,
hallid 所属厅id int not null,
tablestate 餐桌状态varchar(20) not null(预定/占用/空闲), tablestarttime 餐桌开始使用时间datetime not null,
tableendtime 餐桌结束使用时间datetime not null
13.tb_hall 大厅表
hallid 大厅id int primary key,
hallname 大厅名称varchar(20) not null,
employeenum 大厅负责人工号int not null,
hallstate 大厅状态varchar(20) not null(预定/占满/正常营业)hallstarttime 大厅开始使用时间datetime null,
hallendtime 大厅结束使用时间datetime null
14.tb_car 车辆表
Carnum 车辆牌号varchar(20) primary key,
Carname 车辆名称varchar(20) not null,
Employee 司机工号int not null,
Caruser 用车人工号int not null,
Carstate 车辆状态varchar(20) not null,
Carstarttime 车辆开始使用时间datetime not null,
Carendtime 车辆结束使用时间datetime not null
15.Tb_compacttype 合同类别表
Compacttypeid 合同类别id int primary key, Compacttypename 合同类别varchar(50) not null
16.Tb_compact 合同表
Compactid 合同id int primary key, Compacttypeid 合同类别id int not null, Compacttitle 合同标题varchar(50) not null, Compactcontent 合同内容varchar(5000) not null, Employeeid 合同乙方(员工)int null, Compactb 合同乙方(名称) varchar(20) not null, Compactstarttime 合同生效日期datetime not null, Compactendtime 合同失效日期datetime not null, Compacttime 合同签订日期datetime not null, Compactmoney 签约金float not null。

相关主题