USE [simplify] GO /****** Object: Table [dbo].[staff] Script Date: 2017-08-29 16:26:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[staff]( [staff_id] [uniqueidentifier] NOT NULL, [staff_name] [nvarchar](12) NOT NULL, [staff_gender] [bit] NOT NULL, [staff_self_phone] [varchar](11) NOT NULL, [staff_phone] [varchar](11) NOT NULL, [staff_father] [nvarchar](12) NULL, [staff_mother] [nvarchar](12) NULL, [staff_father_phone] [varchar](11) NULL, [staff_mother_phone] [varchar](11) NULL, [staff_emergency_name] [nvarchar](12) NOT NULL, [staff_emergency_phone] [varchar](11) NOT NULL, [staff_emergency_relationship] [nvarchar](8) NOT NULL, [staff_family_address] [nvarchar](255) NOT NULL, [staff_hire_date] [datetime] NOT NULL, [staff_leave_date] [datetime] NULL, [staff_self_qq] [varchar](16) NOT NULL, [staff_self_weixin] [varchar](36) NULL, [staff_self_email] [varchar](255) NULL, [staff_educational] [nvarchar](255) NOT NULL, [staff_department] [nvarchar](16) NULL, [staff_citizen_id_number] [varbinary](64) NOT NULL, [staff_married] [bit] NULL, [staff_dimission] [bit] NULL, [staff_fingerprinted1] [int] NOT NULL, [staff_fingerprinted2] [int] NULL, [staff_native_place] [nvarchar](64) NOT NULL, [staff_birthday] [datetime] NOT NULL, [staff_identity_card_image1] [image] NULL, [staff_identity_card_image2] [image] NULL, [staff_diploma_image] [image] NULL, [staff_labor_contract_image] [image] NULL, [staff_other_images] [image] NULL, [staff_graduate_institutions] [nvarchar](255) NULL, [staff_note] [nvarchar](255) NULL, [staff_base_pay] [money] NULL, CONSTRAINT [PK__staff__1963DD9C15C920AB] PRIMARY KEY CLUSTERED ( [staff_id] ASC, [staff_citizen_id_number] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [dbo].[staff] ADD DEFAULT ((0)) FOR [staff_gender] GO ALTER TABLE [dbo].[staff] ADD DEFAULT ((0)) FOR [staff_married] GO ALTER TABLE [dbo].[staff] ADD DEFAULT ((0)) FOR [staff_dimission] GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_id' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_name' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'性别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_gender' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'个人电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_self_phone' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工电话,一般指公司分配的业务电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_phone' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工父亲姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_father' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工母亲姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_mother' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工父亲电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_father_phone' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工母亲电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_mother_phone' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'紧急联系人姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_emergency_name' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'紧急联系人电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_emergency_phone' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工与紧急联系人的关系' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_emergency_relationship' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'家庭住址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_family_address' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工入职时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_hire_date' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'离职时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_leave_date' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工个人QQ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_self_qq' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工个人微信' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_self_weixin' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工个人邮箱地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_self_email' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工学历' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_educational' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工部门' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_department' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工的公民身份证号码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_citizen_id_number' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工婚否' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_married' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否离职' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_dimission' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'指纹1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_fingerprinted1' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'指纹2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_fingerprinted2' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工籍贯' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_native_place' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工生日' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_birthday' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'身份证正面' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_identity_card_image1' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'身份证反面' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_identity_card_image2' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'毕业证书相片' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_diploma_image' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工用工合同相片' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_labor_contract_image' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工其他资料照' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_other_images' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工毕业院校' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_graduate_institutions' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_note' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'员工基本工资' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'staff', @level2type=N'COLUMN',@level2name=N'staff_base_pay' GO