新员工表.sql 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. USE [simplify]
  2. GO
  3. /****** Object: Table [dbo].[staff] Script Date: 2017-08-29 16:26:51 ******/
  4. SET ANSI_NULLS ON
  5. GO
  6. SET QUOTED_IDENTIFIER ON
  7. GO
  8. CREATE TABLE [dbo].[staff](
  9. [staff_id] [uniqueidentifier] NOT NULL,
  10. [staff_name] [nvarchar](12) NOT NULL,
  11. [staff_gender] [bit] NOT NULL,
  12. [staff_self_phone] [varchar](11) NOT NULL,
  13. [staff_phone] [varchar](11) NOT NULL,
  14. [staff_father] [nvarchar](12) NULL,
  15. [staff_mother] [nvarchar](12) NULL,
  16. [staff_father_phone] [varchar](11) NULL,
  17. [staff_mother_phone] [varchar](11) NULL,
  18. [staff_emergency_name] [nvarchar](12) NOT NULL,
  19. [staff_emergency_phone] [varchar](11) NOT NULL,
  20. [staff_emergency_relationship] [nvarchar](8) NOT NULL,
  21. [staff_family_address] [nvarchar](255) NOT NULL,
  22. [staff_hire_date] [datetime] NOT NULL,
  23. [staff_leave_date] [datetime] NULL,
  24. [staff_self_qq] [varchar](16) NOT NULL,
  25. [staff_self_weixin] [varchar](36) NULL,
  26. [staff_self_email] [varchar](255) NULL,
  27. [staff_educational] [nvarchar](255) NOT NULL,
  28. [staff_department] [nvarchar](16) NULL,
  29. [staff_citizen_id_number] [varbinary](64) NOT NULL,
  30. [staff_married] [bit] NULL,
  31. [staff_dimission] [bit] NULL,
  32. [staff_fingerprinted1] [int] NOT NULL,
  33. [staff_fingerprinted2] [int] NULL,
  34. [staff_native_place] [nvarchar](64) NOT NULL,
  35. [staff_birthday] [datetime] NOT NULL,
  36. [staff_identity_card_image1] [image] NULL,
  37. [staff_identity_card_image2] [image] NULL,
  38. [staff_diploma_image] [image] NULL,
  39. [staff_labor_contract_image] [image] NULL,
  40. [staff_other_images] [image] NULL,
  41. [staff_graduate_institutions] [nvarchar](255) NULL,
  42. [staff_note] [nvarchar](255) NULL,
  43. [staff_base_pay] [money] NULL,
  44. CONSTRAINT [PK__staff__1963DD9C15C920AB] PRIMARY KEY CLUSTERED
  45. (
  46. [staff_id] ASC,
  47. [staff_citizen_id_number] ASC
  48. )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
  49. ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  50. GO
  51. ALTER TABLE [dbo].[staff] ADD DEFAULT ((0)) FOR [staff_gender]
  52. GO
  53. ALTER TABLE [dbo].[staff] ADD DEFAULT ((0)) FOR [staff_married]
  54. GO
  55. ALTER TABLE [dbo].[staff] ADD DEFAULT ((0)) FOR [staff_dimission]
  56. GO
  57. 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'
  58. GO
  59. 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'
  60. GO
  61. 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'
  62. GO
  63. 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'
  64. GO
  65. 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'
  66. GO
  67. 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'
  68. GO
  69. 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'
  70. GO
  71. 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'
  72. GO
  73. 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'
  74. GO
  75. 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'
  76. GO
  77. 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'
  78. GO
  79. 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'
  80. GO
  81. 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'
  82. GO
  83. 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'
  84. GO
  85. 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'
  86. GO
  87. 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'
  88. GO
  89. 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'
  90. GO
  91. 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'
  92. GO
  93. 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'
  94. GO
  95. 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'
  96. GO
  97. 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'
  98. GO
  99. 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'
  100. GO
  101. 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'
  102. GO
  103. 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'
  104. GO
  105. 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'
  106. GO
  107. 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'
  108. GO
  109. 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'
  110. GO
  111. 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'
  112. GO
  113. 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'
  114. GO
  115. 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'
  116. GO
  117. 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'
  118. GO
  119. 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'
  120. GO
  121. 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'
  122. GO
  123. 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'
  124. GO
  125. 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'
  126. GO