序号 | 列名 | 数据类型 | 长度 | 小数位 | 标识 | 主键 | 外键 | 允许空 | 默认值 | 说明 |
1 | FavoriteID | int | 4 | 0 | 是 | 否 | 收藏ID | |||
2 | Owner | int | 4 | 0 | 否 | 收藏人ID | ||||
3 | InfoID | int | 4 | 0 | 否 | 被收藏内容的ID | ||||
4 | FavoriteDate | datetime | 8 | 3 | 否 | getdate | 收藏时间 | |||
5 | FavoriType | int | 4 | 0 | 是 | 收藏类型:1为内容收藏,2为商品收藏,3为网店收藏 | ||||
6 | FavUrl | nvarchar | 500 | 0 | 是 | 收藏URl | ||||
7 | FavItemID | nvarchar | 50 | 0 | 是 | 收藏相关内容ID(多个ID以逗号隔开) | ||||
8 | Title | nvarchar | 500 | 0 | 是 | 标题 |
收藏表
GO
CREATE TABLE [dbo].[ZL_Favorite](
[FavoriteID] [int] IDENTITY(1,1) NOT NULL,
[Owner] [int] NOT NULL,
[InfoID] [int] NOT NULL,
[FavoriteDate] [datetime] NOT NULL,
[FavoriType] [int] NULL,
[FavUrl] [nvarchar](500) NULL,
[FavItemID] [nvarchar](50) NULL,
[Title] [nvarchar](500) NULL
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'FavoriteID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏人ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'Owner'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被收藏内容的ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'InfoID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'FavoriteDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏类型:1为内容收藏,2为商品收藏,3为网店收藏' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'FavoriType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏URl' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'FavUrl'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏相关内容ID(多个ID以逗号隔开)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Favorite', @level2type=N'COLUMN',@level2name=N'FavItemID'
GO
ALTER TABLE [dbo].[ZL_Favorite] ADD CONSTRAINT [DF_ZL_Favorite_FavoriteDate] DEFAULT (getdate()) FOR [FavoriteDate]
detele from ZL_Favorite
drop table ZL_Favorite
TRUNCATE table ZL_Favorite