員工信息表[staff_users]
|id|姓名|年齡|性別|戶籍|銀行卡|所屬銀行|轉(zhuǎn)賬|聯(lián)系方式|專長|入職日期|離職時(shí)間|
|--|--|
|id|name|age|sex|address|bank_card|bank_belongs|transfer|contact|can|created_time|end_time|
員工工資結(jié)算規(guī)則表 [staff_salarys]
|salary_id|員工id|用戶姓名|基礎(chǔ)工資|請(qǐng)假天數(shù)|一天請(qǐng)假扣除錢|加班小時(shí)數(shù)|每小時(shí)加班錢|創(chuàng)建時(shí)間|
|--|--|
|id|user_id|name|salary_base|counts_leave|money_leave|counts_overtime|money_overtime|create_time|
員工月工資統(tǒng)計(jì)表[staff_monthcount]
|id|員工id|姓名|基礎(chǔ)工資|結(jié)算后工資|請(qǐng)假次數(shù)|一次請(qǐng)假扣除錢|加班次數(shù)|每次加班錢數(shù)|月份|
|--|--|
|id|user_id|name|salary_base|salary_final|counts_leave|money_leave|counts_overtime|money_overtime|month|
加班表 overtime
|id|員工id|用戶姓名|加班開始時(shí)間|加班結(jié)束時(shí)間|
|--|--|
|id|user_id|name|create_time|end_time|
請(qǐng)假表 leave
|id|員工id|用戶姓名|請(qǐng)假開始時(shí)間|請(qǐng)假結(jié)束時(shí)間|請(qǐng)假原因|
|--|--|
|id|user_id|name|create_time|end_time|cause|
權(quán)限表【auth】
create table auth(
auth_id smallint(6) unsigned not null auto_increment,
auth_name varchar(20) not null comment '權(quán)限名稱',
auth_pid smallint(6) unsigned not null comment '父id',
auth_c varchar(32) not null default '' comment '控制器',
auth_a varchar(32) not null default '' comment '方法名',
primary key(auth_id)
)engine=innodb auto_increment=1 default charset =utf8
用戶表【manager】
create table manager(
mg_id int(6) not null auto_increment,
mg_name varchar(32) not null,
mg_pwd varchar(40) not null,
mg_time int(11) unsigned not null comment '登陸的時(shí)間',
role_id tinyint(3) unsigned not null default '0' comment '角色id',
primary key(mg_id)
)engine=innodb auto_increment=1 default charset =utf8
角色表【role】
create table role(
role_id smallint(6) unsigned not null auto_increment,
role_name varchar(20) not null comment '角色名稱',
role_auth_ids varchar(128) not null default '' comment '權(quán)限id',
role_auth_ac text comment '控制器操作',
primary key(role_id)
)engine=innodb auto_increment=1 default charset =utf8
員工信息表【staff_users】
create table staff_users(
id int(11) not null auto_increment,
name varchar(32) not null comment '姓名',
age tinyint(3) unsigned not null default '18' comment '年齡',
sex tinyint(1) not null comment '性別',
address varchar(32) comment '住址',
bank_card char(19) not null default '' comment '銀行卡',
bank_belongs varchar(64) comment '所屬銀行',
transfer varchar(30) comment '轉(zhuǎn)賬',
contact char(11) comment '電話',
can varchar(32) default '' comment '專長',
created_time varchar(11) default '' comment '入職日期',
end_time varchar(11) default '' comment '離職時(shí)間',
status tinyint(1) default '1' comment '員工是否在職',
primary key(id)
)engine=innodb default charset =utf8;
員工工資結(jié)算規(guī)則表【staff_salarys】
create table staff_salarys(
id int(11) not null auto_increment,
user_id int(11) not null comment '員工id',
salary_base varchar(10) not null default '' comment '基礎(chǔ)工資',
#counts_leave int(6) not null default 0 comment '請(qǐng)假次數(shù)',
money_leave double comment '每小時(shí)請(qǐng)假扣除錢',
#counts_overtime int(6) not null default 0 comment '加班次數(shù)',
money_overtime double comment '每小時(shí)加班錢',
created_time int(11) comment '添加時(shí)間',
primary key(id)
)engine=innodb default charset =utf8;
員工月工資統(tǒng)計(jì)表【staff_monthCount】
create table staff_monthCount(
id int(11) not null auto_increment,
user_id int(11) not null comment '員工id',
salary_base double not null default '0' comment '本月底薪',
times_leave double not null default '0' comment '月請(qǐng)假時(shí)間統(tǒng)計(jì)',
counts_leave int not null default '0' comment '月請(qǐng)假次數(shù)統(tǒng)計(jì)',
moneys_day int not null default '0' comment '請(qǐng)假一天扣錢多少',
salary_final double not null default '0' comment '本月最后工資',
counts_overtime double not null default '0' comment '加班時(shí)間統(tǒng)計(jì)',
money_hour double not null default '0' comment '加班一小時(shí)',
times_overtime double not null default '0' comment '月加班時(shí)間統(tǒng)計(jì)',
status tinyint(1) default '0' comment '未結(jié)算',
month int(4) comment '月份',
create_time int(11) comment '更新時(shí)間',
primary key(id)
)engine=innodb default charset =utf8;
加班表【overtime】
create table overtime(
id int(11) not null auto_increment,
user_id int(11) not null comment '員工id',
create_time int(11) comment '加班開始時(shí)間',
end_time int(11) comment '加班結(jié)束時(shí)間',
primary key(id)
)engine=innodb default charset =utf8;
請(qǐng)假表【uleave】
create table leavecounts(
id int(11) not null auto_increment,
user_id int(11) not null,
create_time int(11) comment '請(qǐng)假開始時(shí)間',
end_time int(11) comment '請(qǐng)假結(jié)束時(shí)間',
leave_days int(11) comment '請(qǐng)假天數(shù)',
cause varchar(200) comment '請(qǐng)假原因',
primary key(id)
)engine=innodb default charset =utf8;
//支付接口表
create table notes(
id int not null auto_increment,
partner char(6) not null comment '商戶id',
ordernumber varchar(32) not null comment '商戶訂單號(hào)',
orderstatus char(1) not null default 0 comment '狀態(tài)(1表示支付好港,0表示未支付)',
paymoney int unsigned not null comment '支付金額',
sysnumber varchar(32) not null comment '銀寶商務(wù)訂單號(hào)',
sign char(32) not null comment '簽名',
attach text comment '備注信息',
time int(11) not null comment '添加時(shí)間',
primary key(id)
)engine=innodb default charset =utf8;