序号 | 列名 | 数据类型 | 长度 | 小数位 | 标识 | 主键 | 外键 | 允许空 | 默认值 | 说明 |
1 | ID | int | 4 | 0 | 是 | 是 | 否 | |||
2 | Content | nvarchar | 1000 | 0 | 是 | 内容 | ||||
3 | SendDatetime | datetime | 8 | 3 | 是 | 发送时间 | ||||
4 | SendUserID | int | 4 | 0 | 是 | 发送者 | ||||
5 | AdmitUserId | int | 4 | 0 | 是 | 接收者 | ||||
6 | type | int | 4 | 0 | 是 | 消息类型 | ||||
7 | All_People | varchar | 5000 | 0 | 是 | 接收人ids | ||||
8 | ImgUrl | nvarchar | 500 | 0 | 是 | 上传图片 | ||||
9 | Roomid | int | 4 | 0 | 是 | 房间号 | ||||
10 | state | int | 4 | 0 | 是 | 0 | 状态 |
聊天记录表
GO
CREATE TABLE [dbo].[ZL_Chat](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Content] [nvarchar](1000) NULL,
[SendDatetime] [datetime] NULL,
[SendUserID] [int] NULL,
[AdmitUserId] [int] NULL,
[type] [int] NULL,
[All_People] [varchar](5000) NULL,
[ImgUrl] [nvarchar](500) NULL,
[Roomid] [int] NULL,
[state] [int] DEFAULT (0)
CONSTRAINT [PK_ZL_Chat] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Chat', @level2type=N'COLUMN',@level2name=N'Content'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Chat', @level2type=N'COLUMN',@level2name=N'SendDatetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Chat', @level2type=N'COLUMN',@level2name=N'SendUserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接收者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Chat', @level2type=N'COLUMN',@level2name=N'AdmitUserId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上传图片' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Chat', @level2type=N'COLUMN',@level2name=N'ImgUrl'
detele from ZL_Chat
drop table ZL_Chat
TRUNCATE table ZL_Chat