/****** Object:  Table [dbo].[GroupFly_MMSMemberGroup]    Script Date: 09/23/2011 15:01:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MMSMemberGroup](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](500) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsDel__03FB8544]  DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_MMSMemberGroup] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_DispatchMode]    Script Date: 09/23/2011 14:58:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_DispatchMode](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Remark] [nvarchar](1000) NULL,
	[IsPayArrived] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsPay__0618D7E0]  DEFAULT ((0)),
	[SafeCost] [decimal](18, 2) NULL,
	[Formula] [nvarchar](100) NULL,
	[OrderID] [int] NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsDel__070CFC19]  DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_DispatchMode] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_OperateLog]    Script Date: 09/23/2011 15:01:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_OperateLog](
	[Guid] [uniqueidentifier] NOT NULL,
	[Record] [nvarchar](250) NULL,
	[OperatorID] [nvarchar](50) NULL,
	[IP] [nvarchar](50) NULL,
	[PageName] [nvarchar](150) NULL,
	[Date] [datetime] NULL,
 CONSTRAINT [PK_GroupFly_OperateLog] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_Recruitment]    Script Date: 09/23/2011 15:06:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_Recruitment](
	[Guid] [uniqueidentifier] NOT NULL,
	[PositionName] [nvarchar](50) NOT NULL,
	[WorkPlace] [nvarchar](50) NOT NULL,
	[RecruitingNumber] [int] NOT NULL,
	[Salary] [nvarchar](50) NOT NULL,
	[RecruitingTime] [datetime] NOT NULL,
	[JobDescribtion] [ntext] NULL,
	[JobRequirements] [ntext] NULL,
	[RecruitmentComplay] [nvarchar](50) NOT NULL,
	[Contact] [nvarchar](50) NOT NULL,
	[Phone] [nvarchar](50) NOT NULL,
	[Address] [nvarchar](50) NOT NULL,
	[Postcode] [nvarchar](50) NOT NULL,
	[Email] [nvarchar](50) NOT NULL,
	[IsShow] [int] NOT NULL CONSTRAINT [DF_GroupFlyProduce_Recruitment_IsShow]  DEFAULT ((0)),
	[RecruitingEndTime] [datetime] NOT NULL,
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFlyProduce_SupplyDemand]    Script Date: 09/23/2011 15:07:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_SupplyDemand](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Guid] [uniqueidentifier] NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[Content] [ntext] NOT NULL,
	[TradeType] [int] NOT NULL DEFAULT ((0)),
	[Description] [ntext] NULL,
	[Keywords] [nvarchar](200) NULL,
	[ReleaseTime] [datetime] NOT NULL DEFAULT (getdate()),
	[ValidTime] [nvarchar](30) NOT NULL,
	[OrderID] [int] NOT NULL,
	[IsAudit] [int] NOT NULL DEFAULT ((1)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_EmailBook]    Script Date: 09/23/2011 14:59:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_EmailBook](
	[Guid] [uniqueidentifier] NOT NULL,
	[BookTypeName] [nvarchar](50) NOT NULL,
	[EmailAddress] [nvarchar](50) NULL,
	[State] [int] NOT NULL DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_EmailBook] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetOnlineService]    Script Date: 09/23/2011 14:55:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/**在线客服**/
CREATE  proc [dbo].[Pro_GroupFlyProduce_GetOnlineService] 
 @showCountQQ int, @showCountMsn int, @supplierID nvarchar(50) 
AS
begin
  declare @sql1 nvarchar(500),@sql2 nvarchar(500) 
 if @showCountQQ <> 0   
    set @sql1='SELECT Top( '+ cast(@showCountQQ as nvarchar(5))+')'
 else
      set @sql1='SELECT'
	 set @sql1=@sql1+' 
	  [Guid]
      ,[Type]
      ,[Name]
      ,[ServiceAccount]
      ,[Location]
      ,[IsShow]
      ,[OrderID]
      ,[CreateUser]
      ,[CreateTime]
      ,[ModifyUser]
      ,[ModifyTime]
      ,[IsDeleted]
      ,[ProduceMemLoginID]
  FROM GroupFlyProduce_OnLineService
  where Type=''QQ'' 
and isShow=1 and produceMemLoginID='''+@supplierID+'''
order by orderID desc '

if @showCountMsn <> 0   
    set @sql2='SELECT Top('+cast(@showCountMsn as nvarchar(5))+')'
 else
      set @sql2='SELECT'
	 set @sql2=@sql2+' 
	  [Guid]
      ,[Type]
      ,[Name]
      ,[ServiceAccount]
      ,[Location]
      ,[IsShow]
      ,[OrderID]
      ,[CreateUser]
      ,[CreateTime]
      ,[ModifyUser]
      ,[ModifyTime]
      ,[IsDeleted]
      ,[ProduceMemLoginID]
  FROM GroupFlyProduce_OnLineService 
  where  type=''Msn'' 
and  isShow=1 
and  ProduceMemLoginID='''+@supplierID+'''
order by orderID desc'

 exec (@sql1)
exec (@sql2)

end
GO
/****** Object:  Table [dbo].[GroupFlyProduce_MessageBoard]    Script Date: 09/23/2011 15:05:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_MessageBoard](
	[Guid] [uniqueidentifier] NOT NULL,
	[MessageType] [int] NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[Content] [ntext] NOT NULL,
	[SendTime] [datetime] NOT NULL,
	[ReplyUser] [nvarchar](50) NULL,
	[ReplyTime] [datetime] NULL,
	[ReplayContent] [ntext] NULL,
	[IsReply] [int] NOT NULL DEFAULT ((0)),
	[IsShow] [int] NOT NULL DEFAULT ((1)),
	[IsAudit] [int] NOT NULL DEFAULT ((1)),
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[MemLoginID] [nvarchar](50) NOT NULL,
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[ShopNum1_ReturnGoodsBillInfo]    Script Date: 09/23/2011 15:07:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ShopNum1_ReturnGoodsBillInfo](
	[Guid] [uniqueidentifier] NOT NULL,
	[MemLoginID] [nvarchar](50) NULL,
	[OrderNumber] [nvarchar](50) NOT NULL,
	[ReturnGoodsBillNumber] [nvarchar](50) NULL,
	[DispatchPrice] [decimal](18, 2) NULL,
	[DispatchType] [nvarchar](50) NULL,
	[IsPayDeposit] [int] NULL,
	[Name] [nvarchar](50) NULL,
	[LogisticsCompany] [nvarchar](50) NULL,
	[LogisticsNumber] [nvarchar](50) NULL,
	[ReturnGoodsPeople] [nvarchar](50) NULL,
	[ReturnGoodsRegion] [nvarchar](50) NULL,
	[Address] [nvarchar](200) NULL,
	[Email] [nvarchar](100) NULL,
	[Postalcode] [nvarchar](20) NULL,
	[Tel] [nvarchar](20) NULL,
	[Mobile] [nvarchar](20) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[Note] [nvarchar](250) NULL,
	[AgentID] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[ShopNum1_RefundBillInfo]    Script Date: 09/23/2011 15:07:39 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ShopNum1_RefundBillInfo](
	[Guid] [uniqueidentifier] NOT NULL,
	[RefundBillNumber] [nvarchar](50) NULL,
	[OrderNumber] [nvarchar](50) NOT NULL,
	[MemLoginID] [nvarchar](50) NULL,
	[Account] [nvarchar](50) NULL,
	[Bank] [nvarchar](50) NULL,
	[CollectionPeople] [nvarchar](50) NULL,
	[AlreadPayPrice] [decimal](18, 2) NULL,
	[RefundName] [nvarchar](50) NULL,
	[PaymentName] [nvarchar](50) NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[CreateTime] [datetime] NULL,
	[RefundTime] [datetime] NULL,
	[Status] [int] NOT NULL DEFAULT ((0)),
	[AgentID] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_EmailBookType]    Script Date: 09/23/2011 14:59:05 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_EmailBookType](
	[Guid] [uniqueidentifier] NOT NULL,
	[BookTypeName] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](200) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_EmailBookType] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[ShopNum1_ShippingBillInfo]    Script Date: 09/23/2011 15:09:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ShopNum1_ShippingBillInfo](
	[Guid] [uniqueidentifier] NOT NULL,
	[OrderNumber] [nvarchar](50) NOT NULL,
	[ShippingBillNumber] [nvarchar](50) NULL,
	[MemLoginID] [nvarchar](50) NULL,
	[DispatchPrice] [decimal](18, 2) NULL,
	[DispatchTypeName] [nvarchar](50) NULL,
	[DispatchModeName] [nvarchar](50) NULL,
	[LogisticsCompany] [nvarchar](50) NULL,
	[LogisticsNumber] [nvarchar](50) NULL,
	[CollectionPeople] [nvarchar](50) NULL,
	[DispatchRegionGuid] [nvarchar](50) NULL,
	[Address] [nvarchar](200) NULL,
	[Postalcode] [nvarchar](20) NULL,
	[Tel] [nvarchar](20) NULL,
	[Email] [nvarchar](100) NULL,
	[Mobile] [nvarchar](20) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[Status] [int] NULL,
	[Note] [nvarchar](250) NOT NULL DEFAULT ((0)),
	[AgentID] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFlyProduce_EnterpriseResources]    Script Date: 09/23/2011 15:05:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_EnterpriseResources](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Guid] [uniqueidentifier] NOT NULL,
	[Cardnum] [nvarchar](50) NOT NULL,
	[CardType] [int] NOT NULL DEFAULT ((0)),
	[CardName] [nvarchar](50) NOT NULL,
	[CardDate] [datetime] NOT NULL,
	[CardDepartment] [nvarchar](50) NOT NULL,
	[CardContent] [ntext] NOT NULL,
	[CardImage] [nvarchar](200) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[ShopNum1_CollectionBillInfo]    Script Date: 09/23/2011 15:07:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ShopNum1_CollectionBillInfo](
	[Guid] [uniqueidentifier] NOT NULL,
	[OrderNumber] [nvarchar](50) NOT NULL,
	[MemLoginID] [nvarchar](50) NULL,
	[Account] [nvarchar](50) NULL,
	[Bank] [nvarchar](50) NULL,
	[PaymentNumber] [nvarchar](50) NULL,
	[PaymentAccount] [nvarchar](50) NULL,
	[AlreadPayPrice] [decimal](18, 2) NULL,
	[PaymentPrice] [decimal](18, 2) NULL,
	[PaymentType] [nvarchar](50) NULL,
	[PaymentName] [nvarchar](50) NULL,
	[CollectionWays] [nvarchar](50) NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[PayTime] [datetime] NULL,
	[PaymentStatus] [int] NOT NULL CONSTRAINT [DF__ShopNum1___Payme__135DC465]  DEFAULT ((0)),
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF__ShopNum1___IsDel__1451E89E]  DEFAULT ((0)),
	[AgentID] [nvarchar](50) NULL,
	[Note] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Region]    Script Date: 09/23/2011 15:03:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Region](
	[guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[ShortName] [nvarchar](50) NOT NULL,
	[OrderID] [int] NOT NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL,
	[SEOTitle] [nvarchar](150) NULL,
	[SEOKeywords] [nvarchar](150) NULL,
	[SEODescription] [nvarchar](200) NULL,
	[IsDefault] [int] NOT NULL CONSTRAINT [DF_GroupFly_Region_IsDefault]  DEFAULT ((0)),
	[IsForbid] [int] NOT NULL CONSTRAINT [DF_GroupFly_Region_IsForbid]  DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Region] PRIMARY KEY NONCLUSTERED 
(
	[guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_User]    Script Date: 09/23/2011 15:07:08 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_User](
	[Guid] [uniqueidentifier] NOT NULL,
	[UserName] [nvarchar](50) NOT NULL,
	[UserPwd] [nvarchar](50) NOT NULL,
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_EmailType]    Script Date: 09/23/2011 14:59:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_EmailType](
	[Guid] [uniqueidentifier] NOT NULL,
	[TypeName] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](200) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_EmailType] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_NewsCategory]    Script Date: 09/23/2011 15:06:08 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_NewsCategory](
	[ID] [int] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Keywords] [nvarchar](200) NOT NULL,
	[Description] [nvarchar](150) NULL,
	[OrderID] [int] NOT NULL,
	[IsShow] [int] NOT NULL CONSTRAINT [DF__Produce_N__IsSho__1367E606]  DEFAULT ((1)),
	[CategoryLevel] [int] NULL CONSTRAINT [DF__Produce_N__Categ__145C0A3F]  DEFAULT ((0)),
	[FatherID] [int] NULL CONSTRAINT [DF__Produce_N__Fathe__15502E78]  DEFAULT ((0)),
	[Family] [nvarchar](250) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL,
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Questionnaire]    Script Date: 09/23/2011 15:03:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Questionnaire](
	[Guid] [uniqueidentifier] NOT NULL,
	[Question1] [nvarchar](100) NOT NULL CONSTRAINT [DF_GroupFly_Questionnaire_Question1]  DEFAULT ((0)),
	[Otherquestion1] [nvarchar](250) NULL,
	[Question2] [int] NOT NULL,
	[Question3] [int] NOT NULL CONSTRAINT [DF_GroupFly_Questionnaire_Question3]  DEFAULT ((0)),
	[Question4] [int] NOT NULL CONSTRAINT [DF_GroupFly_Questionnaire_Question4]  DEFAULT ((0)),
	[Question5] [int] NOT NULL CONSTRAINT [DF_GroupFly_Questionnaire_Question5]  DEFAULT ((0)),
	[Question6] [int] NOT NULL CONSTRAINT [DF_GroupFly_Questionnaire_Question6]  DEFAULT ((0)),
	[Otherquestion6] [nvarchar](250) NULL,
	[Question7] [int] NOT NULL CONSTRAINT [DF_GroupFly_Questionnaire_Question7]  DEFAULT ((0)),
	[Question8] [int] NOT NULL,
	[Question9] [int] NOT NULL,
	[Question10] [int] NOT NULL CONSTRAINT [DF_GroupFly_Questionnaire_Question10]  DEFAULT ((0)),
	[Otherquestion10] [nvarchar](250) NULL,
	[Question11] [int] NOT NULL CONSTRAINT [DF_GroupFly_Questionnaire_Question11]  DEFAULT ((0)),
	[CreateTime] [datetime] NULL,
	[CreateUser] [nvarchar](50) NULL,
	[Ipaddress] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Group]    Script Date: 09/23/2011 14:59:18 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Group](
	[Guid] [uniqueidentifier] NOT NULL DEFAULT (newid()),
	[Name] [nvarchar](50) NOT NULL,
	[ShortName] [nvarchar](20) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Group] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  StoredProcedure [dbo].[Pro_Design_AddFitmentDiary]    Script Date: 09/23/2011 14:55:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--添加装修日记
CREATE proc [dbo].[Pro_Design_AddFitmentDiary]
	@Guid   uniqueidentifier,
	@FitmentInfoGuid   uniqueidentifier,
	@Content   Ntext,
	@CreteTime   DateTime,
	@MemberLoginID   Nvarchar(50),
	@AgentLoginID   Nvarchar(50)
AS
	INSERT INTO Design_FitmentDiary
           ([Guid]
           ,[FitmentInfoGuid]
           ,[Content]
           ,[CreteTime]
           ,[MemberLoginID]
           ,[AgentLoginID])
     VALUES
           (@Guid,
			@FitmentInfoGuid,
			@Content,
			@CreteTime,
			@MemberLoginID,
			@AgentLoginID)
GO
/****** Object:  Table [dbo].[GroupFly_ApplyTGActive]    Script Date: 09/23/2011 14:57:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ApplyTGActive](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Mobel] [nvarchar](50) NOT NULL,
	[OtherContect] [nvarchar](250) NOT NULL,
	[ShopName] [nvarchar](50) NOT NULL,
	[SupplierCategory] [uniqueidentifier] NOT NULL,
	[sendTime] [datetime] NULL,
	[ip] [nchar](15) NULL,
	[ApplyState] [int] NOT NULL CONSTRAINT [DF__GroupFly___Apply__63C3BFDC]  DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL,
 CONSTRAINT [PK_GroupFly_ApplyTGActive] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_ProductCateGory]    Script Date: 09/23/2011 15:06:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_ProductCateGory](
	[ID] [int] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Keywords] [nvarchar](200) NULL DEFAULT (NULL),
	[Description] [nvarchar](150) NULL DEFAULT (NULL),
	[OrderID] [int] NOT NULL,
	[IsShow] [int] NOT NULL DEFAULT ((1)),
	[CategoryLevel] [int] NOT NULL DEFAULT ((0)),
	[FatherID] [int] NOT NULL,
	[Family] [nvarchar](250) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[IsDownload] [int] NOT NULL DEFAULT ((0)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_GroupPage]    Script Date: 09/23/2011 14:59:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_GroupPage](
	[GroupGuid] [uniqueidentifier] NOT NULL,
	[PageGuid] [nvarchar](50) NOT NULL,
	[CreateUser] [nchar](10) NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0))
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Menu]    Script Date: 09/23/2011 15:01:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Menu](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](20) NOT NULL,
	[Code] [nvarchar](50) NOT NULL,
	[OrderID] [int] NOT NULL,
	[TypeCode] [nvarchar](50) NOT NULL,
	[State] [int] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF_GroupFly_Menu_IsDeleted]  DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Menu] PRIMARY KEY CLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_OrderOperateLog]    Script Date: 09/23/2011 15:02:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_OrderOperateLog](
	[Guid] [uniqueidentifier] NOT NULL,
	[OrderInfoGuid] [uniqueidentifier] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[OderStatus] [int] NOT NULL DEFAULT ((0)),
	[ShipmentStatus] [int] NOT NULL DEFAULT ((0)),
	[PaymentStatus] [int] NOT NULL DEFAULT ((0)),
	[Memo] [nvarchar](500) NULL,
	[OperateDateTime] [datetime] NOT NULL,
	[IsDeleted] [int] NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_OrderOperateLog] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_GroupPageWebControl]    Script Date: 09/23/2011 14:59:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_GroupPageWebControl](
	[Guid] [uniqueidentifier] NOT NULL DEFAULT (newid()),
	[PageWebControlGuid] [uniqueidentifier] NOT NULL,
	[GroupGuid] [uniqueidentifier] NOT NULL,
	[IsUse] [int] NOT NULL,
	[IsShow] [int] NOT NULL,
	[PageGuid] [uniqueidentifier] NOT NULL,
	[ControlID] [nvarchar](50) NOT NULL,
	[ControlType] [nvarchar](50) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL DEFAULT ((50)),
	[CreateTime] [datetime] NOT NULL DEFAULT ((8)),
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL DEFAULT ((8)),
	[IsDeleted] [int] NOT NULL DEFAULT ((4))
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_MenuType]    Script Date: 09/23/2011 15:01:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MenuType](
	[GUID] [uniqueidentifier] NOT NULL,
	[TypeCode] [nvarchar](50) NULL,
	[TypeName] [nvarchar](50) NULL,
	[Description] [nvarchar](250) NULL,
	[State] [int] NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL CONSTRAINT [DF_GroupFly_MenuType_IsDeleted]  DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_MenuType] PRIMARY KEY CLUSTERED 
(
	[GUID] 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
/****** Object:  Table [dbo].[GroupFly_Active]    Script Date: 09/23/2011 14:56:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Active](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](250) NULL,
	[OriginalImge] [nvarchar](250) NULL,
	[ThumbImage] [nvarchar](250) NULL,
	[SmallImage] [nvarchar](250) NULL,
	[MultiImage] [ntext] NULL,
	[RepertoryNumber] [nvarchar](50) NULL,
	[Weight] [int] NULL,
	[RepertoryCount] [int] NULL,
	[UnitName] [nvarchar](50) NULL,
	[RepertoryAlertCount] [int] NULL,
	[PresentScore] [int] NULL,
	[PresentRankScore] [int] NULL,
	[SocreIntegral] [int] NULL,
	[LimitBuyCount] [int] NULL,
	[BackMoney] [decimal](18, 2) NULL,
	[MarketPrice] [decimal](18, 2) NULL,
	[ShopPrice] [decimal](18, 2) NULL,
	[VIPprice] [decimal](18, 2) NULL CONSTRAINT [DF_GroupFly_Active_VIPprice]  DEFAULT ((0.00)),
	[Brief] [ntext] NULL,
	[Memo] [ntext] NULL,
	[Detail] [ntext] NULL,
	[ClickCount] [int] NULL,
	[CollectCount] [int] NULL,
	[BuyCount] [int] NULL,
	[CommentCount] [int] NULL,
	[ReferCount] [int] NULL,
	[SaleNumber] [int] NULL,
	[IsRecommend] [int] NULL CONSTRAINT [DF__GroupFly___IsRec__2C738AF2]  DEFAULT ((0)),
	[IsNew] [int] NOT NULL CONSTRAINT [DF_GroupFly_Active_IsNew]  DEFAULT ((0)),
	[IsHot] [int] NOT NULL CONSTRAINT [DF_GroupFly_Active_IsHot]  DEFAULT ((0)),
	[IsReal] [int] NULL CONSTRAINT [DF__GroupFly___IsRea__2D67AF2B]  DEFAULT ((1)),
	[Title] [nvarchar](250) NULL,
	[Description] [nvarchar](250) NULL,
	[Keywords] [nvarchar](250) NULL,
	[OrderID] [int] NULL,
	[SupplierGuid] [uniqueidentifier] NULL,
	[ProductTypeGuid] [int] NULL,
	[DepositMoney] [decimal](18, 2) NULL,
	[AdminComment] [ntext] NULL,
	[ShopComment] [ntext] NULL,
	[MinMemberCount] [int] NULL,
	[ExpiredTime] [datetime] NULL,
	[StartTime] [datetime] NULL,
	[EndTime] [datetime] NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL,
	[CityCode] [nvarchar](18) NULL,
	[ToMinBuyTime] [datetime] NULL,
	[NoSendMoney] [int] NULL CONSTRAINT [DF_GroupFly_Active_NoSendMoney]  DEFAULT ((-1)),
	[AddMoney] [nvarchar](50) NOT NULL,
	[CanJoin] [int] NULL CONSTRAINT [DF_GroupFly_Active_CanJoin]  DEFAULT ((0)),
	[IsAloneVip] [int] NULL CONSTRAINT [DF_GroupFly_Active_IsAloneVip]  DEFAULT ((0)),
	[RestrictNumber] [nvarchar](18) NULL CONSTRAINT [DF_GroupFly_Active_RestrictNumber]  DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Active] PRIMARY KEY CLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_OrderProduct]    Script Date: 09/23/2011 15:02:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_OrderProduct](
	[Guid] [uniqueidentifier] NOT NULL,
	[OrderInfoGuid] [uniqueidentifier] NOT NULL,
	[ProductGuid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](100) NOT NULL,
	[RepertoryNumber] [nvarchar](50) NOT NULL,
	[BuyNumber] [int] NOT NULL,
	[MarketPrice] [decimal](18, 2) NOT NULL,
	[ShopPrice] [decimal](18, 2) NOT NULL,
	[BuyPrice] [decimal](18, 2) NOT NULL,
	[Attributes] [nvarchar](250) NULL,
	[IsShipment] [int] NOT NULL DEFAULT ((0)),
	[IsReal] [int] NOT NULL DEFAULT ((0)),
	[ExtensionAttriutes] [nvarchar](250) NULL,
	[IsJoinActivity] [int] NOT NULL DEFAULT ((0)),
	[IsPresent] [int] NOT NULL DEFAULT ((0)),
	[CreateTime] [datetime] NOT NULL,
 CONSTRAINT [PK_GroupFly_OrderProduct] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_DownLineActive]    Script Date: 09/23/2011 14:58:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_DownLineActive](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NULL,
	[OriginalImge] [nvarchar](250) NULL,
	[ThumbImage] [nvarchar](250) NULL,
	[SmallImage] [nvarchar](250) NULL,
	[MultiImage] [ntext] NULL,
	[RepertoryNumber] [nvarchar](50) NULL,
	[Weight] [int] NULL,
	[RepertoryCount] [int] NULL,
	[UnitName] [nvarchar](50) NULL,
	[RepertoryAlertCount] [int] NULL,
	[PresentScore] [int] NULL,
	[PresentRankScore] [int] NULL,
	[SocreIntegral] [int] NULL,
	[LimitBuyCount] [int] NULL,
	[BackMoney] [decimal](18, 2) NULL,
	[MarketPrice] [decimal](18, 2) NULL,
	[ShopPrice] [decimal](18, 2) NULL,
	[Brief] [ntext] NULL,
	[Memo] [ntext] NULL,
	[Detail] [ntext] NULL,
	[ClickCount] [int] NULL,
	[CollectCount] [int] NULL,
	[BuyCount] [int] NULL,
	[CommentCount] [int] NULL,
	[ReferCount] [int] NULL,
	[SaleNumber] [int] NULL,
	[IsReal] [int] NULL CONSTRAINT [DF__GroupFly___IsRea__0DB9F9A8]  DEFAULT ((1)),
	[Title] [nvarchar](250) NULL,
	[Description] [nvarchar](250) NULL,
	[Keywords] [nvarchar](250) NULL,
	[OrderID] [int] NOT NULL,
	[SupplierGuid] [uniqueidentifier] NOT NULL,
	[ProductTypeGuid] [int] NULL,
	[DepositMoney] [decimal](18, 2) NULL,
	[AdminComment] [ntext] NULL,
	[ShopComment] [ntext] NULL,
	[MinMemberCount] [int] NULL,
	[ExpiredTime] [datetime] NULL,
	[StartTime] [datetime] NULL,
	[EndTime] [datetime] NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL,
	[CityCode] [nvarchar](20) NULL,
 CONSTRAINT [PK_GroupFly_DownLineActive] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_GroupUser]    Script Date: 09/23/2011 14:59:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_GroupUser](
	[GroupGuid] [uniqueidentifier] NOT NULL,
	[UserGuid] [uniqueidentifier] NOT NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0))
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFlyProduce_AttachMentCateGory]    Script Date: 09/23/2011 15:04:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_AttachMentCateGory](
	[Guid] [uniqueidentifier] NOT NULL,
	[CateGoryName] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](250) NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Help]    Script Date: 09/23/2011 14:59:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Help](
	[Guid] [uniqueidentifier] NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[HelpTypeGuid] [uniqueidentifier] NOT NULL,
	[Remark] [ntext] NOT NULL,
	[OrderID] [int] NOT NULL DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Help] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFlyProduce_Email]    Script Date: 09/23/2011 15:05:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_Email](
	[Guid] [uniqueidentifier] NOT NULL,
	[TypeName] [nvarchar](50) NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[Remark] [ntext] NOT NULL,
	[Description] [nvarchar](150) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_ActiveArticle]    Script Date: 09/23/2011 14:56:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ActiveArticle](
	[ActiveGuid] [uniqueidentifier] NOT NULL,
	[ArticleGuid] [uniqueidentifier] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Page]    Script Date: 09/23/2011 15:02:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Page](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](250) NOT NULL,
	[OrderID] [int] NOT NULL,
	[OneID] [int] NOT NULL,
	[TwoID] [int] NOT NULL,
	[ThreeID] [int] NOT NULL,
	[Description] [nvarchar](100) NULL,
	[PageType] [int] NOT NULL DEFAULT ((0)),
	[PagePath] [nvarchar](250) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Page] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_MMSType]    Script Date: 09/23/2011 15:01:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MMSType](
	[Guid] [uniqueidentifier] NOT NULL,
	[TypeName] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](150) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_MMSType] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetProductImage]    Script Date: 09/23/2011 14:55:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetProductImage]
	@guid uniqueidentifier
as
	select ProductImage from GroupFlyProduce_Product where [Guid] = @guid
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetProductListSearch]    Script Date: 09/23/2011 14:55:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetProductListSearch] 
	@title nvarchar(150),
    @supplierID nvarchar(50)
as
begin
   declare @SQL nvarchar(500)
	SET @SQL='select [Guid],
		[Name],
		ShopPrice,
		OriginalImage,Brief
		from GroupFlyProduce_Product
		where ProduceMemLoginID ='''+ @supplierID+''''
	  SET @SQL=@SQL+' and IsAudit = 1 and OriginalImage<>''''  and [name] like ''%'+@title +'%'''+' order by  OrderID desc'
    
    exec (@SQL)
end
GO
/****** Object:  Table [dbo].[GroupFly_MMSGroupSend]    Script Date: 09/23/2011 15:01:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MMSGroupSend](
	[Guid] [uniqueidentifier] NOT NULL,
	[SendObject] [nvarchar](100) NOT NULL,
	[SendObjectMMS] [nvarchar](max) NOT NULL,
	[MMSTitle] [nvarchar](50) NOT NULL,
	[State] [int] NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[IsTime] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsTim__002AF460]  DEFAULT ((0)),
	[TimeSendTime] [datetime] NULL,
	[MMSGuid] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_GroupFly_MMSGroupSend] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetProductMeta]    Script Date: 09/23/2011 14:55:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/**meto 产品详细的meta**/
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetProductMeta]
  @guid uniqueidentifier 
as
Begin
 SELECT 
       [Name]
      ,[Keywords]
      ,[Description]
  FROM GroupFlyProduce_Product WHERE Guid=@guid
end
GO
/****** Object:  Table [dbo].[GroupFly_OnlineService]    Script Date: 09/23/2011 15:01:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_OnlineService](
	[Guid] [uniqueidentifier] NOT NULL,
	[Type] [nvarchar](50) NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[ServiceAccount] [nvarchar](100) NOT NULL,
	[Location] [nvarchar](20) NOT NULL,
	[IfShow] [int] NOT NULL DEFAULT ((0)),
	[OrderID] [int] NOT NULL DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_OnlineService] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_DispatchRegion]    Script Date: 09/23/2011 14:58:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_DispatchRegion](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[OrderID] [int] NOT NULL,
	[Memo] [nvarchar](1000) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_DispatchRegion] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_Unit]    Script Date: 09/23/2011 15:07:05 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_Unit](
	[Guid] [uniqueidentifier] NOT NULL,
	[Code] [nvarchar](10) NOT NULL,
	[Name] [nvarchar](20) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Email]    Script Date: 09/23/2011 14:58:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Email](
	[Guid] [uniqueidentifier] NOT NULL,
	[TypeName] [nvarchar](50) NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[Remark] [nvarchar](max) NOT NULL,
	[Description] [nvarchar](100) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsDel__7D197D8B]  DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Email] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_MMSMemberAssignGroup]    Script Date: 09/23/2011 15:01:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MMSMemberAssignGroup](
	[Guid] [uniqueidentifier] NOT NULL,
	[MemLoginID] [nvarchar](50) NOT NULL,
	[MemberGroupGuid] [uniqueidentifier] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[Status] [int] NULL,
	[CityCode] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_DispatchItemRegion]    Script Date: 09/23/2011 14:58:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_DispatchItemRegion](
	[Guid] [uniqueidentifier] NOT NULL,
	[ItemName] [nvarchar](50) NOT NULL,
	[ItemCode] [nvarchar](50) NOT NULL,
	[ItemValue] [decimal](18, 2) NOT NULL,
	[DispatchRegionGuid] [uniqueidentifier] NOT NULL,
	[DispatchMode] [uniqueidentifier] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_DispatchItemRegion] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetProductList]    Script Date: 09/23/2011 14:55:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE proc [dbo].[Pro_GroupFlyProduce_GetProductList] 
    @showCount int,
    @supplierID nvarchar(50)
AS
	SELECT TOP(@ShowCount) [Guid],[Name],OriginalImage,ShopPrice
	FROM GroupFlyProduce_Product
	WHERE ProduceMemLoginID = @supplierID and
    IsAudit=1 and OriginalImage<>''
	ORDER BY OrderID DESC
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetProductListMore]    Script Date: 09/23/2011 14:55:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--产品列表（more）
CREATE proc [dbo].[Pro_GroupFlyProduce_GetProductListMore] 
	@productCategoryGuid nvarchar(50),
    @supplierID nvarchar(50) 
as
	if(@productCategoryGuid = '')
	begin
		select [Guid],[Name],ShopPrice,OriginalImage,Brief
		from GroupFlyProduce_Product
		where 
        ProduceMemLoginID=@supplierID and
        IsAudit = 1 and OriginalImage<>''  order by  OrderID desc
	end
	else
	begin
		select [Guid],[Name],ShopPrice,OriginalImage,Brief
		from GroupFlyProduce_Product
		where ProduceMemLoginID=@supplierID and
        ProductCategoryID = @productCategoryGuid
		and IsAudit = 1 and OriginalImage<>''  order by  OrderID desc
	end

/****  printproc 'Pro_GroupFlyProduce_GetProductListMore','dt'   ***/
GO
/****** Object:  Table [dbo].[ShopNum1_ProductImage]    Script Date: 09/23/2011 15:07:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ShopNum1_ProductImage](
	[Guid] [uniqueidentifier] NOT NULL,
	[ProductGuid] [uniqueidentifier] NOT NULL,
	[OriginalImge] [nvarchar](250) NOT NULL,
	[ThumbImage] [nvarchar](250) NULL,
	[SmallImage] [nvarchar](250) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF_ShopNum1_PorductImage_IsDeleted]  DEFAULT ((0)),
PRIMARY KEY CLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_HelpType]    Script Date: 09/23/2011 14:59:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_HelpType](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Remark] [nvarchar](500) NOT NULL,
	[OrderID] [int] NOT NULL DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_HelpType] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_ActiveCommentByMember]    Script Date: 09/23/2011 14:56:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ActiveCommentByMember](
	[Guid] [uniqueidentifier] NOT NULL,
	[ActiveGuid] [uniqueidentifier] NULL,
	[MemLoginID] [nvarchar](50) NULL,
	[Title] [nvarchar](50) NULL,
	[SendTime] [datetime] NULL,
	[Content] [ntext] NULL,
	[IPAddress] [nvarchar](50) NULL,
	[ReplyUser] [nvarchar](50) NULL,
	[ReplyTime] [datetime] NULL,
	[ReplyContent] [ntext] NULL,
	[IsAudit] [int] NULL DEFAULT ((0)),
	[IsReply] [int] NULL DEFAULT ((0)),
	[IsDeleted] [int] NULL DEFAULT ((0)),
	[Rank] [int] NULL,
 CONSTRAINT [PK_GroupFly_ActiveCommentByMember] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_ActiveCategory]    Script Date: 09/23/2011 14:56:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ActiveCategory](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Keywords] [nvarchar](200) NULL,
	[Description] [nvarchar](150) NULL,
	[OrderID] [int] NULL,
	[IsShow] [int] NULL,
	[CategoryLevel] [int] NULL,
	[Family] [nvarchar](250) NULL,
	[FatherID] [int] NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL,
 CONSTRAINT [PK_GroupFly_ActiveCategory] 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
/****** Object:  Table [dbo].[GroupFly_PageWebControl]    Script Date: 09/23/2011 15:02:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_PageWebControl](
	[Guid] [uniqueidentifier] NOT NULL DEFAULT (newid()),
	[Name] [nvarchar](50) NOT NULL,
	[PageGuid] [uniqueidentifier] NOT NULL,
	[ControlID] [nvarchar](50) NOT NULL,
	[ControlType] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](100) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_PageWebControl] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_MemberRenewalsRecorded]    Script Date: 09/23/2011 15:01:08 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MemberRenewalsRecorded](
	[Guid] [uniqueidentifier] NOT NULL,
	[OrderinfoGuid] [uniqueidentifier] NOT NULL,
	[MemLoginID] [nvarchar](50) NOT NULL,
	[RankGuid] [uniqueidentifier] NULL,
	[ServicePrice] [decimal](18, 2) NULL,
	[BuyNumber] [int] NULL,
	[OrderState] [int] NOT NULL CONSTRAINT [DF_GroupFly_MemberRenewalsRecorded_OrderState]  DEFAULT ((0)),
	[BuyTime] [datetime] NULL,
 CONSTRAINT [PK_GroupFly_MemberRenewalsRecorded] PRIMARY KEY CLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_Image]    Script Date: 09/23/2011 14:59:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Image](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[ImageType] [uniqueidentifier] NOT NULL,
	[ImagePath] [nvarchar](250) NOT NULL,
	[Description] [nvarchar](100) NULL,
	[UseTimes] [int] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[ImageCategoryID] [int] NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[IsDownLoad] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Image] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_BuyService]    Script Date: 09/23/2011 14:58:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_BuyService](
	[Guid] [uniqueidentifier] NOT NULL,
	[OrderInfoGuid] [uniqueidentifier] NOT NULL,
	[MemLoginID] [nvarchar](50) NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[ServicePrice] [decimal](18, 2) NOT NULL,
	[BuyNumber] [int] NOT NULL,
	[ShouldPayMoney] [decimal](18, 2) NOT NULL,
	[BuyTime] [datetime] NOT NULL,
	[ExpirationDate] [datetime] NULL,
	[OrderInfoState] [int] NOT NULL CONSTRAINT [DF_GroupFly_BuyService_OrderInfoState]  DEFAULT ((0)),
	[CreateTime] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Image_Type]    Script Date: 09/23/2011 14:59:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Image_Type](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](50) NULL,
	[IfSpecial] [int] NOT NULL DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Image_Type] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetButtomNavigation]    Script Date: 09/23/2011 14:55:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/**底部导航**/
CREATE PROCEDURE [dbo].[Pro_GroupFlyProduce_GetButtomNavigation]
	@showCount int
AS
   SELECT  top(@showCount) 
		   [Guid]
		  ,[Name]
		  ,[LinkAddress]
		  ,[ShowLocation]
		  ,[IsShow]
		  ,[IfOpen]
		  ,[Remark]
		  ,[OrderID]
		  ,[CreateUser]
		  ,[CreateTime]
		  ,[ModifyUser]
		  ,[ModifyTime]
		  ,[IsDeleted]
  FROM [GroupFlyProduce].[dbo].[GroupFlyProduce_UserDefinedColumn]
 WHERE  ShowLocation=1 AND IsShow=1 ORDER BY OrderID DESC
GO
/****** Object:  Table [dbo].[GroupFly_ActiveMemberRankPrice]    Script Date: 09/23/2011 14:56:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ActiveMemberRankPrice](
	[Guid] [uniqueidentifier] NOT NULL,
	[ActiveGuid] [uniqueidentifier] NULL,
	[MemberRankGuid] [uniqueidentifier] NULL,
	[Price] [decimal](18, 2) NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL,
 CONSTRAINT [PK_GroupFly_ActiveMemberRankPrice] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetTopNavigation]    Script Date: 09/23/2011 14:55:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/**右上角导航**/
CREATE PROCEDURE  [dbo].[Pro_GroupFlyProduce_GetTopNavigation]
      @showCount int
AS
BEGIN
 SELECT  top(@showCount) 
		   [Guid]
		  ,[Name]
		  ,[LinkAddress]
		  ,[ShowLocation]
		  ,[IsShow]
		  ,[IfOpen]
		  ,[Remark]
		  ,[OrderID]
		  ,[CreateUser]
		  ,[CreateTime]
		  ,[ModifyUser]
		  ,[ModifyTime]
		  ,[IsDeleted]
  FROM [GroupFlyProduce].[dbo].[GroupFlyProduce_UserDefinedColumn]
 WHERE  ShowLocation=2 AND IsShow=1 ORDER BY OrderID DESC
END
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetCompanyInfo]    Script Date: 09/23/2011 14:55:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--获取企业信息
CREATE PROCEDURE [dbo].[Pro_GroupFlyProduce_GetCompanyInfo]
@supplierID nvarchar(50)
AS
	SELECT [Guid]
      ,[CompanyName]
      ,[CompanyShortName]
      ,[MainBusiness]
      ,[RegisteredFunds]
      ,[SetUpTime]
      ,[Postcode]
      ,[Address]
      ,[DetailAddress]
      ,[MainIndustry]
      ,[CompanyNature]
      ,[MainWay]
      ,[SaleProduct]
      ,[BuyProduct]
      ,[CompanyIntroduce]
      ,[BindMobile]
      ,[Contact]
      ,[Email]
      ,[Tel]
      ,[Fax]
      ,[BusinessCertificate]
      ,[CompanyImage]
      ,[CompanyWebSite]
  FROM [dbo].[GroupFlyProduce_Company]
  WHERE ProduceMemLoginID = @supplierID
GO
/****** Object:  Table [dbo].[GroupFly_Ad]    Script Date: 09/23/2011 14:56:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Ad](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Type] [int] NOT NULL,
	[AdPositionGuid] [uniqueidentifier] NOT NULL,
	[StartTime] [datetime] NOT NULL,
	[EndTime] [datetime] NOT NULL,
	[Link] [nvarchar](150) NULL DEFAULT (NULL),
	[OriginalImge] [nvarchar](250) NULL DEFAULT (NULL),
	[Flash] [nvarchar](250) NULL DEFAULT (NULL),
	[Code] [ntext] NULL DEFAULT (NULL),
	[Content] [ntext] NULL,
	[IsOpen] [int] NOT NULL DEFAULT ((1)),
	[LinkMan] [nvarchar](50) NULL DEFAULT (NULL),
	[Email] [nvarchar](100) NULL DEFAULT (NULL),
	[Tel] [nvarchar](20) NULL DEFAULT (NULL),
	[Count] [int] NOT NULL DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[JsFileName] [nvarchar](50) NULL,
 CONSTRAINT [PK_GroupFly_Ad] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_ActiveMember]    Script Date: 09/23/2011 14:56:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ActiveMember](
	[Guid] [uniqueidentifier] NOT NULL,
	[ActiveGuid] [uniqueidentifier] NULL,
	[MemLoingID] [nvarchar](50) NULL,
	[name] [nvarchar](50) NULL,
	[TelPhone] [nvarchar](50) NULL,
	[Address] [nvarchar](250) NULL,
	[Remark] [ntext] NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL,
 CONSTRAINT [PK_GroupFly_ActiveMember] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Payment]    Script Date: 09/23/2011 15:03:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Payment](
	[Guid] [uniqueidentifier] NOT NULL,
	[PaymentType] [nvarchar](50) NOT NULL,
	[Name] [nvarchar](100) NULL,
	[MerchantCode] [nvarchar](4000) NOT NULL,
	[SecretKey] [nvarchar](4000) NULL,
	[SecondKey] [nvarchar](4000) NULL,
	[Pwd] [nvarchar](4000) NULL,
	[Partner] [nvarchar](100) NULL,
	[Email] [nvarchar](100) NULL,
	[Memo] [nvarchar](4000) NULL,
	[Charge] [decimal](18, 2) NOT NULL DEFAULT ((0)),
	[IsPercent] [int] NOT NULL DEFAULT ((0)),
	[IsCOD] [int] NOT NULL DEFAULT ((0)),
	[OrderID] [int] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[PayTypeImage] [nvarchar](500) NULL,
 CONSTRAINT [PK_GroupFly_Payment] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_ImageCategory]    Script Date: 09/23/2011 14:59:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ImageCategory](
	[ID] [int] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](150) NULL,
	[CategoryLevel] [int] NOT NULL,
	[FatherID] [int] NOT NULL,
	[Family] [nvarchar](250) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_OrderInfo]    Script Date: 09/23/2011 15:02:24 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_OrderInfo](
	[Guid] [uniqueidentifier] NOT NULL,
	[MemLoginID] [nvarchar](50) NULL,
	[OrderNumber] [nvarchar](50) NOT NULL,
	[OderStatus] [int] NOT NULL CONSTRAINT [DF__GroupFly___OderS__10615C29]  DEFAULT ((0)),
	[ShipmentStatus] [int] NOT NULL CONSTRAINT [DF__GroupFly___Shipm__11558062]  DEFAULT ((0)),
	[PaymentStatus] [int] NOT NULL CONSTRAINT [DF__GroupFly___Payme__1249A49B]  DEFAULT ((0)),
	[Name] [nvarchar](50) NOT NULL,
	[Email] [nvarchar](100) NOT NULL,
	[Address] [nvarchar](250) NULL,
	[Postalcode] [nvarchar](20) NULL,
	[Tel] [nvarchar](20) NULL,
	[Mobile] [nvarchar](20) NULL,
	[ClientToSellerMsg] [nvarchar](1000) NULL,
	[SellerToClientMsg] [nvarchar](1000) NULL,
	[DispatchModeGuid] [uniqueidentifier] NULL,
	[DispatchModeName] [nvarchar](50) NULL,
	[PaymentGuid] [uniqueidentifier] NOT NULL,
	[PaymentName] [nvarchar](50) NOT NULL,
	[OutOfStockOperate] [nvarchar](50) NULL,
	[InvoiceTitle] [nvarchar](50) NULL,
	[InvoiceContent] [nvarchar](50) NULL,
	[ProductPrice] [decimal](18, 2) NOT NULL,
	[DispatchPrice] [decimal](18, 2) NOT NULL,
	[InsurePrice] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___Insur__133DC8D4]  DEFAULT ((0)),
	[PaymentPrice] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___Payme__1431ED0D]  DEFAULT ((0)),
	[PackPrice] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___PackP__15261146]  DEFAULT ((0)),
	[BlessCardPrice] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___Bless__161A357F]  DEFAULT ((0)),
	[AlreadPayPrice] [decimal](18, 2) NOT NULL,
	[SurplusPrice] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___Surpl__170E59B8]  DEFAULT ((0)),
	[UseScore] [int] NOT NULL CONSTRAINT [DF__GroupFly___UseSc__18027DF1]  DEFAULT ((0)),
	[ScorePrice] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___Score__18F6A22A]  DEFAULT ((0)),
	[ShouldPayPrice] [decimal](18, 2) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ConfirmTime] [datetime] NULL,
	[PayTime] [datetime] NULL CONSTRAINT [DF__GroupFly___PayTi__19EAC663]  DEFAULT (NULL),
	[DispatchTime] [datetime] NULL CONSTRAINT [DF__GroupFly___Dispa__1ADEEA9C]  DEFAULT (NULL),
	[ShipmentNumber] [nvarchar](50) NULL CONSTRAINT [DF__GroupFly___Shipm__1BD30ED5]  DEFAULT (NULL),
	[BuyType] [nvarchar](50) NULL CONSTRAINT [DF__GroupFly___BuyTy__1CC7330E]  DEFAULT (N'n'),
	[ActivityGuid] [uniqueidentifier] NULL,
	[PayMemo] [nvarchar](500) NULL,
	[InvoiceType] [nvarchar](50) NULL,
	[InvoiceTax] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___Invoi__1DBB5747]  DEFAULT ((0)),
	[Discount] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___Disco__1EAF7B80]  DEFAULT ((0)),
	[Deposit] [decimal](18, 2) NULL CONSTRAINT [DF__GroupFly___Depos__1FA39FB9]  DEFAULT ((0)),
	[IsPayDeposit] [int] NULL CONSTRAINT [DF__GroupFly___IsPay__2097C3F2]  DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL CONSTRAINT [DF__GroupFly___Modif__218BE82B]  DEFAULT (NULL),
	[IsDeleted] [int] NULL CONSTRAINT [DF__GroupFly___IsDel__22800C64]  DEFAULT ((0)),
	[SendTime] [nvarchar](100) NULL,
	[IsNoSendMoney] [int] NULL CONSTRAINT [DF_GroupFly_OrderInfo_IsNoSendMoney]  DEFAULT ((0)),
	[UsedPwd] [nvarchar](50) NULL,
	[IsUse] [int] NULL CONSTRAINT [DF_GroupFly_OrderInfo_IsUse]  DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_OrderInfo] PRIMARY KEY CLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_AttachMent]    Script Date: 09/23/2011 15:04:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_AttachMent](
	[Guid] [uniqueidentifier] NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[AttachmentURL] [nvarchar](250) NOT NULL,
	[Description] [nvarchar](150) NULL,
	[UploadTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF__Produce_A__IsDel__7C8480AE]  DEFAULT ((0)),
	[AssociatedCategoryGuid] [nvarchar](50) NOT NULL,
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFlyProduce_Image]    Script Date: 09/23/2011 15:05:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_Image](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](100) NOT NULL,
	[ImageType] [uniqueidentifier] NOT NULL,
	[ImagePath] [nvarchar](250) NOT NULL,
	[Description] [nvarchar](150) NULL,
	[UseTimes] [int] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF__GroupFlyP__IsDel__6D6D25A7]  DEFAULT ((0)),
	[ProduceMemLoginID] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_AdvancePaymentApplyLog]    Script Date: 09/23/2011 14:57:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_AdvancePaymentApplyLog](
	[Guid] [uniqueidentifier] NOT NULL,
	[OrderNumber] [nvarchar](50) NULL,
	[OperateType] [nvarchar](20) NOT NULL,
	[CurrentAdvancePayment] [decimal](18, 2) NOT NULL,
	[OperateMoney] [decimal](18, 2) NOT NULL,
	[Date] [datetime] NOT NULL,
	[OperateStatus] [int] NOT NULL CONSTRAINT [DF__GroupFly___Opera__4EC8A2F6]  DEFAULT ((0)),
	[Memo] [nvarchar](4000) NULL CONSTRAINT [DF__GroupFly_A__Memo__4FBCC72F]  DEFAULT (NULL),
	[UserMemo] [nvarchar](4000) NULL,
	[MemLoginID] [nvarchar](50) NOT NULL,
	[PaymentGuid] [uniqueidentifier] NULL CONSTRAINT [DF__GroupFly___Payme__50B0EB68]  DEFAULT (NULL),
	[PaymentName] [nvarchar](100) NULL CONSTRAINT [DF__GroupFly___Payme__51A50FA1]  DEFAULT (NULL),
	[Bank] [nvarchar](50) NULL,
	[TrueName] [nvarchar](50) NULL,
	[Account] [nvarchar](50) NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsDel__529933DA]  DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_AdvancePaymentApplyLog] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[ShopNum1_ScoreCart]    Script Date: 09/23/2011 15:07:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ShopNum1_ScoreCart](
	[Guid] [uniqueidentifier] NOT NULL,
	[MemLoginID] [nvarchar](50) NULL,
	[ProductGuid] [uniqueidentifier] NOT NULL,
	[OriginalImge] [nvarchar](250) NULL,
	[Name] [nvarchar](100) NOT NULL,
	[RepertoryNumber] [nvarchar](50) NOT NULL,
	[BuyNumber] [int] NOT NULL,
	[BuyScore] [int] NOT NULL,
	[IsShipment] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreCart_IsShipment]  DEFAULT ((0)),
	[IsReal] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreCart_IsReal]  DEFAULT ((0)),
	[CartType] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreCart_CartType]  DEFAULT ((0)),
	[CreateTime] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Address]    Script Date: 09/23/2011 14:56:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Address](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NULL,
	[Email] [nvarchar](100) NULL,
	[Address] [nvarchar](250) NULL,
	[Postalcode] [nvarchar](20) NULL,
	[Tel] [nvarchar](20) NULL,
	[Mobile] [nvarchar](20) NULL,
	[IsDefault] [int] NOT NULL,
	[MemLoginID] [nvarchar](50) NOT NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Address] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[ShopNum1_ScoreOrderInfo]    Script Date: 09/23/2011 15:08:16 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ShopNum1_ScoreOrderInfo](
	[Guid] [uniqueidentifier] NOT NULL,
	[MemLoginID] [nvarchar](50) NULL,
	[OrderNumber] [nvarchar](50) NOT NULL,
	[OderStatus] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreOrderInfo_OderStatus]  DEFAULT ((0)),
	[ShipmentStatus] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreOrderInfo_ShipmentStatus]  DEFAULT ((0)),
	[PaymentStatus] [int] NULL CONSTRAINT [DF_ShopNum1_ScoreOrderInfo_PaymentStatus]  DEFAULT ((0)),
	[Name] [nvarchar](50) NOT NULL,
	[Email] [nvarchar](100) NOT NULL,
	[Address] [nvarchar](250) NULL,
	[Postalcode] [nvarchar](20) NULL,
	[Tel] [nvarchar](20) NULL,
	[Mobile] [nvarchar](20) NULL,
	[ClientToSellerMsg] [nvarchar](1000) NULL,
	[SellerToClientMsg] [nvarchar](1000) NULL,
	[DispatchModeGuid] [uniqueidentifier] NOT NULL,
	[DispatchModeName] [nvarchar](50) NOT NULL,
	[PaymentGuid] [uniqueidentifier] NOT NULL,
	[PaymentName] [nvarchar](50) NOT NULL,
	[OutOfStockOperate] [nvarchar](50) NULL,
	[CostTotalScore] [int] NULL,
	[DispatchPrice] [decimal](18, 2) NOT NULL,
	[InsurePrice] [decimal](18, 2) NOT NULL CONSTRAINT [DF_ShopNum1_ScoreOrderInfo_InsurePrice]  DEFAULT ((0)),
	[PaymentPrice] [decimal](18, 2) NOT NULL CONSTRAINT [DF_ShopNum1_ScoreOrderInfo_PaymentPrice]  DEFAULT ((0)),
	[TotaltPrice] [decimal](18, 2) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ConfirmTime] [datetime] NULL,
	[PayTime] [datetime] NULL CONSTRAINT [DF_ShopNum1_ScoreOrderInfo_PayTime]  DEFAULT (NULL),
	[DispatchTime] [datetime] NULL CONSTRAINT [DF_ShopNum1_ScoreOrderInfo_DispatchTime]  DEFAULT (NULL),
	[ShipmentNumber] [nvarchar](50) NULL CONSTRAINT [DF_ShopNum1_ScoreOrderInfo_ShipmentNumber]  DEFAULT (NULL),
	[PayMemo] [nvarchar](500) NULL,
	[CreateUser] [nvarchar](50) NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL CONSTRAINT [DF_ShopNum1_ScoreOrderInfo_ModifyTime]  DEFAULT (NULL),
	[IsDeleted] [int] NULL CONSTRAINT [DF_ShopNum1_ScoreOrderInfo_IsDeleted]  DEFAULT ((0)),
	[RegionCode] [nvarchar](12) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_AdPosition]    Script Date: 09/23/2011 14:57:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_AdPosition](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[AdWidth] [int] NOT NULL DEFAULT ((0)),
	[AdHeight] [int] NOT NULL DEFAULT ((0)),
	[Memo] [ntext] NOT NULL,
	[TemplateCode] [nvarchar](4000) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_AdPosition] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_RankScoreModifyLog]    Script Date: 09/23/2011 15:03:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_RankScoreModifyLog](
	[Guid] [uniqueidentifier] NOT NULL,
	[OperateType] [int] NOT NULL,
	[CurrentScore] [int] NOT NULL,
	[OperateScore] [int] NOT NULL,
	[LastOperateScore] [int] NOT NULL,
	[Date] [datetime] NOT NULL,
	[Memo] [nvarchar](250) NULL DEFAULT (NULL),
	[MemLoginID] [nvarchar](50) NOT NULL,
	[CreateUser] [nvarchar](50) NULL DEFAULT (NULL),
	[CreateTime] [datetime] NULL DEFAULT (NULL),
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_RankScoreModifyLog] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_Company]    Script Date: 09/23/2011 15:04:55 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_Company](
	[Guid] [uniqueidentifier] NOT NULL,
	[CompanyName] [nvarchar](50) NULL,
	[CompanyShortName] [nvarchar](50) NULL,
	[MainBusiness] [nvarchar](250) NULL,
	[RegisteredFunds] [nvarchar](25) NULL,
	[SetUpTime] [datetime] NULL,
	[Postcode] [char](50) NULL,
	[Address] [nvarchar](25) NULL,
	[DetailAddress] [nvarchar](250) NULL,
	[MainIndustry] [text] NULL,
	[CompanyNature] [int] NULL,
	[MainWay] [int] NULL,
	[SaleProduct] [nvarchar](100) NULL,
	[BuyProduct] [nvarchar](100) NULL,
	[CompanyIntroduce] [text] NULL,
	[BindMobile] [nvarchar](15) NULL,
	[Contact] [nvarchar](50) NULL,
	[Email] [nvarchar](50) NULL,
	[Tel] [nvarchar](25) NULL,
	[Fax] [nvarchar](25) NULL,
	[BusinessCertificate] [nvarchar](25) NULL,
	[CompanyImage] [nvarchar](250) NULL,
	[CompanyWebSite] [nvarchar](250) NULL,
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[GroupFly_RelatedActive]    Script Date: 09/23/2011 15:03:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_RelatedActive](
	[ActiveGuid] [uniqueidentifier] NULL,
	[IsBoth] [int] NULL,
	[SubActiveGuid] [uniqueidentifier] NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[ShopNum1_ScoreOrderProduct]    Script Date: 09/23/2011 15:08:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ShopNum1_ScoreOrderProduct](
	[Guid] [uniqueidentifier] NOT NULL,
	[OrderInfoGuid] [uniqueidentifier] NOT NULL,
	[ProductGuid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](100) NOT NULL,
	[RepertoryNumber] [nvarchar](50) NOT NULL,
	[BuyNumber] [int] NOT NULL,
	[BuyScore] [int] NULL,
	[IsShipment] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreOrderProduct_IsShipment]  DEFAULT ((0)),
	[IsReal] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreOrderProduct_IsReal]  DEFAULT ((0)),
	[CreateTime] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_ScoreFreezeLog]    Script Date: 09/23/2011 15:03:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ScoreFreezeLog](
	[Guid] [uniqueidentifier] NOT NULL,
	[OperateType] [int] NOT NULL,
	[CurrentScore] [int] NOT NULL,
	[OperateScore] [int] NOT NULL,
	[LastOperateScore] [int] NOT NULL,
	[Date] [datetime] NOT NULL,
	[Memo] [nvarchar](250) NULL DEFAULT (NULL),
	[MemLoginID] [nvarchar](50) NOT NULL,
	[CreateUser] [nvarchar](50) NULL DEFAULT (NULL),
	[CreateTime] [datetime] NULL DEFAULT (NULL),
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_ScoreFreezeLog] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_AdvancePaymentFreezeLog]    Script Date: 09/23/2011 14:57:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_AdvancePaymentFreezeLog](
	[Guid] [uniqueidentifier] NOT NULL,
	[OperateType] [int] NOT NULL,
	[CurrentAdvancePayment] [decimal](18, 2) NOT NULL,
	[OperateMoney] [decimal](18, 2) NOT NULL,
	[LastOperateMoney] [decimal](18, 2) NOT NULL,
	[Date] [datetime] NOT NULL,
	[Memo] [nvarchar](250) NULL DEFAULT (NULL),
	[MemLoginID] [nvarchar](50) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_AdvancePaymentFreezeLog] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[ShopNum1_ScoreProduct]    Script Date: 09/23/2011 15:08:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ShopNum1_ScoreProduct](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](100) NOT NULL,
	[OriginalImge] [nvarchar](250) NOT NULL,
	[ThumbImage] [nvarchar](250) NULL,
	[SmallImage] [nvarchar](250) NULL,
	[RepertoryNumber] [nvarchar](50) NOT NULL,
	[Weight] [decimal](18, 2) NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_Weight]  DEFAULT ((0)),
	[RepertoryCount] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_RepertoryCount]  DEFAULT ((0)),
	[UnitName] [nvarchar](20) NOT NULL,
	[RepertoryAlertCount] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_RepertoryAlertCount]  DEFAULT ((0)),
	[ExchangeScore] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_SocreIntegral]  DEFAULT ((0)),
	[Brief] [nvarchar](250) NOT NULL,
	[Memo] [ntext] NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_Memo]  DEFAULT (NULL),
	[Detail] [ntext] NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_Detail]  DEFAULT (NULL),
	[ClickCount] [int] NULL,
	[CommentCount] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_CommentCount]  DEFAULT ((0)),
	[IsSaled] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_IsSaled]  DEFAULT ((0)),
	[IsBest] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_IsBest]  DEFAULT ((0)),
	[IsNew] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_IsNew]  DEFAULT ((1)),
	[IsHot] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_IsHot]  DEFAULT ((0)),
	[IsRecommend] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_IsRecommend]  DEFAULT ((0)),
	[IsReal] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_IsReal]  DEFAULT ((1)),
	[Title] [nvarchar](150) NULL,
	[Description] [nvarchar](150) NULL,
	[Keywords] [nvarchar](200) NULL,
	[OrderID] [int] NOT NULL,
	[ScoreProductCategoryID] [int] NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_IsDeleted]  DEFAULT ((0)),
	[SaleNumber] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_SaleNumber]  DEFAULT ((0)),
	[IsDownload] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProduct_IsDownload]  DEFAULT ((0))
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFlyProduce_Product]    Script Date: 09/23/2011 15:06:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_Product](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](100) NOT NULL,
	[RepertoryCount] [int] NOT NULL,
	[RepertoryNumber] [nvarchar](50) NOT NULL,
	[UnitName] [nvarchar](20) NOT NULL,
	[Weight] [decimal](18, 2) NOT NULL,
	[OrderID] [int] NOT NULL,
	[ReferCount] [int] NOT NULL,
	[Brief] [ntext] NULL,
	[Detail] [ntext] NULL,
	[ShopPrice] [decimal](18, 2) NOT NULL,
	[Keywords] [nvarchar](200) NULL,
	[Description] [ntext] NULL,
	[OriginalImage] [nvarchar](250) NULL,
	[ProductImage] [ntext] NULL,
	[ProductCategoryID] [int] NOT NULL,
	[IsSaled] [int] NOT NULL CONSTRAINT [DF__GroupFlyP__IsSal__29820FAE]  DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF__GroupFlyP__IsDel__2A7633E7]  DEFAULT ((0)),
	[IsAudit] [int] NOT NULL CONSTRAINT [DF__GroupFlyP__IsAud__2B6A5820]  DEFAULT ((1)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_AdvancePaymentModifyLog]    Script Date: 09/23/2011 14:57:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_AdvancePaymentModifyLog](
	[Guid] [uniqueidentifier] NOT NULL,
	[OperateType] [int] NOT NULL,
	[CurrentAdvancePayment] [decimal](18, 2) NOT NULL,
	[OperateMoney] [decimal](18, 2) NOT NULL,
	[LastOperateMoney] [decimal](18, 2) NOT NULL,
	[Date] [datetime] NOT NULL,
	[Memo] [nvarchar](250) NULL DEFAULT (NULL),
	[MemLoginID] [nvarchar](50) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_AdvancePaymentModifyLog] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_ScoreModifyLog]    Script Date: 09/23/2011 15:03:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ScoreModifyLog](
	[Guid] [uniqueidentifier] NOT NULL,
	[OperateType] [int] NOT NULL,
	[CurrentScore] [int] NOT NULL,
	[OperateScore] [int] NOT NULL,
	[LastOperateScore] [int] NOT NULL,
	[Date] [datetime] NOT NULL,
	[Memo] [nvarchar](250) NULL DEFAULT (NULL),
	[MemLoginID] [nvarchar](50) NOT NULL,
	[CreateUser] [nvarchar](50) NULL DEFAULT (NULL),
	[CreateTime] [datetime] NULL DEFAULT (NULL),
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_ScoreModifyLog] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_Announcement]    Script Date: 09/23/2011 14:57:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Announcement](
	[Guid] [uniqueidentifier] NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[Remark] [text] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Announcement] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_ActivePassword]    Script Date: 09/23/2011 14:56:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ActivePassword](
	[Guid] [uniqueidentifier] NOT NULL,
	[ActiveGuid] [uniqueidentifier] NOT NULL,
	[orderNum] [nvarchar](50) NOT NULL,
	[PWD] [nvarchar](50) NOT NULL,
	[isUsed] [int] NOT NULL CONSTRAINT [DF_GroupFly_ActivePassword_isUsed]  DEFAULT ((0)),
	[CreateTime] [datetime] NOT NULL,
	[UserTime] [datetime] NULL,
 CONSTRAINT [PK_GroupFly_ActivePassword] PRIMARY KEY CLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_SupplierCategory]    Script Date: 09/23/2011 15:03:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_SupplierCategory](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NULL,
	[Remarks] [ntext] NOT NULL,
	[OrderID] [int] NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
 CONSTRAINT [PK_GroupFly_SupplierCategory] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFlyProduce_EmailBook]    Script Date: 09/23/2011 15:05:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_EmailBook](
	[Guid] [uniqueidentifier] NOT NULL,
	[BookTypeName] [nvarchar](50) NOT NULL,
	[State] [int] NOT NULL DEFAULT ((0)),
	[EmailAddress] [nvarchar](50) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL,
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Article]    Script Date: 09/23/2011 14:57:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Article](
	[Guid] [uniqueidentifier] NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[ArticleCategoryID] [int] NOT NULL,
	[Publisher] [nvarchar](50) NOT NULL,
	[Source] [nvarchar](150) NULL,
	[Content] [ntext] NOT NULL,
	[Keywords] [nvarchar](200) NULL,
	[Description] [nvarchar](150) NULL,
	[IsShow] [int] NOT NULL DEFAULT ((1)),
	[IsAllowComment] [int] NOT NULL DEFAULT ((1)),
	[OrderID] [int] NOT NULL DEFAULT ((0)),
	[IsHot] [int] NOT NULL DEFAULT ((0)),
	[IsRecommend] [int] NOT NULL DEFAULT ((0)),
	[IsHead] [int] NOT NULL DEFAULT ((0)),
	[IsCanConfigure] [int] NOT NULL DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[CityCode] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_GroupFly_Article] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[ShopNum1_ScoreProductCategory]    Script Date: 09/23/2011 15:08:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ShopNum1_ScoreProductCategory](
	[ID] [int] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Keywords] [nvarchar](200) NULL CONSTRAINT [DF_ShopNum1_ScoreProductCategory_Keywords]  DEFAULT (NULL),
	[Description] [nvarchar](150) NULL CONSTRAINT [DF_ShopNum1_ScoreProductCategory_Description]  DEFAULT (NULL),
	[OrderID] [int] NOT NULL,
	[IsShow] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProductCategory_IsShow]  DEFAULT ((1)),
	[CategoryLevel] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProductCategory_CategoryLevel]  DEFAULT ((0)),
	[FatherID] [int] NOT NULL,
	[Family] [nvarchar](250) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProductCategory_IsDeleted]  DEFAULT ((0)),
	[IsDownload] [int] NOT NULL CONSTRAINT [DF_ShopNum1_ScoreProductCategory_IsDownload]  DEFAULT ((0))
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFlyProduce_EmailBookType]    Script Date: 09/23/2011 15:05:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_EmailBookType](
	[Guid] [uniqueidentifier] NOT NULL,
	[BookTypeName] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](200) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_SurveyOption]    Script Date: 09/23/2011 15:04:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_SurveyOption](
	[Guid] [uniqueidentifier] NOT NULL,
	[SurveyGuid] [nvarchar](50) NOT NULL,
	[Name] [nvarchar](50) NULL,
	[Count] [int] NULL DEFAULT ((0)),
	[OrderID] [int] NULL,
 CONSTRAINT [PK_GroupFly_SurveyOption] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_MemberAssignGroup]    Script Date: 09/23/2011 15:00:39 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MemberAssignGroup](
	[Guid] [uniqueidentifier] NOT NULL,
	[MemLoginID] [nvarchar](50) NOT NULL,
	[MemberGroupGuid] [uniqueidentifier] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
 CONSTRAINT [PK_GroupFly_MemberAssignGroup] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_EmailGropSend]    Script Date: 09/23/2011 15:05:16 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_EmailGropSend](
	[Guid] [uniqueidentifier] NOT NULL,
	[SendObject] [nvarchar](100) NOT NULL,
	[SendObjectEmail] [nvarchar](50) NOT NULL,
	[State] [int] NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[IsTime] [int] NOT NULL DEFAULT ((0)),
	[TimeSendTime] [datetime] NULL,
	[EmailGuid] [uniqueidentifier] NOT NULL,
	[EmailTitle] [nvarchar](50) NOT NULL,
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_MemberGroup]    Script Date: 09/23/2011 15:00:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MemberGroup](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](500) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_MemberGroup] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_SurveyTheme]    Script Date: 09/23/2011 15:04:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_SurveyTheme](
	[Guid] [uniqueidentifier] NOT NULL,
	[Title] [nvarchar](100) NULL,
	[StartTime] [datetime] NULL,
	[EndTime] [datetime] NULL,
	[SimplyOrMultiCheck] [int] NULL,
	[Static] [nvarchar](250) NULL,
	[Count] [int] NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_SurveyTheme] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_EmailType]    Script Date: 09/23/2011 15:05:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_EmailType](
	[Guid] [uniqueidentifier] NOT NULL,
	[TypeName] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](150) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Supplier]    Script Date: 09/23/2011 15:03:55 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Supplier](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Address] [nvarchar](150) NULL,
	[Abscissa] [nvarchar](50) NULL,
	[Ordinate] [nvarchar](50) NULL,
	[Contact] [nvarchar](50) NULL,
	[ContactTel] [nvarchar](50) NULL,
	[Fax] [nvarchar](50) NULL,
	[Site] [nvarchar](50) NULL,
	[CompanyLogo] [nvarchar](50) NULL,
	[Email] [nvarchar](50) NULL,
	[PrimeProducts] [nvarchar](300) NOT NULL,
	[BusinessCulture] [nvarchar](200) NULL,
	[BusinessEntity] [nvarchar](50) NULL,
	[CompanyInfo] [ntext] NULL,
	[Remark] [nvarchar](200) NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsDel__607D3EDD]  DEFAULT ((0)),
	[CategoryGuid] [uniqueidentifier] NULL,
	[AddressImage] [nvarchar](250) NULL,
	[ImageLink] [nvarchar](250) NULL,
	[UserName] [nvarchar](50) NULL,
	[UserPwd] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_GroupFly_Supplier] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_MemberMessage]    Script Date: 09/23/2011 15:00:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MemberMessage](
	[Guid] [uniqueidentifier] NOT NULL,
	[IsRead] [int] NULL DEFAULT ((0)),
	[MessageInfoGuid] [nvarchar](50) NULL,
	[ReceiveMemLoginID] [nvarchar](50) NULL,
	[SendMemLoginID] [nvarchar](50) NULL,
	[ReceiveIsDeleted] [int] NULL DEFAULT ((0)),
	[SendIsDeleted] [int] NULL DEFAULT ((0)),
	[ReceiveMemType] [int] NULL,
	[SendMemType] [int] NULL,
 CONSTRAINT [PK_GroupFly_MemberMessage] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_Unit]    Script Date: 09/23/2011 15:04:18 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Unit](
	[Guid] [uniqueidentifier] NOT NULL,
	[Code] [nvarchar](10) NOT NULL,
	[Name] [nvarchar](20) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Unit] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_Link]    Script Date: 09/23/2011 15:05:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_Link](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[ImgADD] [nvarchar](250) NOT NULL,
	[Href] [nvarchar](250) NOT NULL,
	[ImgType] [int] NOT NULL DEFAULT ((0)),
	[OrderID] [int] NOT NULL,
	[LinkType] [int] NOT NULL DEFAULT ((0)),
	[Description] [nvarchar](150) NOT NULL,
	[Memo] [nvarchar](250) NOT NULL,
	[IsShow] [int] NOT NULL DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_ArticleCategory]    Script Date: 09/23/2011 14:57:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ArticleCategory](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Keywords] [nvarchar](200) NOT NULL,
	[Description] [nvarchar](150) NOT NULL,
	[OrderID] [int] NOT NULL DEFAULT ((0)),
	[IsShow] [int] NOT NULL DEFAULT ((1)),
	[CategoryLevel] [int] NOT NULL DEFAULT ((0)),
	[FatherID] [int] NOT NULL,
	[Family] [nvarchar](250) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_ArticleCategory] PRIMARY KEY NONCLUSTERED 
(
	[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
/****** Object:  Table [dbo].[GroupFly_User]    Script Date: 09/23/2011 15:04:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_User](
	[Guid] [uniqueidentifier] NOT NULL,
	[LoginId] [nvarchar](50) NOT NULL,
	[Pwd] [nvarchar](50) NOT NULL,
	[RealName] [nvarchar](50) NOT NULL,
	[Sex] [int] NOT NULL,
	[Age] [int] NOT NULL DEFAULT ((0)),
	[WorkNumber] [nvarchar](50) NOT NULL DEFAULT ((0)),
	[Email] [nvarchar](100) NULL,
	[Telephone] [nvarchar](100) NULL,
	[IsForbid] [int] NOT NULL DEFAULT ((0)),
	[LoginTimes] [int] NOT NULL DEFAULT ((0)),
	[LastLoginTime] [datetime] NULL,
	[LastLoginIP] [nvarchar](20) NULL,
	[LastModifyPasswordTime] [datetime] NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[DeptGuid] [uniqueidentifier] NULL,
 CONSTRAINT [PK_GroupFly_User] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_MessageInfo]    Script Date: 09/23/2011 15:01:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MessageInfo](
	[Guid] [uniqueidentifier] NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[Content] [ntext] NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[Type] [nvarchar](50) NOT NULL CONSTRAINT [DF__GroupFly_M__Type__7B663F43]  DEFAULT ((0))
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Member]    Script Date: 09/23/2011 15:00:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Member](
	[Guid] [uniqueidentifier] NOT NULL,
	[MemLoginID] [nvarchar](50) NOT NULL,
	[Email] [nvarchar](100) NOT NULL,
	[Pwd] [nvarchar](50) NOT NULL,
	[PayPwd] [nvarchar](50) NULL,
	[Sex] [int] NOT NULL CONSTRAINT [DF__GroupFly_Me__Sex__45FE52CB]  DEFAULT ((0)),
	[Age] [int] NOT NULL CONSTRAINT [DF__GroupFly_Me__Age__46F27704]  DEFAULT ((0)),
	[Birthday] [datetime] NULL CONSTRAINT [DF__GroupFly___Birth__47E69B3D]  DEFAULT (NULL),
	[CreditMoney] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___Credi__48DABF76]  DEFAULT ((0)),
	[Photo] [nvarchar](250) NULL CONSTRAINT [DF__GroupFly___Photo__49CEE3AF]  DEFAULT (NULL),
	[RealName] [nvarchar](50) NULL CONSTRAINT [DF__GroupFly___RealN__4AC307E8]  DEFAULT (NULL),
	[Area] [nvarchar](50) NULL CONSTRAINT [DF__GroupFly_M__Area__4BB72C21]  DEFAULT (NULL),
	[Vocation] [nvarchar](100) NULL CONSTRAINT [DF__GroupFly___Vocat__4CAB505A]  DEFAULT (NULL),
	[Address] [nvarchar](250) NULL CONSTRAINT [DF__GroupFly___Addre__4D9F7493]  DEFAULT (NULL),
	[Postalcode] [nvarchar](20) NULL CONSTRAINT [DF__GroupFly___Posta__4E9398CC]  DEFAULT (NULL),
	[OfficeTel] [nvarchar](20) NULL CONSTRAINT [DF__GroupFly___Offic__4F87BD05]  DEFAULT (NULL),
	[HomeTel] [nvarchar](20) NULL CONSTRAINT [DF__GroupFly___HomeT__507BE13E]  DEFAULT (NULL),
	[Mobile] [nvarchar](20) NULL CONSTRAINT [DF__GroupFly___Mobil__51700577]  DEFAULT (NULL),
	[Fax] [nvarchar](20) NULL CONSTRAINT [DF__GroupFly_Me__Fax__526429B0]  DEFAULT (NULL),
	[QQ] [nvarchar](15) NULL CONSTRAINT [DF__GroupFly_Mem__QQ__53584DE9]  DEFAULT (NULL),
	[Msn] [nvarchar](50) NULL CONSTRAINT [DF__GroupFly_Me__Msn__544C7222]  DEFAULT (NULL),
	[CardType] [nvarchar](20) NULL CONSTRAINT [DF__GroupFly___CardT__5540965B]  DEFAULT (NULL),
	[CardNum] [nvarchar](50) NULL CONSTRAINT [DF__GroupFly___CardN__5634BA94]  DEFAULT (NULL),
	[WebSite] [nvarchar](250) NULL CONSTRAINT [DF__GroupFly___WebSi__5728DECD]  DEFAULT (NULL),
	[Question] [nvarchar](50) NULL CONSTRAINT [DF__GroupFly___Quest__581D0306]  DEFAULT (NULL),
	[Answer] [nvarchar](50) NULL CONSTRAINT [DF__GroupFly___Answe__5911273F]  DEFAULT (NULL),
	[RegDate] [datetime] NULL CONSTRAINT [DF__GroupFly___RegDa__5A054B78]  DEFAULT (NULL),
	[LastLoginDate] [datetime] NULL CONSTRAINT [DF__GroupFly___LastL__5AF96FB1]  DEFAULT (NULL),
	[LastLoginIP] [nvarchar](25) NULL CONSTRAINT [DF__GroupFly___LastL__5BED93EA]  DEFAULT (NULL),
	[LoginTime] [int] NOT NULL CONSTRAINT [DF__GroupFly___Login__5CE1B823]  DEFAULT ((0)),
	[AdvancePayment] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___Advan__5DD5DC5C]  DEFAULT ((0)),
	[Score] [int] NOT NULL CONSTRAINT [DF__GroupFly___Score__5ECA0095]  DEFAULT ((0)),
	[RankScore] [int] NOT NULL CONSTRAINT [DF__GroupFly___RankS__5FBE24CE]  DEFAULT ((0)),
	[LockAdvancePayment] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___LockA__60B24907]  DEFAULT ((0)),
	[LockSocre] [int] NOT NULL CONSTRAINT [DF__GroupFly___LockS__61A66D40]  DEFAULT ((0)),
	[CostMoney] [decimal](18, 2) NOT NULL CONSTRAINT [DF__GroupFly___CostM__629A9179]  DEFAULT ((0)),
	[MemberRankGuid] [uniqueidentifier] NULL,
	[TradeCount] [int] NOT NULL CONSTRAINT [DF__GroupFly___Trade__638EB5B2]  DEFAULT ((0)),
	[IsForbid] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsFor__6482D9EB]  DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsDel__6576FE24]  DEFAULT ((0)),
	[MemberCard] [nvarchar](50) NULL,
	[ExpirationDate] [datetime] NULL,
	[UID] [int] NOT NULL CONSTRAINT [DF_GroupFly_Member_UID]  DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Member] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_advice]    Script Date: 09/23/2011 14:57:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_advice](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Contactby] [nvarchar](50) NOT NULL,
	[Remark] [nvarchar](500) NOT NULL,
	[Ip] [nvarchar](50) NOT NULL,
	[SendTime] [datetime] NOT NULL,
	[IsAudit] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsAud__5D16C24D]  DEFAULT ((0)),
	[ReplyUser] [nvarchar](50) NULL,
	[ReplyTime] [datetime] NULL,
	[ReplyContent] [ntext] NULL,
	[IsReply] [int] NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL CONSTRAINT [DF__GroupFly___IsDel__5E0AE686]  DEFAULT ((0)),
	[Content] [nvarchar](1800) NULL,
 CONSTRAINT [PK_GroupFly_advice] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_MemberRank]    Script Date: 09/23/2011 15:01:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MemberRank](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Score] [int] NOT NULL DEFAULT ((0)),
	[PayoutCount] [int] NOT NULL DEFAULT ((0)),
	[PayoutMoney] [decimal](18, 2) NOT NULL DEFAULT ((0)),
	[Discount] [decimal](18, 2) NOT NULL DEFAULT ((0)),
	[IsDefault] [int] NOT NULL DEFAULT ((0)),
	[Memo] [nvarchar](250) NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[ISVIP] [int] NOT NULL CONSTRAINT [DF_GroupFly_MemberRank_ISVIP]  DEFAULT ((0)),
	[MemberShipfee] [decimal](18, 2) NULL,
 CONSTRAINT [PK_GroupFly_MemberRank] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_News]    Script Date: 09/23/2011 15:06:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_News](
	[Guid] [uniqueidentifier] NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[NewsCategoryID] [int] NOT NULL,
	[Publisher] [nvarchar](50) NOT NULL,
	[Source] [nvarchar](150) NULL,
	[Content] [ntext] NOT NULL,
	[Keywords] [nvarchar](200) NULL,
	[Description] [nvarchar](150) NULL,
	[IsShow] [int] NOT NULL DEFAULT ((0)),
	[OrderID] [int] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[TitleImage] [nvarchar](250) NULL,
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_ArticleComment]    Script Date: 09/23/2011 14:57:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ArticleComment](
	[Guid] [uniqueidentifier] NOT NULL,
	[ArticleGuid] [uniqueidentifier] NOT NULL,
	[MemLoginID] [nvarchar](50) NULL,
	[Title] [nvarchar](200) NULL,
	[Rank] [int] NOT NULL,
	[SendTime] [datetime] NOT NULL,
	[Content] [ntext] NULL,
	[IPAddress] [nvarchar](50) NOT NULL,
	[ReplyUser] [nvarchar](50) NULL,
	[ReplyTime] [datetime] NULL,
	[ReplyContent] [ntext] NULL,
	[IsAudit] [int] NOT NULL DEFAULT ((0)),
	[IsReply] [int] NOT NULL DEFAULT ((0)),
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_ArticleComment] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFlyProduce_OnLineService]    Script Date: 09/23/2011 15:06:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_OnLineService](
	[Guid] [uniqueidentifier] NOT NULL,
	[Type] [nvarchar](50) NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[ServiceAccount] [nvarchar](25) NOT NULL,
	[Location] [nvarchar](250) NULL,
	[IsShow] [int] NOT NULL DEFAULT ((1)),
	[OrderID] [int] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_SupplyDemand]    Script Date: 09/23/2011 15:04:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_SupplyDemand](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Remarks] [ntext] NOT NULL,
	[Ip] [nvarchar](50) NULL,
	[SendTime] [datetime] NULL,
	[IsAudit] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsAud__6541F3FA]  DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL,
	[IsReply] [int] NULL,
	[ReplyUser] [nvarchar](50) NULL,
	[ReplyTime] [datetime] NULL,
	[ReplyContent] [ntext] NULL,
 CONSTRAINT [PK_GroupFly_SupplyDemand] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_UserDefinedColumn]    Script Date: 09/23/2011 15:04:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_UserDefinedColumn](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[LinkAddress] [nvarchar](150) NOT NULL,
	[ShowLocation] [nvarchar](20) NOT NULL,
	[IfShow] [int] NOT NULL DEFAULT ((0)),
	[IfOpen] [int] NOT NULL DEFAULT ((0)),
	[Remark] [nvarchar](200) NULL,
	[OrderID] [int] NOT NULL DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[IsHot] [int] NULL CONSTRAINT [DF_GroupFly_UserDefinedColumn_IsHot]  DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_UserDefinedColumn] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_CommondRcord]    Script Date: 09/23/2011 14:58:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_CommondRcord](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NULL,
	[CommondID] [nvarchar](50) NULL,
	[IsBuy] [int] NOT NULL DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL,
 CONSTRAINT [PK_GroupFly_CommondRcord] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_ProductComment]    Script Date: 09/23/2011 15:06:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_ProductComment](
	[Guid] [uniqueidentifier] NOT NULL,
	[ProductGuid] [uniqueidentifier] NOT NULL,
	[MemLoginID] [nvarchar](50) NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[SendTime] [datetime] NOT NULL,
	[Content] [ntext] NOT NULL,
	[ISDeleted] [int] NOT NULL DEFAULT ((0)),
	[IsAudit] [int] NOT NULL DEFAULT ((1)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL,
	[IPAddress] [nvarchar](50) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_EmailGroupSend]    Script Date: 09/23/2011 14:59:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_EmailGroupSend](
	[Guid] [uniqueidentifier] NOT NULL,
	[SendObject] [nvarchar](100) NOT NULL,
	[SendObjectEmail] [nvarchar](max) NOT NULL,
	[EmailTitle] [nvarchar](50) NOT NULL,
	[State] [int] NOT NULL CONSTRAINT [DF__GroupFly___State__1A1FD08D]  DEFAULT ((0)),
	[CreateTime] [datetime] NOT NULL,
	[IsTime] [int] NOT NULL CONSTRAINT [DF__GroupFly___IsTim__1B13F4C6]  DEFAULT ((0)),
	[TimeSendTime] [datetime] NULL,
	[EmailGuid] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_GroupFly_EmailGroupSend] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_MMS]    Script Date: 09/23/2011 15:01:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MMS](
	[Guid] [uniqueidentifier] NOT NULL,
	[TypeName] [nvarchar](50) NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[Remark] [ntext] NOT NULL,
	[Description] [nvarchar](150) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_MMS] PRIMARY KEY NONCLUSTERED 
(
	[Guid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFly_Dept]    Script Date: 09/23/2011 14:58:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Dept](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[ShortName] [nvarchar](20) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Dept] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFlyProduce_UserDefinedColumn]    Script Date: 09/23/2011 15:07:16 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_UserDefinedColumn](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[LinkAddress] [nvarchar](150) NOT NULL,
	[ShowLocation] [nvarchar](20) NOT NULL,
	[IsShow] [int] NOT NULL DEFAULT ((1)),
	[IfOpen] [int] NOT NULL DEFAULT ((1)),
	[Remark] [nvarchar](200) NOT NULL,
	[OrderID] [int] NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[GroupFlyProduce_OperateLog]    Script Date: 09/23/2011 15:06:18 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[GroupFlyProduce_OperateLog](
	[Guid] [uniqueidentifier] NOT NULL,
	[Record] [nvarchar](250) NOT NULL,
	[OperatorID] [char](50) NOT NULL,
	[IP] [nvarchar](50) NOT NULL,
	[PageName] [nvarchar](150) NOT NULL,
	[Date] [datetime] NOT NULL,
	[ProduceMemLoginID] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  StoredProcedure [dbo].[PrintProc]    Script Date: 09/23/2011 14:55:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create PROC [dbo].[PrintProc]
	@proname varchar(100),
	@returntype varchar(100)
AS
	DECLARE @strreturntype varchar(100),@strreturnname varchar(100)
	IF(@returntype = 'int')
	BEGIN
		SET @strreturntype = 'int '
		SET @strreturnname = 'RunNonQuery'
	END
	ELSE IF(@returntype = 'ds')
	BEGIN
		SET @strreturntype = 'DataSet '
		SET @strreturnname = 'RunProcedureReturnDataSet'
	END
	ELSE
	BEGIN
		SET @strreturntype = 'DataTable '
		SET @strreturnname = 'RunProcedureReturnDataTable'
	END

	DECLARE @parameters varchar(1000)
	DECLARE @parametersname varchar(100),@rowscount varchar(4)
	SELECT @rowscount = COUNT(1) FROM syscolumns WHERE id = (SELECT id FROM sysobjects WHERE name = @proname)
	IF(CAST(@rowscount as int) > 0)
	BEGIN
		SET @parameters = 'public '+ @strreturntype + REVERSE(SUBSTRING(REVERSE(@proname),1,CHARINDEX('_',REVERSE(@proname)) - 1)) + '('
		DECLARE mycursor CURSOR FOR
		SELECT [name] FROM syscolumns WHERE id = (SELECT id FROM sysobjects WHERE name = @proname)
		OPEN mycursor
		FETCH mycursor INTO @parametersname
		WHILE @@fetch_status = 0
			BEGIN
				SET @parameters = @parameters + 'string ' + LOWER(REPLACE(@parametersname,'@','')) + ', '	
				FETCH mycursor INTO @parametersname
			END
		CLOSE mycursor
		SET @parameters = SUBSTRING(@parameters,1,LEN(@parameters) - 1) + ')'
		PRINT @parameters
		PRINT '{'
		PRINT '    string[] paraName = new string[' + @rowscount + '];'
		PRINT '    string[] paraValue = new string[' + @rowscount + '];'
		DECLARE @index int
		SET @index = 0
		OPEN mycursor
		FETCH mycursor INTO @parametersname
		WHILE @@fetch_status = 0
			BEGIN
				PRINT '    paraName['+ CAST(@index as varchar(4)) +'] = "' + LOWER(@parametersname) + '";'
				PRINT '    paraValue['+ CAST(@index as varchar(4)) +'] = ' + LOWER(REPLACE(@parametersname,'@','')) + ';'
				SET @index = @index + 1
				FETCH mycursor INTO @parametersname
			END
		CLOSE mycursor
		PRINT '    return DatabaseExcetue.'+ @strreturnname +'("'+ @proname +'", paraName, paraValue);'
		PRINT '}'
		DEALLOCATE mycursor
	END
	ELSE
	BEGIN
		PRINT 'public '+ @strreturntype + REVERSE(SUBSTRING(REVERSE(@proname),1,CHARINDEX('_',REVERSE(@proname)) - 1)) + '()'
		PRINT '{'
		PRINT '    return DatabaseExcetue.'+@strreturnname+'("'+ @proname +'");'
		PRINT '}'
	END
GO
/****** Object:  Table [dbo].[GroupFly_DispatchItem]    Script Date: 09/23/2011 14:58:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_DispatchItem](
	[Guid] [uniqueidentifier] NOT NULL,
	[ItemName] [nvarchar](50) NOT NULL,
	[ItemCode] [nvarchar](50) NOT NULL,
	[ItemValue] [decimal](18, 2) NOT NULL,
	[DispatchMode] [uniqueidentifier] NOT NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_DispatchItem] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_MemberMoneyBack]    Script Date: 09/23/2011 15:00:55 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_MemberMoneyBack](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[CommondID] [nvarchar](50) NULL,
	[ActiveGuid] [uniqueidentifier] NOT NULL,
	[BackMoney] [decimal](18, 2) NULL,
	[BackScore] [int] NULL,
	[SureTime] [datetime] NULL,
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL,
 CONSTRAINT [PK_GroupFly_MemberMoneyBack] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_Link]    Script Date: 09/23/2011 15:00:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_Link](
	[Guid] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NULL,
	[ImgADD] [nvarchar](250) NULL,
	[Href] [nvarchar](250) NULL,
	[ImgType] [int] NULL DEFAULT ((0)),
	[OrderID] [int] NULL DEFAULT ((0)),
	[LinkType] [int] NULL DEFAULT ((0)),
	[Description] [nvarchar](250) NULL,
	[Memo] [nvarchar](150) NULL,
	[IsShow] [int] NOT NULL DEFAULT ((0)),
	[CreateUser] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[ModifyUser] [nvarchar](50) NULL,
	[ModifyTime] [datetime] NULL,
	[IsDeleted] [int] NULL DEFAULT ((0)),
 CONSTRAINT [PK_GroupFly_Link] PRIMARY KEY NONCLUSTERED 
(
	[Guid] 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
/****** Object:  Table [dbo].[GroupFly_ImagePath]    Script Date: 09/23/2011 15:00:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GroupFly_ImagePath](
	[OriginalImagePath] [nvarchar](250) NOT NULL,
	[OtherImagePath] [nvarchar](250) NOT NULL,
	[CreateUser] [nvarchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[ModifyUser] [nvarchar](50) NOT NULL,
	[ModifyTime] [datetime] NOT NULL,
	[IsDeleted] [int] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetRecruitmentDetails]    Script Date: 09/23/2011 14:55:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetRecruitmentDetails] 
	@guid uniqueidentifier
AS
SELECT [Guid]
	  ,[PositionName]
	  ,[WorkPlace]
	  ,[RecruitingNumber]
	  ,[Salary]
	  ,[RecruitingTime]
	  ,[JobDescribtion]
	  ,[JobRequirements]
	  ,[RecruitmentComplay]
	  ,[Contact]
	  ,[Phone]
	  ,[Address]
	  ,[Postcode]
	  ,[Email]
	  ,[IsShow]
	  ,[RecruitingEndTime]
	  FROM [dbo].[GroupFlyProduce_Recruitment]
	  WHERE [Guid]=@guid AND IsShow=0
	  ORDER BY RecruitingTime DESC
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetRecruitmentList]    Script Date: 09/23/2011 14:55:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetRecruitmentList]
    @supplierID nvarchar(50) 
AS
	SELECT [Guid]
  ,[PositionName]
  ,[WorkPlace]
  ,[RecruitingNumber]
  ,[Salary]
  ,[RecruitingTime]
  ,[JobDescribtion]
  ,[JobRequirements]
  ,[RecruitmentComplay]
  ,[Contact]
  ,[Phone]
  ,[Address]
  ,[Postcode]
  ,[Email]
  ,[IsShow]
  ,[RecruitingEndTime]
  FROM [dbo].[GroupFlyProduce_Recruitment]
  WHERE ProduceMemLoginID=@supplierID and IsShow=0
  ORDER BY RecruitingTime DESC
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetSupplyDemandList]    Script Date: 09/23/2011 14:55:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetSupplyDemandList]
@supplierID nvarchar(50)
AS
	SELECT [ID]
		  ,[Guid]
		  ,[Title]
		  ,[Content]
		  ,[TradeType]
		  ,[Description]
		  ,[Keywords]
		  ,[ReleaseTime]
		  ,[ValidTime]
		  ,[OrderID]
		  ,[IsAudit]
	  FROM [dbo].[GroupFlyProduce_SupplyDemand]
	WHERE IsAudit = 1 and ProduceMemLoginID=@supplierID
	ORDER BY OrderID DESC
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetSupplyCategoryInfo]    Script Date: 09/23/2011 14:55:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetSupplyCategoryInfo] 
	@Guid uniqueidentifier
AS
	SELECT [ID]
		  ,[Guid]
		  ,[Title]
		  ,[Content]
		  ,[TradeType]
		  ,[Description]
		  ,[Keywords]
		  ,[ReleaseTime]
		  ,[ValidTime]
		  ,[OrderID]
		  ,[IsAudit]
          ,[ProduceMemLoginID]
	  FROM [GroupFlyProduce_SupplyDemand]
	 WHERE [Guid]=@Guid
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_SearchMessage]    Script Date: 09/23/2011 14:55:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[Pro_GroupFlyProduce_SearchMessage]
    @supplierID nvarchar(50)
AS
BEGIN
	   select Title,
	Content,
	SendTime,
	ReplayContent 
	from GroupFlyProduce_MessageBoard 
	where
    ProduceMemLoginID=@supplierID AND
    IsShow=1 and IsAudit=1  order by SendTime Desc
END
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetEnterpriseResources]    Script Date: 09/23/2011 14:55:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--诚信档案
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetEnterpriseResources]
	@showCount int,
    @supplierID nvarchar(50)
AS
	IF(@showCount <>0)
	BEGIN
			SELECT TOP(@showCount)  [ID]
		  ,[Guid]
		  ,[Cardnum]
		  ,[CardType]
		  ,[CardName]
		  ,[CardDate]
		  ,[CardDepartment]
		  ,[CardContent]
		  ,[CardImage]
		  ,[CreateUser]
		  ,[CreateTime]
		  ,[ModifyUser]
		  ,[ModifyTime]
		  ,[IsDeleted]
		FROM [dbo].[GroupFlyProduce_EnterpriseResources]
        WHERE ProduceMemLoginID=@supplierID
	END
	ELSE
	BEGIN
			SELECT [ID]
		  ,[Guid]
		  ,[Cardnum]
		  ,[CardType]
		  ,[CardName]
		  ,[CardDate]
		  ,[CardDepartment]
		  ,[CardContent]
		  ,[CardImage]
		  ,[CreateUser]
		  ,[CreateTime]
		  ,[ModifyUser]
		  ,[ModifyTime]
		  ,[IsDeleted]
		FROM [dbo].[GroupFlyProduce_EnterpriseResources]
        WHERE ProduceMemLoginID=@supplierID
	END
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetNewsCategoryList]    Script Date: 09/23/2011 14:55:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*新闻分类*/
CREATE PROCEDURE [dbo].[Pro_GroupFlyProduce_GetNewsCategoryList]
    @supplierID nvarchar(50) 
AS
BEGIN
   select ID,
		Name
		from dbo.GroupFlyProduce_NewsCategory 
		where 
        ProduceMemLoginID=@supplierID AND
        isshow=1
		order by OrderID Desc
END
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetProductInfo]    Script Date: 09/23/2011 14:55:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetProductInfo]
	@Guid uniqueidentifier
AS
	SELECT a.Guid,a.Name,a.Detail,a.OriginalImage,a.ShopPrice,a.Detail
	,b.Name as ClassName,b.ID as ClassGuid
	from GroupFlyProduce_Product as a,GroupFlyProduce_ProductCategory as b
	where a.ProductCategoryID = b.ID and a.Guid = @Guid
	and IsAudit = 1
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetProductCateGory]    Script Date: 09/23/2011 14:55:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/**产品分类**/
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetProductCateGory]
@supplierID nvarchar(50)
AS
	SELECT 
		ID,
		Name,
		isShow 
		FROM 
		GroupFlyProduce_ProductCateGory
		WHERE ProduceMemLoginID = @supplierID and
		isShow=1  
		ORDER BY ModifyTime DESC
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetProductCategoryList]    Script Date: 09/23/2011 14:55:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/**IsShow 为显示**/
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetProductCategoryList]
@supplierID nvarchar(50)
AS
	SELECT ID,[Name]
	FROM GroupFlyProduce_ProductCategory
	WHERE ProduceMemLoginID = @supplierID AND	
	IsDeleted = 0 AND IsShow =1  
	ORDER BY OrderID DESC
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetLinkListImage]    Script Date: 09/23/2011 14:55:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/**图片友情链接**/
CREATE PROCEDURE  [dbo].[Pro_GroupFlyProduce_GetLinkListImage] 
      @showCount int,
      @supplierID nvarchar(50)
AS
   SELECT  top(@showCount)
		[Guid]
      ,[Name]
      ,[ImgADD]
      ,[Href]
      ,[ImgType]
--    ,[OrderID]
--    ,[LinkType]
--    ,[Description]
--    ,[Memo]
--    ,[IsSho]
--    ,[CreateUser]
--    ,[CreateTime]
--    ,[ModifyUser]
--    ,[ModifyTime]
--    ,[IsDeleted]
--    ,[AgentLoginID]
  FROM GroupFlyProduce_Link
 WHERE ProduceMemLoginID=@supplierID AND
 LinkType=1 AND IsShow=1 ORDER BY OrderID DESC
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetLinkList]    Script Date: 09/23/2011 14:55:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/**文字友情链接**/
CREATE PROCEDURE  [dbo].[Pro_GroupFlyProduce_GetLinkList]
      @showCount int,
      @supplierID nvarchar(50)
AS
   SELECT top(@showCount)
		[Guid]
        ,[Name]
--      ,[ImgADD]
        ,[Href]
--      ,[ImgType]
--      ,[OrderID]
--      ,[LinkType]
--      ,[Description]
--      ,[Memo]
--      ,[IsShow] 
--      ,[CreateUser]
--      ,[CreateTime]
--      ,[ModifyUser]
--      ,[ModifyTime]
--      ,[IsDeleted]
  FROM GroupFlyProduce_Link
 WHERE  ProduceMemLoginID=@supplierID AND
 LinkType=0 AND IsShow=1 ORDER BY OrderID DESC
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetNewsList]    Script Date: 09/23/2011 14:55:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[Pro_GroupFlyProduce_GetNewsList]
    @NewsCategoryID int,
    @supplierID nvarchar(50) 
AS
 if(@NewsCategoryID='')
  BEGIN 
     SELECT 
		Guid,
		Title,
		Publisher,
		CreateTime 
		from GroupFlyProduce_News 
		where 
        ProduceMemLoginID=@supplierID AND        
        IsShow=1 
		order by OrderID desc
  END
  else
  Begin
	SELECT 
		Guid,
		Title,
		Publisher,
		CreateTime  
		from GroupFlyProduce_News 
		where
        ProduceMemLoginID=@supplierID AND IsShow=1 
        and NewsCategoryID=@NewsCategoryID  
		order by OrderID desc
  END
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetNewsMeta]    Script Date: 09/23/2011 14:55:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE proc [dbo].[Pro_GroupFlyProduce_GetNewsMeta]
   @guid uniqueidentifier 
AS
Begin
SELECT 
       [Title]     
      ,[Description]
      ,[Keywords]
  FROM [dbo].[GroupFlyProduce_News]
 WHERE Guid=@guid
end
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetNewsListSmall]    Script Date: 09/23/2011 14:55:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[Pro_GroupFlyProduce_GetNewsListSmall]
	@showCount int,
    @supplierID nvarchar(50) 
AS
BEGIN
   	select 
    top(@showCount) 
Guid,
title,
CreateTime 
from dbo.GroupFlyProduce_News 
where ProduceMemLoginID=@supplierID
ORDER BY OrderID DESC
END
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetNewsDetails]    Script Date: 09/23/2011 14:55:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE  [dbo].[Pro_GroupFlyProduce_GetNewsDetails]
 @Guids uniqueidentifier
AS
BEGIN
  select Guid,Title,Publisher,Source,Content,CreateTime from dbo.GroupFlyProduce_News where Guid=@Guids 
END
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetProductComment]    Script Date: 09/23/2011 14:55:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--产品评论
CREATE PROC [dbo].[Pro_GroupFlyProduce_GetProductComment]
	@ProductGuid uniqueidentifier
AS
	SELECT MemLoginID, Title,SendTime,[Content]
	FROM GroupFlyProduce_ProductComment
	WHERE ProductGuid = @ProductGuid 
	AND IsDeleted = 0
	AND IsAudit = 1
	ORDER BY SendTime DESC
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_AddProductComment]    Script Date: 09/23/2011 14:55:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--添加产品评论
CREATE PROC [dbo].[Pro_GroupFlyProduce_AddProductComment]
	@guid uniqueidentifier,
	@ProductGuid uniqueidentifier,
	@MemLoginID nvarchar(50),
	@Title nvarchar(50),
	@Content ntext,
    @supplierID nvarchar(50)
AS
	INSERT INTO GroupFlyProduce_ProductComment([Guid],ProductGuid,MemLoginID,Title,SendTime,[Content],ProduceMemLoginID)
	VALUES(@guid,@ProductGuid,@MemLoginID,@Title,getdate(),@Content,@supplierID)
GO
/****** Object:  StoredProcedure [dbo].[Pro_GroupFlyProduce_GetMiddleNavigation]    Script Date: 09/23/2011 14:55:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/**中部导航**/
CREATE PROCEDURE  [dbo].[Pro_GroupFlyProduce_GetMiddleNavigation]
      @showCount int,
      @supplierID nvarchar(50) 
AS
BEGIN
 SELECT  top(@showCount) 
		   [Guid]
		  ,[Name]
		  ,[LinkAddress]
		  ,[ShowLocation]
		  ,[IsShow]
		  ,[IfOpen]
		  ,[Remark]
		  ,[OrderID]
		  ,[CreateUser]
		  ,[CreateTime]
		  ,[ModifyUser]
		  ,[ModifyTime]
		  ,[IsDeleted]
  FROM [dbo].[GroupFlyProduce_UserDefinedColumn]
 WHERE  
ProduceMemLoginID=@supplierID AND
ShowLocation=0 AND IsShow=1 ORDER BY OrderID 
END
GO
