You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
2.0 KiB

--
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