/****** Object: Table [dbo].[Pub_WebCast] Script Date: 04/25/2016 10:05:25 ******/ SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON IF not EXISTS (SELECT * FROM sysobjects WHERE name = 'Pub_WebCast') Begin CREATE TABLE [dbo].[Pub_WebCast]( [Guid] [nvarchar](32) NOT NULL, [Version] [int] NOT NULL, [SortNumber] [int] NOT NULL, [Name] [nvarchar](256) NOT NULL, [Cover] [nvarchar](256) NULL, [Status] [int] NOT NULL, [LiveStatus] [int] NOT NULL, CONSTRAINT [PK_Pub_WebCast] PRIMARY KEY CLUSTERED ( [Guid] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Guid type:text primary:true tooltip:记录主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pub_WebCast', @level2type=N'COLUMN',@level2name=N'Guid' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'版本号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pub_WebCast', @level2type=N'COLUMN',@level2name=N'Version' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序号 type:text default:0 required:true required_msg:排序号不能为空 required_default:null regex:num1 regex_msg:排序号应为数字 tooltip:标示记录在相同类型的记录中的位置' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pub_WebCast', @level2type=N'COLUMN',@level2name=N'SortNumber' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'直播室名称 type:text required:true required_msg:请输入直播信号名称 required_default:null' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pub_WebCast', @level2type=N'COLUMN',@level2name=N'Name' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'直播封面 type:image width:400 height:260' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pub_WebCast', @level2type=N'COLUMN',@level2name=N'Cover' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态 type:checkbox enum:{作废=0,有效=1} default:0 tooltip:标示记录是否有效' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pub_WebCast', @level2type=N'COLUMN',@level2name=N'Status' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'直播状态 type:select enum:{未直播=0,直播中=1,直播结束=2} default:0 required:true required_msg:请选择直播状态 required_default:null' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pub_WebCast', @level2type=N'COLUMN',@level2name=N'LiveStatus' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网络直播 ref_table:Pub_WebCastUrl|Delete autosort:true fk_name:Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pub_WebCast' ALTER TABLE [dbo].[Pub_WebCast] ADD CONSTRAINT [DF_Pub_WebCast_Status] DEFAULT ((1)) FOR [Status] ALTER TABLE [dbo].[Pub_WebCast] ADD CONSTRAINT [DF_Pub_WebCast_LiveStatus] DEFAULT ((0)) FOR [LiveStatus] END