基于.Net Core3.1 与signalR实现一个即时通讯工具(二)——数据库设计
- 本次一共用到三张表
Base_HistoryMeeting 会话表
USE [SRFIM20200806]
GO
/****** Object: Table [dbo].[Base_HistoryMeeting] Script Date: 2021/5/21 14:40:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Base_HistoryMeeting](
[HistoryId] [VARCHAR](50) NOT NULL,
[UserId] [VARCHAR](50) NULL,
[HistoryDate] [DATETIME] NULL,
[MeetingOwn] [VARCHAR](50) NULL,
[UserCID] [VARCHAR](50) NULL,
[OwnCID] [VARCHAR](50) NULL,
CONSTRAINT [PK_Base_HistoryMeeting] PRIMARY KEY CLUSTERED
(
[HistoryId] 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
SET ANSI_PADDING OFF
GO
Base_Msg 历史消息
USE [SRFIM20200806]
GO
/****** Object: Table [dbo].[Base_Msg] Script Date: 2021/5/21 14:40:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Base_Msg](
[MsgId] [VARCHAR](50) NOT NULL,
[MsgContent] [VARCHAR](500) NULL,
[MsgSendDate] [DATETIME] NULL,
[MsgStatus] [INT] NULL,
[FromUser] [VARCHAR](50) NULL,
[ToUser] [VARCHAR](50) NULL,
[UserCID] [VARCHAR](50) NULL,
[OwnCID] [VARCHAR](50) NULL,
CONSTRAINT [PK_Base_Msg] PRIMARY KEY CLUSTERED
(
[MsgId] 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
SET ANSI_PADDING OFF
GO
Base_User 用户表
USE [SRFIM20200806]
GO
/****** Object: Table [dbo].[Base_User] Script Date: 2021/5/21 14:40:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Base_User](
[UserId] [VARCHAR](50) NOT NULL,
[LoginName] [VARCHAR](50) NULL,
[Password] [VARCHAR](50) NULL,
[Enable] [INT] NULL,
[UserName] [VARCHAR](50) NULL,
[ConnectId] [VARCHAR](50) NULL,
[LoginDate] [VARCHAR](50) NULL,
[IsOnline] [INT] NULL,
[LoginStatus] [INT] NULL,
[UserHeadpic] [VARCHAR](500) NULL,
CONSTRAINT [PK_Base_User] PRIMARY KEY CLUSTERED
(
[UserId] 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
SET ANSI_PADDING OFF
GO