预约系统(一) 数据库设计
时间:2021-07-01 10:21:17
帮助过:8人阅读
USE [DB_Date_Plan]
2 GO
3 /****** Object: Table [dbo].[T_userInfo] Script Date: 07/13/2017 08:38:16 ******/
4 SET ANSI_NULLS ON
5 GO
6 SET QUOTED_IDENTIFIER ON
7 GO
8 CREATE TABLE [dbo].[T_userInfo](
9 [id] [int] IDENTITY(1,1) NOT NULL,
10 [userName] [nvarchar](50) NULL,
11 [userPassword] [nvarchar](50) NULL,
12 [userEmail] [nvarchar](50) NULL,
13 [user_BM] [nvarchar](50) NULL,
14 [add_time] [datetime] NULL,
15 [user_FullName] [nvarchar](50) NULL,
16 [user_Power] [nvarchar](50) NULL,
17 CONSTRAINT [PK_T_userInfo] PRIMARY KEY CLUSTERED
18 (
19 [id] ASC
20 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
21 ) ON [PRIMARY]
22 GO
23 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘用户权限,1-用户权限,2-管理员权限,3-超级权限‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_userInfo‘, @level2type=N‘COLUMN‘,@level2name=N‘user_Power‘
24 GO
25 /****** Object: Table [dbo].[T_room] Script Date: 07/13/2017 08:38:16 ******/
26 SET ANSI_NULLS ON
27 GO
28 SET QUOTED_IDENTIFIER ON
29 GO
30 CREATE TABLE [dbo].[T_room](
31 [id] [bigint] IDENTITY(1,1) NOT NULL,
32 [room_id] [nvarchar](50) NULL,
33 [room_mc] [nvarchar](50) NULL,
34 [adder] [nvarchar](50) NULL,
35 [add_time] [datetime] NULL,
36 CONSTRAINT [PK_T_room] PRIMARY KEY CLUSTERED
37 (
38 [id] ASC
39 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
40 ) ON [PRIMARY]
41 GO
42 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘会议室编号‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_room‘, @level2type=N‘COLUMN‘,@level2name=N‘room_id‘
43 GO
44 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘会议室名称‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_room‘, @level2type=N‘COLUMN‘,@level2name=N‘room_mc‘
45 GO
46 /****** Object: Table [dbo].[T_kryy_plan] Script Date: 07/13/2017 08:38:16 ******/
47 SET ANSI_NULLS ON
48 GO
49 SET QUOTED_IDENTIFIER ON
50 GO
51 CREATE TABLE [dbo].[T_kryy_plan](
52 [id] [bigint] IDENTITY(1,1) NOT NULL,
53 [adder] [nvarchar](50) NULL,
54 [add_time] [datetime] NULL,
55 [rq] [nvarchar](50) NULL,
56 [sjd] [nvarchar](50) NULL,
57 [yyr] [nvarchar](50) NULL,
58 [yybm] [nvarchar](50) NULL,
59 [in_time] [datetime] NULL,
60 [out_time] [datetime] NULL,
61 [krxm] [nvarchar](50) NULL,
62 [krgs] [nvarchar](50) NULL,
63 [mqzt] [nvarchar](50) NULL,
64 [ztsj] [nvarchar](50) NULL,
65 [bz] [nvarchar](50) NULL,
66 [flax] [nvarchar](50) NULL,
67 [time_begin] [nvarchar](50) NULL,
68 [time_end] [nvarchar](50) NULL,
69 CONSTRAINT [PK_T_kryy_plan] PRIMARY KEY CLUSTERED
70 (
71 [id] ASC
72 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
73 ) ON [PRIMARY]
74 GO
75 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘预约日期‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘rq‘
76 GO
77 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘时间段‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘sjd‘
78 GO
79 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘预约人‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘yyr‘
80 GO
81 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘预约人部门‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘yybm‘
82 GO
83 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘入厂时间‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘in_time‘
84 GO
85 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘离厂时间‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘out_time‘
86 GO
87 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘客人姓名‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘krxm‘
88 GO
89 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘客人单位‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘krgs‘
90 GO
91 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘目前状态‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘mqzt‘
92 GO
93 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘状态更新时间‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘ztsj‘
94 GO
95 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘备注‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘bz‘
96 GO
97 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘标记‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_kryy_plan‘, @level2type=N‘COLUMN‘,@level2name=N‘flax‘
98 GO
99 /****** Object: Table [dbo].[T_bm] Script Date: 07/13/2017 08:38:16 ******/
100 SET ANSI_NULLS ON
101 GO
102 SET QUOTED_IDENTIFIER ON
103 GO
104 CREATE TABLE [dbo].[T_bm](
105 [id] [bigint] IDENTITY(1,1) NOT NULL,
106 [bm_no] [nvarchar](50) NULL,
107 [bm_mc] [nvarchar](50) NULL,
108 [adder] [nvarchar](50) NULL,
109 [add_time] [datetime] NULL,
110 CONSTRAINT [PK_T_bm] PRIMARY KEY CLUSTERED
111 (
112 [id] ASC
113 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
114 ) ON [PRIMARY]
115 GO
116 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘部门代号‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_bm‘, @level2type=N‘COLUMN‘,@level2name=N‘bm_no‘
117 GO
118 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘部门名称‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_bm‘, @level2type=N‘COLUMN‘,@level2name=N‘bm_mc‘
119 GO
120 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘创建人‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_bm‘, @level2type=N‘COLUMN‘,@level2name=N‘adder‘
121 GO
122 EXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=N‘创建时间‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘T_bm‘, @level2type=N‘COLUMN‘,@level2name=N‘add_time‘
123 GO
124 /****** Object: Table [dbo].[T_hys_plan] Script Date: 07/13/2017 08:38:16 ******/
125 SET ANSI_NULLS ON
126 GO
127 SET QUOTED_IDENTIFIER ON
128 GO
129 CREATE TABLE [dbo].[T_hys_plan](
130 [id] [bigint] IDENTITY(1,1) NOT NULL,
131 [add_time] [datetime] NULL,
132 [adder] [nvarchar](50) NULL,
133 [rq] [nvarchar](50) NULL,
134 [time_begin] [nvarchar](50) NULL,
135 [time_end] [nvarchar](50) NULL,
136 [hys] [nvarchar](50) NULL,
137 [yyr] [nvarchar](50) NULL,
138 [yybm] [nvarchar](50)