if
exists
(
select
*
from
dbo.sysobjects
where
id
=
object_id
(N
'
[dbo].[FK_Sys_Member_Data_Base_Sys_Member_Group]
'
)
and
OBJECTPROPERTY
(id, N
'
IsForeignKey
'
)
=
1
)
Alter
TABLE
[
dbo
]
.
[
Member_Data_Base
]
Drop
CONSTRAINT
FK_Sys_Member_Data_Base_Sys_Member_Group
GO
if
exists
(
select
*
from
dbo.sysobjects
where
id
=
object_id
(N
'
[dbo].[Member_Popedom_List]
'
)
and
OBJECTPROPERTY
(id, N
'
IsUserTable
'
)
=
1
)
drop
table
[
dbo
]
.
[
Member_Popedom_List
]
GO
if
exists
(
select
*
from
dbo.sysobjects
where
id
=
object_id
(N
'
[dbo].[Sys_Member_Popedom_Group]
'
)
and
OBJECTPROPERTY
(id, N
'
IsUserTable
'
)
=
1
)
drop
table
[
dbo
]
.
[
Sys_Member_Popedom_Group
]
GO
if
exists
(
select
*
from
dbo.sysobjects
where
id
=
object_id
(N
'
[dbo].[Sys_Member_Popedom_List]
'
)
and
OBJECTPROPERTY
(id, N
'
IsUserTable
'
)
=
1
)
drop
table
[
dbo
]
.
[
Sys_Member_Popedom_List
]
GO
if
exists
(
select
*
from
dbo.sysobjects
where
id
=
object_id
(N
'
[dbo].[Member_Popedom_Group]
'
)
and
OBJECTPROPERTY
(id, N
'
IsUserTable
'
)
=
1
)
drop
table
[
dbo
]
.
[
Member_Popedom_Group
]
GO
Create
TABLE
[
dbo
]
.
[
Member_Popedom_List
]
(
[
Member_Id
]
[
int
]
NOT
NULL
,
[
Group_Id
]
[
int
]
NOT
NULL
,
[
Time_Start
]
[
int
]
NOT
NULL
,
[
Time_End
]
[
int
]
NOT
NULL
)
ON
[
PRIMARY
]
GO
Create
TABLE
[
dbo
]
.
[
Sys_Member_Popedom_Group
]
(
[
Group_Id
]
[
int
]
IDENTITY
(
1
,
1
)
NOT
NULL
,
[
Group_Name
]
[
varchar
]
(
200
) COLLATE Chinese_PRC_CI_AS
NOT
NULL
)
ON
[
PRIMARY
]
GO
Create
TABLE
[
dbo
]
.
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
[
varchar
]
(
50
) COLLATE Chinese_PRC_CI_AS
NOT
NULL
,
[
Popedom_Class
]
[
varchar
]
(
50
) COLLATE Chinese_PRC_CI_AS
NOT
NULL
,
[
Popedom_Description
]
[
varchar
]
(
200
) COLLATE Chinese_PRC_CI_AS
NOT
NULL
)
ON
[
PRIMARY
]
GO
Create
TABLE
[
dbo
]
.
[
Member_Popedom_Group
]
(
[
Group_Id
]
[
int
]
NOT
NULL
,
[
Popedom_Flag
]
[
varchar
]
(
50
) COLLATE Chinese_PRC_CI_AS
NOT
NULL
,
[
Popedom_Value
]
[
int
]
NOT
NULL
)
ON
[
PRIMARY
]
GO
Alter
TABLE
[
dbo
]
.
[
Sys_Member_Popedom_Group
]
WITH
NOCHECK
ADD
CONSTRAINT
[
PK_Sys_Member_Role_Group
]
PRIMARY
KEY
CLUSTERED
(
[
Group_Id
]
)
WITH
FILLFACTOR
=
90
ON
[
PRIMARY
]
GO
Alter
TABLE
[
dbo
]
.
[
Sys_Member_Popedom_List
]
WITH
NOCHECK
ADD
CONSTRAINT
[
PK_Sys_Member_Popedom_List
]
PRIMARY
KEY
CLUSTERED
(
[
Popedom_Flag
]
)
WITH
FILLFACTOR
=
90
ON
[
PRIMARY
]
GO
Create
UNIQUE
CLUSTERED
INDEX
[
IX_Member_Group_List
]
ON
[
dbo
]
.
[
Member_Popedom_List
]
(
[
Member_Id
]
,
[
Group_Id
]
)
WITH
FILLFACTOR
=
90
ON
[
PRIMARY
]
GO
Create
UNIQUE
CLUSTERED
INDEX
[
IX_Member_Group_Popedom
]
ON
[
dbo
]
.
[
Member_Popedom_Group
]
(
[
Group_Id
]
,
[
Popedom_Flag
]
)
WITH
FILLFACTOR
=
90
ON
[
PRIMARY
]
GO
Alter
TABLE
[
dbo
]
.
[
Member_Popedom_List
]
ADD
CONSTRAINT
[
DF_Member_Group_List_Time_Start
]
DEFAULT
(
0
)
FOR
[
Time_Start
]
,
CONSTRAINT
[
DF_Member_Group_List_Time_End
]
DEFAULT
(
0
)
FOR
[
Time_End
]
GO
exec
sp_addextendedproperty N
'
MS_Description
'
, N
'
权限说明
'
, N
'
user
'
, N
'
dbo
'
, N
'
table
'
, N
'
Sys_Member_Popedom_List
'
, N
'
column
'
, N
'
Popedom_Description
'
GO
exec
sp_addextendedproperty N
'
MS_Description
'
, N
'
权限名
'
, N
'
user
'
, N
'
dbo
'
, N
'
table
'
, N
'
Sys_Member_Popedom_List
'
, N
'
column
'
, N
'
Popedom_Flag
'
GO
Insert
INTO
[
Member_Popedom_List
]
(
[
Member_Id
]
,
[
Group_Id
]
,
[
Time_Start
]
,
[
Time_End
]
)
values
(
61
,
100
,
20061202
,
99999999
)
Insert
INTO
[
Member_Popedom_List
]
(
[
Member_Id
]
,
[
Group_Id
]
,
[
Time_Start
]
,
[
Time_End
]
)
values
(
61
,
1000
,
20070101
,
20070302
)
Insert
INTO
[
Member_Popedom_Group
]
(
[
Group_Id
]
,
[
Popedom_Flag
]
,
[
Popedom_Value
]
)
values
(
100
,
'
Info_Add_Buy
'
,
1
)
Insert
INTO
[
Member_Popedom_Group
]
(
[
Group_Id
]
,
[
Popedom_Flag
]
,
[
Popedom_Value
]
)
values
(
100
,
'
Info_Add_DayCount
'
,
10
)
Insert
INTO
[
Member_Popedom_Group
]
(
[
Group_Id
]
,
[
Popedom_Flag
]
,
[
Popedom_Value
]
)
values
(
100
,
'
Info_Add_Sell
'
,
1
)
Insert
INTO
[
Member_Popedom_Group
]
(
[
Group_Id
]
,
[
Popedom_Flag
]
,
[
Popedom_Value
]
)
values
(
1000
,
'
Info_Add_DayCount
'
,
0
)
Insert
INTO
[
Sys_Member_Popedom_Group
]
(
[
Group_Name
]
)
values
(
'
普通用户
'
)
Insert
INTO
[
Sys_Member_Popedom_Group
]
(
[
Group_Name
]
)
values
(
'
VIP用户
'
)
Insert
INTO
[
Sys_Member_Popedom_Group
]
(
[
Group_Name
]
)
values
(
'
认证用户
'
)
Insert
INTO
[
Sys_Member_Popedom_Group
]
(
[
Group_Name
]
)
values
(
'
论坛管理员
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Company_Contact_Edit
'
,
'
[会员资料]
'
,
'
联系信息修改
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Company_Info_Edit
'
,
'
[会员资料]
'
,
'
公司信息修改
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Company_Name_Edit
'
,
'
[会员资料]
'
,
'
公司名称修改
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Company_Pic_Add
'
,
'
[会员资料]
'
,
'
企业图片上传
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Company_Pic_Add_Count
'
,
'
[会员资料]
'
,
'
企业图片上传数
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Favorite_Company
'
,
'
[收藏功能]
'
,
'
收藏公司信息
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Favorite_Company_Count
'
,
'
[收藏功能]
'
,
'
公司最大收藏数
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Favorite_Del
'
,
'
[收藏功能]
'
,
'
删除收藏信息
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Favorite_Info
'
,
'
[收藏功能]
'
,
'
收藏供求信息
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Favorite_Info_Count
'
,
'
[收藏功能]
'
,
'
供求最大收藏数
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Info_Add_Buy
'
,
'
[商业信息]
'
,
'
增加求购信息
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Info_Add_DayCount
'
,
'
[商业信息]
'
,
'
每天发布商业信息数
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Info_Add_Sell
'
,
'
[商业信息]
'
,
'
增加供应信息
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Info_Advance
'
,
'
[商业信息]
'
,
'
重发(提前)商业信息
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Info_Advance_DayCount
'
,
'
[商业信息]
'
,
'
每天重发商业信息数
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Info_Check
'
,
'
[商业信息]
'
,
'
商业信息是否需要审核
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Info_Edit
'
,
'
[商业信息]
'
,
'
修改商业信息
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Info_Hide
'
,
'
[商业信息]
'
,
'
隐藏商业信息
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Message_Add
'
,
'
[商业往来]
'
,
'
发送留言
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Message_Add_DayCount
'
,
'
[商业往来]
'
,
'
每天留言最大数
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Message_Del
'
,
'
[商业往来]
'
,
'
删除收到留言
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
News_Add
'
,
'
[企业新闻]
'
,
'
添加企业新闻
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
News_Check
'
,
'
[企业新闻]
'
,
'
企业新闻是否需要审核
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
News_Edit
'
,
'
[企业新闻]
'
,
'
修改企业新闻
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Product_Add
'
,
'
[产品信息]
'
,
'
发布产品信息
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Product_Del
'
,
'
[产品信息]
'
,
'
{删除产品信息}
'
)
Insert
INTO
[
Sys_Member_Popedom_List
]
(
[
Popedom_Flag
]
,
[
Popedom_Class
]
,
[
Popedom_Description
]
)
values
(
'
Product_Edit
'
,
'
[产品信息]
'
,
'
修改产品信息
'
)