--登录日志
|
|
create table tb_manager_log (
|
|
id int identity, --自增ID
|
|
user_id int null, --用户ID
|
|
user_name nvarchar(100) null, --用户名
|
|
action_type nvarchar(100) null, --类型
|
|
note nvarchar(255) null, --日志
|
|
login_ip nvarchar(30) null, --登录IP
|
|
login_time datetime null default getdate(), --登录时间
|
|
constraint PK_TB_MANAGER_LOG primary key (id)
|
|
)
|
|
go
|
|
|
|
declare @CurrentUser sysname
|
|
select @CurrentUser = user_name()
|
|
execute sp_addextendedproperty 'MS_Description',
|
|
'自增ID',
|
|
'user', @CurrentUser, 'table', 'tb_manager_log', 'column', 'id'
|
|
go
|
|
declare @CurrentUser sysname
|
|
select @CurrentUser = user_name()
|
|
execute sp_addextendedproperty 'MS_Description',
|
|
'用户ID',
|
|
'user', @CurrentUser, 'table', 'tb_manager_log', 'column', 'user_id'
|
|
go
|
|
declare @CurrentUser sysname
|
|
select @CurrentUser = user_name()
|
|
execute sp_addextendedproperty 'MS_Description',
|
|
'用户名',
|
|
'user', @CurrentUser, 'table', 'tb_manager_log', 'column', 'user_name'
|
|
go
|
|
declare @CurrentUser sysname
|
|
select @CurrentUser = user_name()
|
|
execute sp_addextendedproperty 'MS_Description',
|
|
'类型',
|
|
'user', @CurrentUser, 'table', 'tb_manager_log', 'column', 'action_type'
|
|
go
|
|
declare @CurrentUser sysname
|
|
select @CurrentUser = user_name()
|
|
execute sp_addextendedproperty 'MS_Description',
|
|
'日志',
|
|
'user', @CurrentUser, 'table', 'tb_manager_log', 'column', 'note'
|
|
go
|
|
declare @CurrentUser sysname
|
|
select @CurrentUser = user_name()
|
|
execute sp_addextendedproperty 'MS_Description',
|
|
'登录IP',
|
|
'user', @CurrentUser, 'table', 'tb_manager_log', 'column', 'login_ip'
|
|
go
|
|
declare @CurrentUser sysname
|
|
select @CurrentUser = user_name()
|
|
execute sp_addextendedproperty 'MS_Description',
|
|
'登录时间',
|
|
'user', @CurrentUser, 'table', 'tb_manager_log', 'column', 'login_time'
|
|
go
|