/*
Navicat SQL Server Data Transfer

Source Server         : 9000
Source Server Version : 105000
Source Host           : .\sqlexpress:1433
Source Database       : LHBMS
Source Schema         : dbo

Target Server Type    : SQL Server
Target Server Version : 105000
File Encoding         : 65001

Date: 2021-05-11 15:33:13
*/


-- ----------------------------
-- Table structure for DeviceCategory
-- ----------------------------
DROP TABLE [dbo].[DeviceCategory]
GO
CREATE TABLE [dbo].[DeviceCategory] (
[ID] uniqueidentifier NOT NULL DEFAULT (newid()) ROWGUIDCOL ,
[Name] nvarchar(50) NOT NULL ,
[Code] nvarchar(50) NULL ,
[ConnectType] nvarchar(50) NULL ,
[PartitionNum] int NULL ,
[SZoneNum] int NULL ,
[Remark] nvarchar(50) NULL 
)


GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'DeviceCategory', 
'COLUMN', N'Code')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'编码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'DeviceCategory'
, @level2type = 'COLUMN', @level2name = N'Code'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'编码'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'DeviceCategory'
, @level2type = 'COLUMN', @level2name = N'Code'
GO

-- ----------------------------
-- Records of DeviceCategory
-- ----------------------------
INSERT INTO [dbo].[DeviceCategory] ([ID], [Name], [Code], [ConnectType], [PartitionNum], [SZoneNum], [Remark]) VALUES (N'78BCE30E-BB67-45B6-90DC-14E1C1591489', N'LHB9000V2', N'10002', N'0', N'16', N'248', N'V2')
GO
GO
INSERT INTO [dbo].[DeviceCategory] ([ID], [Name], [Code], [ConnectType], [PartitionNum], [SZoneNum], [Remark]) VALUES (N'60A90014-A921-49A8-85FF-684E0AE956BE', N'LHB9000V3', N'10003', N'0', N'16', N'248', N'V3')
GO
GO
INSERT INTO [dbo].[DeviceCategory] ([ID], [Name], [Code], [ConnectType], [PartitionNum], [SZoneNum], [Remark]) VALUES (N'344C1EEE-30B3-4D57-B280-861DB5D3B061', N'LHB9000V1', N'10001', N'0', N'16', N'248', N'V1')
GO
GO

-- ----------------------------
-- Indexes structure for table DeviceCategory
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table DeviceCategory
-- ----------------------------
ALTER TABLE [dbo].[DeviceCategory] ADD PRIMARY KEY ([ID])
GO
