USE [zhengcaioa]
GO

/****** Object:  Table [dbo].[ADM_Attendance_dtl]    Script Date: 2021/6/10 13:04:31 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO
IF EXISTS(Select 1 From Sysobjects Where Name='ADM_Attendance_dtl')  --²éÑ¯±íÃûcostSeparateConfigÊÇ·ñ´æÔÚ  
drop  TABLE [dbo].[ADM_Attendance_dtl]
GO
CREATE TABLE [dbo].[ADM_Attendance_dtl](
	[Id] [nvarchar](50) NOT NULL,
	[attendance_id] [nvarchar](50) NOT NULL,
	[SgninDate] [datetime] NULL,
	[MorningIn] [datetime] NULL,
	[MorningOut] [datetime] NULL,
	[AfternoonIn] [datetime] NULL,
	[AfternoonOut] [datetime] NULL,
	[OvertimeIn] [datetime] NULL,
	[OvertimeOut] [datetime] NULL,
	[qingjia]   [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[xiaojia] [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[rec_status] [nvarchar](1) NOT NULL,
	[creater] [nvarchar](50) NOT NULL,
	[createtime] [datetime] NOT NULL,
	[modifier] [nvarchar](50) NOT NULL,
	[modifytime] [datetime] NOT NULL,
	[shangwuchidaofenzhong] [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[xiawuchidaofenzhong] [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[shangwuzaotuifenzhong] [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[xiawuzaotuifenzhong] [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[kuanggongtianshu] [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[iswork] [nvarchar](1)   NULL,
 CONSTRAINT [PK__ADM_Attendance_dtl] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 100) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[ADM_Attendance_dtl] ADD  DEFAULT (getdate()) FOR [SgninDate]
GO

ALTER TABLE [dbo].[ADM_Attendance_dtl] ADD  DEFAULT ('A') FOR [rec_status]
GO

ALTER TABLE [dbo].[ADM_Attendance_dtl] ADD  DEFAULT ('1') FOR [creater]
GO

ALTER TABLE [dbo].[ADM_Attendance_dtl] ADD  DEFAULT (getdate()) FOR [createtime]
GO

ALTER TABLE [dbo].[ADM_Attendance_dtl] ADD  DEFAULT ('1') FOR [modifier]
GO

ALTER TABLE [dbo].[ADM_Attendance_dtl] ADD  DEFAULT (getdate()) FOR [modifytime]
GO





















USE [zhengcaioa]
GO

/****** Object:  Table [dbo].[hr_salary]    Script Date: 2021/6/10 12:54:34 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO
IF EXISTS(Select 1 From Sysobjects Where Name='hr_salary')  --²éÑ¯±íÃûcostSeparateConfigÊÇ·ñ´æÔÚ  

 
drop  TABLE [dbo].[hr_salary]
GO

CREATE TABLE [dbo].[hr_salary](
	[Id] [nvarchar](50) NOT NULL,
	[Userid] [nvarchar](50) NOT NULL,
	[year] [int] NOT NULL DEFAULT ((0)),
	[month] [int] NOT NULL DEFAULT ((0)),





	[jibengongzi]   [decimal](18, 4)  NULL ,
	[baomifei] [decimal](18, 4)  NULL  ,
	[gongzuobutie]   [decimal](18, 4)  NULL ,
	[jiabangongzi]   [decimal](18, 4)  NULL ,
	[shebao]   [decimal](18, 4)  NULL  ,
	[dianhuabutie]   [decimal](18, 4)  NULL  ,
	[quanqinjiang] [decimal](18, 4)  NULL  ,
	[jiaotngbutie] [decimal](18, 4)  NULL  ,
	[jixiaoticheng] [decimal](18, 4)  NULL  ,
	[jiangjin] [decimal](18, 4)  NULL  ,
	[bufagongzi] [decimal](18, 4)  NULL  ,

	[shebaokou] [decimal](18, 4)  NULL  ,
	[geshui] [decimal](18, 4)  NULL  ,
	[dianhuafei] [decimal](18, 4)  NULL  ,
	[queqin] [decimal](18, 4)  NULL  ,
	[fakuan] [decimal](18, 4)  NULL  ,
	[peichang] [decimal](18, 4)  NULL  ,
	[jiucuo] [decimal](18, 4)  NULL  ,
	[daozhanggongzi] [decimal](18, 4)  NULL  ,
	[yufagongzi] [decimal](18, 4)  NULL  ,
	[yufagongziheji] [decimal](18, 4)  NULL  ,
	
	[islock] [nvarchar](1) NOT NULL,
	[rec_status] [nvarchar](1) NOT NULL,
	[creater] [nvarchar](50) NOT NULL,
	[createtime] [datetime] NOT NULL,
	[modifier] [nvarchar](50) NOT NULL,
	[modifytime] [datetime] NOT NULL,
 CONSTRAINT [PK__hr_salary] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[hr_salary] ADD  DEFAULT ('D') FOR [islock]
GO
ALTER TABLE [dbo].[hr_salary] ADD  DEFAULT ('A') FOR [rec_status]
GO

ALTER TABLE [dbo].[hr_salary] ADD  DEFAULT ('1') FOR [creater]
GO

ALTER TABLE [dbo].[hr_salary] ADD  DEFAULT (getdate()) FOR [createtime]
GO

ALTER TABLE [dbo].[hr_salary] ADD  DEFAULT ('1') FOR [modifier]
GO

ALTER TABLE [dbo].[hr_salary] ADD  DEFAULT (getdate()) FOR [modifytime]
GO







USE [zhengcaioa]
GO

/****** Object:  Table [dbo].[ADM_Attendance]    Script Date: 2021/6/10 12:54:34 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO
IF EXISTS(Select 1 From Sysobjects Where Name='ADM_Attendance')  --²éÑ¯±íÃûcostSeparateConfigÊÇ·ñ´æÔÚ  
drop  TABLE [dbo].[ADM_Attendance]
GO
CREATE TABLE [dbo].[ADM_Attendance](
	[Id] [nvarchar](50) NOT NULL,
	[Userid] [nvarchar](50) NOT NULL,
	[year] [int] NOT NULL DEFAULT ((0)),
	[month] [int] NOT NULL DEFAULT ((0)),
	[yingchuqin]   [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[offdays] [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[shijichuqin]   [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[qingjia]   [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[jiaban]   [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[xiaojia] [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[chidao] [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[zaotui] [decimal](18, 4) NOT NULL DEFAULT ((0)),
	[kuanggong] [decimal](18, 4) NOT NULL DEFAULT ((0)),
	
	[islock] [nvarchar](1) NOT NULL,
	[rec_status] [nvarchar](1) NOT NULL,
	[creater] [nvarchar](50) NOT NULL,
	[createtime] [datetime] NOT NULL,
	[modifier] [nvarchar](50) NOT NULL,
	[modifytime] [datetime] NOT NULL,
 CONSTRAINT [PK__ADM_Attendance] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[ADM_Attendance] ADD  DEFAULT ('D') FOR [islock]
GO
ALTER TABLE [dbo].[ADM_Attendance] ADD  DEFAULT ('A') FOR [rec_status]
GO

ALTER TABLE [dbo].[ADM_Attendance] ADD  DEFAULT ('1') FOR [creater]
GO

ALTER TABLE [dbo].[ADM_Attendance] ADD  DEFAULT (getdate()) FOR [createtime]
GO

ALTER TABLE [dbo].[ADM_Attendance] ADD  DEFAULT ('1') FOR [modifier]
GO

ALTER TABLE [dbo].[ADM_Attendance] ADD  DEFAULT (getdate()) FOR [modifytime]
GO










