/****** Object:  Database GatherWealth_DayAccount    Script Date: 2019/3/5 7:43:59 ******/
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'GatherWealth_DayAccount')
	DROP DATABASE [GatherWealth_DayAccount]
GO

CREATE DATABASE [GatherWealth_DayAccount]  ON (NAME = N'GatherWealth_DayAccount_Data', FILENAME = N'D:\GatherWealth\DB\GatherWealth_DayAccount_Data.MDF' , SIZE = 7, FILEGROWTH = 10%) LOG ON (NAME = N'GatherWealth_DayAccount_Log', FILENAME = N'D:\GatherWealth\DB\GatherWealth_DayAccount_Log.LDF' , SIZE = 1, FILEGROWTH = 10%)
 COLLATE Chinese_PRC_CI_AS
GO

exec sp_dboption N'GatherWealth_DayAccount', N'autoclose', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'bulkcopy', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'trunc. log', N'true'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'torn page detection', N'true'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'read only', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'dbo use', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'single', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'autoshrink', N'true'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'ANSI null default', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'recursive triggers', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'ANSI nulls', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'concat null yields null', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'cursor close on commit', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'default to local cursor', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'quoted identifier', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'ANSI warnings', N'false'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'auto create statistics', N'true'
GO

exec sp_dboption N'GatherWealth_DayAccount', N'auto update statistics', N'true'
GO

if( (@@microsoftversion / power(2, 24) = 8) and (@@microsoftversion & 0xffff >= 724) )
	exec sp_dboption N'GatherWealth_DayAccount', N'db chaining', N'false'
GO

use [GatherWealth_DayAccount]
GO

/****** Object:  Stored Procedure dbo.ExecSql    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ExecSql]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[ExecSql]
GO

/****** Object:  Stored Procedure dbo.Pagination    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Pagination]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[Pagination]
GO

/****** Object:  Stored Procedure dbo.SaveLog    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SaveLog]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SaveLog]
GO

/****** Object:  Table [dbo].[AccAcc]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AccAcc]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AccAcc]
GO

/****** Object:  Table [dbo].[AccAccRecord]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AccAccRecord]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AccAccRecord]
GO

/****** Object:  Table [dbo].[AccAccRecordFiles]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AccAccRecordFiles]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AccAccRecordFiles]
GO

/****** Object:  Table [dbo].[AccBank]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AccBank]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AccBank]
GO

/****** Object:  Table [dbo].[AccBox]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AccBox]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AccBox]
GO

/****** Object:  Table [dbo].[AccBoxBook]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AccBoxBook]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AccBoxBook]
GO

/****** Object:  Table [dbo].[AccCourse]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AccCourse]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AccCourse]
GO

/****** Object:  Table [dbo].[AccType]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AccType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AccType]
GO

/****** Object:  Table [dbo].[AccUser]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AccUser]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AccUser]
GO

/****** Object:  Table [dbo].[AccUserUPrice]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AccUserUPrice]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AccUserUPrice]
GO

/****** Object:  Table [dbo].[DBbase]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DBbase]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[DBbase]
GO

/****** Object:  Table [dbo].[UserLog]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UserLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[UserLog]
GO

/****** Object:  Table [dbo].[UserPass]    Script Date: 2019/3/5 7:44:02 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UserPass]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[UserPass]
GO

/****** Object:  Table [dbo].[AccAcc]    Script Date: 2019/3/5 7:44:04 ******/
CREATE TABLE [dbo].[AccAcc] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[RowGUID] [uniqueidentifier] NULL ,
	[BoxKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[UserID] [bigint] NOT NULL ,
	[PassID] [bigint] NOT NULL ,
	[Status] [int] NULL ,
	[ysMoney] [money] NULL ,
	[yzMoney] [money] NULL ,
	[sMoney] [money] NULL ,
	[zMoney] [money] NULL ,
	[AddIP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddPort] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [datetime] NULL ,
	[LastIP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastPort] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastTime] [datetime] NULL ,
	[Remark] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[AccAccRecord]    Script Date: 2019/3/5 7:44:06 ******/
CREATE TABLE [dbo].[AccAccRecord] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[RowGUID]  uniqueidentifier ROWGUIDCOL  NOT NULL ,
	[SNo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[PassID] [bigint] NULL ,
	[UserID] [bigint] NULL ,
	[UserTitle] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[mRed] [int] NULL ,
	[AccDay] [datetime] NULL ,
	[AccTime] [datetime] NULL ,
	[BoxKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[BookKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CnlKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[cueKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[subjectKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[handlerKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[payTypeKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[voucherKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[bankKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[mType] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[eMoney] [money] NULL ,
	[eMoneyHis] [money] NULL ,
	[bankMoneyHis] [money] NULL ,
	[Title] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Explain] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[Exp1] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Exp2] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Exp3] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[memoSNo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddIp] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [datetime] NULL ,
	[LastTime] [datetime] NULL 
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[AccAccRecordFiles]    Script Date: 2019/3/5 7:44:07 ******/
CREATE TABLE [dbo].[AccAccRecordFiles] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[RowGUID] [uniqueidentifier] NULL ,
	[PassID] [bigint] NOT NULL ,
	[RecordSNo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Title] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[FileType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[FileSize] [bigint] NULL ,
	[FilePath] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[FileData] [image] NULL ,
	[AddTime] [datetime] NULL ,
	[LastTime] [datetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

/****** Object:  Table [dbo].[AccBank]    Script Date: 2019/3/5 7:44:08 ******/
CREATE TABLE [dbo].[AccBank] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[RowGUID] [uniqueidentifier] NULL ,
	[BankKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[PassID] [bigint] NULL ,
	[Status] [int] NULL ,
	[Title] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[sMoney] [money] NULL ,
	[zMoney] [money] NULL ,
	[BankSNo] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[BankAddress] [nvarchar] (1000) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsSSE] [int] NULL ,
	[sseColumn] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddIP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddPort] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [datetime] NULL ,
	[LastIP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastPort] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastTime] [datetime] NULL 
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[AccBox]    Script Date: 2019/3/5 7:44:09 ******/
CREATE TABLE [dbo].[AccBox] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[RowGUID] [uniqueidentifier] NULL ,
	[PassID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[BoxKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Title] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsSSE] [int] NULL ,
	[sseColumn] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [datetime] NULL ,
	[LastTime] [datetime] NULL ,
	[Status] [int] NULL ,
	[IcoPath] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[IcoImg] [image] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

/****** Object:  Table [dbo].[AccBoxBook]    Script Date: 2019/3/5 7:44:10 ******/
CREATE TABLE [dbo].[AccBoxBook] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[RowGUID]  uniqueidentifier ROWGUIDCOL  NULL ,
	[PassID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[BoxKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[BookKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Type] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Title] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsSSE] [int] NULL ,
	[sseColumn] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[IcoPath] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [datetime] NULL ,
	[LastTime] [datetime] NULL ,
	[IcoImg] [image] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

/****** Object:  Table [dbo].[AccCourse]    Script Date: 2019/3/5 7:44:12 ******/
CREATE TABLE [dbo].[AccCourse] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[RowGUID] [uniqueidentifier] NULL ,
	[PassID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[cueKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[FcueKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Layer] [int] NULL ,
	[Title] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsSSE] [int] NULL ,
	[sseColumn] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [datetime] NULL ,
	[LastTime] [datetime] NULL 
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[AccType]    Script Date: 2019/3/5 7:44:13 ******/
CREATE TABLE [dbo].[AccType] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[RowGUID] [uniqueidentifier] NULL ,
	[PassID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[TypeKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Type] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Title] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsSSE] [int] NULL ,
	[sseColumn] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [datetime] NULL ,
	[LastTime] [datetime] NULL 
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[AccUser]    Script Date: 2019/3/5 7:44:14 ******/
CREATE TABLE [dbo].[AccUser] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[RowGUID]  uniqueidentifier ROWGUIDCOL  NULL ,
	[PassID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[UserID] [bigint] NOT NULL ,
	[GUserID] [bigint] NULL ,
	[Sex] [int] NULL ,
	[IsSSE] [int] NULL ,
	[UserStar] [int] NULL ,
	[Birthday] [datetime] NULL ,
	[PetName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserFace] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[sTips] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[IDCardName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserMail] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserMobile] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserTel] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserFax] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserQQ] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserWangWang] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Company] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UnitPrice] [money] NULL ,
	[Remark] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [datetime] NULL ,
	[LastTime] [datetime] NULL ,
	[SysRemark] [nvarchar] (1000) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserFaceImg] [image] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

/****** Object:  Table [dbo].[AccUserUPrice]    Script Date: 2019/3/5 7:44:15 ******/
CREATE TABLE [dbo].[AccUserUPrice] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[RowGUID]  uniqueidentifier ROWGUIDCOL  NULL ,
	[AccPassID] [bigint] NOT NULL ,
	[AccUserID] [bigint] NOT NULL ,
	[AccBoxKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[cueKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[uPrice] [money] NULL ,
	[AddTime] [datetime] NULL ,
	[LastTime] [datetime] NULL ,
	[Remark] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[DBbase]    Script Date: 2019/3/5 7:44:15 ******/
CREATE TABLE [dbo].[DBbase] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Version] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[UserLog]    Script Date: 2019/3/5 7:44:16 ******/
CREATE TABLE [dbo].[UserLog] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[RowGUID]  uniqueidentifier ROWGUIDCOL  NULL ,
	[ScPage] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Title] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[LSNo] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Txt] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[PassID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddIp] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [datetime] NULL 
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[UserPass]    Script Date: 2019/3/5 7:44:17 ******/
CREATE TABLE [dbo].[UserPass] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[RowGUID]  uniqueidentifier ROWGUIDCOL  NULL ,
	[PassID] [bigint] NOT NULL ,
	[LoginPwd] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Status] [int] NULL ,
	[PassWord] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserMail] [nvarchar] (80) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserMobile] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sseOpen] [int] NULL ,
	[sseKey] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[sseCheckKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserTel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserQQ] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sseColumn] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[Sex] [int] NULL ,
	[ApiKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[PetName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[IDCardName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserFace] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Birthday] [datetime] NULL ,
	[VipGrade] [int] NULL ,
	[VipEnd] [datetime] NULL ,
	[Signature] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserMoney] [money] NULL ,
	[UserFax] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserWangWang] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SoftSetting] [nvarchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[RegIp] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[RegTime] [datetime] NULL ,
	[LastPostTime] [datetime] NULL ,
	[LoginCount] [int] NULL ,
	[LoginIp] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LoginPort] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LoginTime] [datetime] NULL ,
	[LastIP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastTime] [datetime] NULL ,
	[SoftConfig] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[SoftConfigTime] [datetime] NULL ,
	[UserFaceImg] [image] NULL ,
	[Powers] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

ALTER TABLE [dbo].[AccAcc] WITH NOCHECK ADD 
	CONSTRAINT [PK_Accx] PRIMARY KEY  CLUSTERED 
	(
		[BoxKey],
		[UserID],
		[PassID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AccAccRecord] WITH NOCHECK ADD 
	CONSTRAINT [PK_AccAccLog] PRIMARY KEY  CLUSTERED 
	(
		[SNo]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AccAccRecordFiles] WITH NOCHECK ADD 
	CONSTRAINT [PK_AccAccRecordFiles] PRIMARY KEY  CLUSTERED 
	(
		[Id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AccBank] WITH NOCHECK ADD 
	CONSTRAINT [PK_AccBank] PRIMARY KEY  CLUSTERED 
	(
		[BankKey]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AccBox] WITH NOCHECK ADD 
	CONSTRAINT [PK_AccBox] PRIMARY KEY  CLUSTERED 
	(
		[BoxKey]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AccBoxBook] WITH NOCHECK ADD 
	CONSTRAINT [PK_AccBook] PRIMARY KEY  CLUSTERED 
	(
		[BoxKey],
		[BookKey]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AccCourse] WITH NOCHECK ADD 
	CONSTRAINT [PK_AccCourse] PRIMARY KEY  CLUSTERED 
	(
		[cueKey]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AccType] WITH NOCHECK ADD 
	CONSTRAINT [PK_AccType] PRIMARY KEY  CLUSTERED 
	(
		[TypeKey]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AccUser] WITH NOCHECK ADD 
	CONSTRAINT [PK_AccUser] PRIMARY KEY  CLUSTERED 
	(
		[PassID],
		[UserID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AccUserUPrice] WITH NOCHECK ADD 
	CONSTRAINT [PK_UserUPrice] PRIMARY KEY  CLUSTERED 
	(
		[AccPassID],
		[AccUserID],
		[AccBoxKey],
		[cueKey]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[DBbase] WITH NOCHECK ADD 
	CONSTRAINT [PK_DBbase] PRIMARY KEY  CLUSTERED 
	(
		[Id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[UserLog] WITH NOCHECK ADD 
	CONSTRAINT [PK_UserLog] PRIMARY KEY  CLUSTERED 
	(
		[Id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[UserPass] WITH NOCHECK ADD 
	CONSTRAINT [PK_UserPass] PRIMARY KEY  CLUSTERED 
	(
		[PassID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AccAcc] ADD 
	CONSTRAINT [DF_AccAcc_RowGUID] DEFAULT (newid()) FOR [RowGUID],
	CONSTRAINT [DF_AccAcc_Status_1] DEFAULT (0) FOR [Status],
	CONSTRAINT [DF_Accx_aMoney] DEFAULT (0) FOR [ysMoney],
	CONSTRAINT [DF_Accx_fMoney] DEFAULT (0) FOR [yzMoney],
	CONSTRAINT [DF_Accx_Consume] DEFAULT (0) FOR [sMoney],
	CONSTRAINT [DF_Accx_Give] DEFAULT (0) FOR [zMoney],
	CONSTRAINT [DF_AccAcc_AddTime] DEFAULT (getdate()) FOR [AddTime]
GO

ALTER TABLE [dbo].[AccAccRecord] ADD 
	CONSTRAINT [DF_AccAccLog_IsRowGuid] DEFAULT (newid()) FOR [RowGUID],
	CONSTRAINT [DF_AccAccLog_mType] DEFAULT (0) FOR [mRed],
	CONSTRAINT [DF_AccAccRecord_eMoney] DEFAULT (0) FOR [eMoney],
	CONSTRAINT [DF_AccAccRecord_eMoneyHis] DEFAULT (0) FOR [eMoneyHis],
	CONSTRAINT [DF_AccAccRecord_bankMoneyHis] DEFAULT (0) FOR [bankMoneyHis],
	CONSTRAINT [DF_AccAccRecord_AddTime] DEFAULT (getdate()) FOR [AddTime]
GO

 CREATE  INDEX [Id] ON [dbo].[AccAccRecord]([Id]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[AccBank] ADD 
	CONSTRAINT [DF_AccBank_RowGUID] DEFAULT (newid()) FOR [RowGUID],
	CONSTRAINT [DF_AccBank_Status] DEFAULT (0) FOR [Status],
	CONSTRAINT [DF_AccBank_sMoney] DEFAULT (0) FOR [sMoney],
	CONSTRAINT [DF_AccBank_zMoney] DEFAULT (0) FOR [zMoney],
	CONSTRAINT [DF_AccBank_IsSSE] DEFAULT (0) FOR [IsSSE],
	CONSTRAINT [DF_AccBank_AddTime] DEFAULT (getdate()) FOR [AddTime]
GO

ALTER TABLE [dbo].[AccBox] ADD 
	CONSTRAINT [DF_AccBox_RowGUID] DEFAULT (newid()) FOR [RowGUID],
	CONSTRAINT [DF_AccBox_IsSSE] DEFAULT (0) FOR [IsSSE],
	CONSTRAINT [DF_AccBox_AddTime] DEFAULT (getdate()) FOR [AddTime],
	CONSTRAINT [DF__AccBox__Status__6774552F] DEFAULT (0) FOR [Status]
GO

ALTER TABLE [dbo].[AccBoxBook] ADD 
	CONSTRAINT [DF_Account_RowGUID] DEFAULT (newid()) FOR [RowGUID],
	CONSTRAINT [DF_AccBook_IsSSE] DEFAULT (0) FOR [IsSSE],
	CONSTRAINT [DF_AccBoxBook_PhotoPath] DEFAULT (N'def') FOR [IcoPath],
	CONSTRAINT [DF_AccBoxBook_AddTime] DEFAULT (getdate()) FOR [AddTime]
GO

ALTER TABLE [dbo].[AccCourse] ADD 
	CONSTRAINT [DF_AccCourse_RowGUID] DEFAULT (newid()) FOR [RowGUID],
	CONSTRAINT [DF_AccCourse_FName] DEFAULT (N'Root') FOR [FcueKey],
	CONSTRAINT [DF_AccCourse_Layer] DEFAULT (0) FOR [Layer],
	CONSTRAINT [DF_AccCourse_IsSSE] DEFAULT (0) FOR [IsSSE],
	CONSTRAINT [DF_AccCourse_AddTime] DEFAULT (getdate()) FOR [AddTime]
GO

ALTER TABLE [dbo].[AccType] ADD 
	CONSTRAINT [DF_AccType_RowGUID] DEFAULT (newid()) FOR [RowGUID],
	CONSTRAINT [DF_AccType_IsSSE] DEFAULT (0) FOR [IsSSE],
	CONSTRAINT [DF_AccType_AddTime] DEFAULT (getdate()) FOR [AddTime]
GO

ALTER TABLE [dbo].[AccUser] ADD 
	CONSTRAINT [DF_AccUser_RowGUID] DEFAULT (newid()) FOR [RowGUID],
	CONSTRAINT [DF_AccUser_IsSSE] DEFAULT (0) FOR [IsSSE],
	CONSTRAINT [DF_AccUser_UserStar] DEFAULT (0) FOR [UserStar],
	CONSTRAINT [DF_AccUser_AddTime] DEFAULT (getdate()) FOR [AddTime]
GO

ALTER TABLE [dbo].[AccUserUPrice] ADD 
	CONSTRAINT [DF_AccUserUPrice_RowGUID_1] DEFAULT (newid()) FOR [RowGUID],
	CONSTRAINT [DF_AccUserUPrice_AddTime] DEFAULT (getdate()) FOR [AddTime]
GO

ALTER TABLE [dbo].[UserLog] ADD 
	CONSTRAINT [DF_UserLog_RowGUID] DEFAULT (newid()) FOR [RowGUID],
	CONSTRAINT [DF_UserLog_AddTime] DEFAULT (getdate()) FOR [AddTime]
GO

ALTER TABLE [dbo].[UserPass] ADD 
	CONSTRAINT [DF_UserPass_RowGUID] DEFAULT (newid()) FOR [RowGUID],
	CONSTRAINT [DF_UserPass_Status] DEFAULT (0) FOR [Status],
	CONSTRAINT [DF_UserPass_sseOpen] DEFAULT (0) FOR [sseOpen],
	CONSTRAINT [DF_UserPass_LoginCount] DEFAULT (0) FOR [LoginCount]
GO

 CREATE  UNIQUE  INDEX [UserName] ON [dbo].[UserPass]([UserName]) ON [PRIMARY]
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO

/****** Object:  Stored Procedure dbo.ExecSql    Script Date: 2019/3/5 7:44:18 ******/
CREATE PROCEDURE  ExecSql

@strSQL NVARCHAR(4000)=''

AS

set nocount on

BEGIN
	If @strSQL>''
	Begin
		EXEC(@strSQL)
	End 
END

set nocount off
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO

/****** Object:  Stored Procedure dbo.Pagination    Script Date: 2019/3/5 7:44:18 ******/

/***************************************通用分页存储过程**************************************************
--调用例子： 
--1.单表/单排序   EXEC Pagination  'bigtable','d_id','d_id,d_title,d_content,d_time',20,1,'','','d_id desc'
--2.单表/多排序   EXEC Pagination  'bigtable','d_id','*',20,0,'','','d_time asc,d_id desc'
--3.多表/单排序   EXEC Pagination  'bigtable left join bigtable_author on bigtable.d_id=bigtable_author.BigTable_id', 'bigtable.d_id', 'bigtable.d_id,bigtable.d_title,bigtable.d_content,bigtable.d_time,bigtable_author.d_author', 20, 0, '', '', 'bigtable.d_id asc'
--4.多表/多排序   EXEC Pagination  'bigtable left join bigtable_author on bigtable.d_id=bigtable_author.BigTable_id', 'bigtable
******************************************************************************************************************/

CREATE PROCEDURE Pagination

@TableNames NVARCHAR(4000),    --表名，可以是多个表，但不能用别名
@PrimaryKey NVARCHAR(4000),       --主键，可以为空，但@Order为空时该值不能为空
@Fields  NVARCHAR(4000),              --要取出的字段，可以是多个表的字段，可以为空，为空表示select *
@PageSize  INT,        		      --每页记录数
@CurrentPage INT,        		      --当前页，0表示第1页
@Filter  NVARCHAR(4000)='',            --条件，可以为空，不用填 where
@Group NVARCHAR(4000)='',           --分组依据，可以为空，不用填 group by
@Order NVARCHAR(4000)='' ,           --排序，可以为空，为空默认按主键升序排列，不用填 order by
@doCount  INT output                	      -- 非 0 值则统计记录总数

AS

set nocount on

BEGIN
      DECLARE @SortColumn VARCHAR(200)
      DECLARE @Operator CHAR(2)
      DECLARE @SortTable VARCHAR(200)
      DECLARE @SortName VARCHAR(200)

      IF @Fields = ''
          SET @Fields = '*'

      IF @Filter = ''
          SET @Filter = 'Where 1=1'
      ELSE
          SET @Filter = 'Where ' +    @Filter

      IF @Group <>''
          SET @Group = 'GROUP BY ' + @Group

      IF @Order <> ''
      BEGIN
          DECLARE @pos1 INT, @pos2 INT
          SET @Order = REPLACE(REPLACE(@Order, ' asc', ' ASC'), ' desc', ' DESC')
          IF CHARINDEX(' DESC', @Order) > 0        -- CHARINDEX和PATINDEX（支持通配符）函数用来在一段字符中搜索字符或者字符串，存在则返回一个非零的整数，这个整数是要搜索的字符在被搜索的字符中的开始位数。
              IF CHARINDEX(' ASC', @Order) > 0
              BEGIN
                  IF CHARINDEX(' DESC', @Order) < CHARINDEX(' ASC', @Order)
                      SET @Operator = '<='
                  ELSE
                      SET @Operator = '>='
              END
              ELSE
                  SET @Operator = '<='
          ELSE
              SET @Operator = '>='
          SET @SortColumn = REPLACE(REPLACE(REPLACE(@Order, ' ASC', ''), ' DESC', ''), ' ', '')
          SET @pos1 = CHARINDEX(',', @SortColumn)
          IF @pos1 > 0
              SET @SortColumn = SUBSTRING(@SortColumn, 1, @pos1-1)
          SET @pos2 = CHARINDEX('.', @SortColumn)
          IF @pos2 > 0
          BEGIN
              SET @SortTable = SUBSTRING(@SortColumn, 1, @pos2-1)
              IF @pos1 > 0 
                  SET @SortName = SUBSTRING(@SortColumn, @pos2+1, @pos1-@pos2-1)
              ELSE
                  SET @SortName = SUBSTRING(@SortColumn, @pos2+1, LEN(@SortColumn)-@pos2)
          END
          ELSE
          BEGIN
              SET @SortTable = @TableNames
              SET @SortName = @SortColumn
          END
      END
      ELSE
      BEGIN
          SET @SortColumn = @PrimaryKey
          SET @SortTable = @TableNames
          SET @SortName = @SortColumn
          SET @Order = @SortColumn
          SET @Operator = '>='
      END

      DECLARE @type varchar(50)
      DECLARE @prec int
      Select @type=t.name, @prec=c.prec
      FROM sysobjects o 
      JOIN syscolumns c on o.id=c.id
      JOIN systypes t on c.xusertype=t.xusertype
      Where o.name = @SortTable AND c.name = @SortName
      IF CHARINDEX('char', @type) > 0
      SET @type = @type + '(' + CAST(@prec AS varchar) + ')'

      DECLARE @TopRows INT
      SET @TopRows = @PageSize * @CurrentPage + 1
      --print @TopRows
      --print @Operator
      EXEC('
          DECLARE @SortColumnBegin ' + @type + '
          SET ROWCOUNT ' + @TopRows + '
          Select @SortColumnBegin=' + @SortColumn + ' FROM    ' + @TableNames + ' ' + @Filter + ' ' + @Group + ' ORDER BY ' + @Order + '
          SET ROWCOUNT ' + @PageSize + '
          Select ' + @Fields + ' FROM    ' + @TableNames + ' ' + @Filter    + ' AND ' + @SortColumn + '' + @Operator + '@SortColumnBegin ' + @Group + ' ORDER BY ' + @Order + '    
      ') 

       IF @doCount != 0			     --如果@doCount传递过来的不是0，就执行总数统计。
       BEGIN
	 EXEC ('SELECT Null  FROM '+ @TableNames + ' ' + @Filter )
	 SET @doCount =  @@rowcount
       END
      
END

set nocount off
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO

/****** Object:  Stored Procedure dbo.SaveLog    Script Date: 2019/3/5 7:44:19 ******/
CREATE PROCEDURE  SaveLog

@SaveStatus int output,		-- 输出参数，保存状态
@ScPage NVARCHAR(255)='',
@Title NVARCHAR(255)='',
@LSNo NVARCHAR(4000)='',
@Txt NVARCHAR(4000)='',
@PassID NVARCHAR(50)='',
@AddIp NVARCHAR(50)=''

AS

set nocount on

BEGIN
	IF @Title>''
	Begin
		Insert Into UserLog(
					ScPage,
					Title,
					LSNo,
					Txt,
					PassID,
					AddIp,
					AddTime
				) VALUES( 
					@ScPage,
					@Title,
					@LSNo,
					@Txt,
					@PassID,
					@AddIp,
					getdate()
					)
		SET @SaveStatus =1	---成功
	End
END

set nocount off
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


exec sp_addextendedproperty N'MS_Description', N'全球数据库（全库）中唯一标识', N'user', N'dbo', N'table', N'AccAcc', N'column', N'RowGUID'
GO
exec sp_addextendedproperty N'MS_Description', N'状态', N'user', N'dbo', N'table', N'AccAcc', N'column', N'Status'
GO
exec sp_addextendedproperty N'MS_Description', N'应收(累加)', N'user', N'dbo', N'table', N'AccAcc', N'column', N'ysMoney'
GO
exec sp_addextendedproperty N'MS_Description', N'应支(累加)', N'user', N'dbo', N'table', N'AccAcc', N'column', N'yzMoney'
GO
exec sp_addextendedproperty N'MS_Description', N'收入(累加)', N'user', N'dbo', N'table', N'AccAcc', N'column', N'sMoney'
GO
exec sp_addextendedproperty N'MS_Description', N'支出', N'user', N'dbo', N'table', N'AccAcc', N'column', N'zMoney'
GO
exec sp_addextendedproperty N'MS_Description', N'最后登录端口', N'user', N'dbo', N'table', N'AccAcc', N'column', N'LastPort'


GO


exec sp_addextendedproperty N'MS_Description', N'全球数据库（全库）中唯一标识', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'RowGUID'
GO
exec sp_addextendedproperty N'MS_Description', N'支付编号', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'SNo'
GO
exec sp_addextendedproperty N'MS_Description', N'红冲', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'mRed'
GO
exec sp_addextendedproperty N'MS_Description', N'帐务发生日期', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'AccDay'
GO
exec sp_addextendedproperty N'MS_Description', N'树形项目', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'cueKey'
GO
exec sp_addextendedproperty N'MS_Description', N'科目', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'subjectKey'
GO
exec sp_addextendedproperty N'MS_Description', N'本次金额', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'eMoney'
GO
exec sp_addextendedproperty N'MS_Description', N'mType类型money的上次记录', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'eMoneyHis'
GO
exec sp_addextendedproperty N'MS_Description', N'上次金额结余', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'bankMoneyHis'
GO
exec sp_addextendedproperty N'MS_Description', N'款项名称', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'Title'
GO
exec sp_addextendedproperty N'MS_Description', N'说明', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'Explain'
GO
exec sp_addextendedproperty N'MS_Description', N'扩展备注1,为了数据处理更灵活', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'Exp1'
GO
exec sp_addextendedproperty N'MS_Description', N'扩展备注2,为了数据处理更灵活', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'Exp2'
GO
exec sp_addextendedproperty N'MS_Description', N'扩展备注3,为了数据处理更灵活', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'Exp3'
GO
exec sp_addextendedproperty N'MS_Description', N'明细关联支付编号', N'user', N'dbo', N'table', N'AccAccRecord', N'column', N'memoSNo'


GO


exec sp_addextendedproperty N'MS_Description', N'全球数据库（全库）中唯一标识', N'user', N'dbo', N'table', N'AccBank', N'column', N'RowGUID'
GO
exec sp_addextendedproperty N'MS_Description', N'状态', N'user', N'dbo', N'table', N'AccBank', N'column', N'Status'
GO
exec sp_addextendedproperty N'MS_Description', N'收入(累加)', N'user', N'dbo', N'table', N'AccBank', N'column', N'sMoney'
GO
exec sp_addextendedproperty N'MS_Description', N'支出', N'user', N'dbo', N'table', N'AccBank', N'column', N'zMoney'
GO
exec sp_addextendedproperty N'MS_Description', N'加密字段', N'user', N'dbo', N'table', N'AccBank', N'column', N'sseColumn'
GO
exec sp_addextendedproperty N'MS_Description', N'最后登录端口', N'user', N'dbo', N'table', N'AccBank', N'column', N'LastPort'


GO


exec sp_addextendedproperty N'MS_Description', N'账套', N'user', N'dbo', N'table', N'AccBox', N'column', N'Id'
GO
exec sp_addextendedproperty N'MS_Description', N'加密字段', N'user', N'dbo', N'table', N'AccBox', N'column', N'sseColumn'


GO


exec sp_addextendedproperty N'MS_Description', N'账套下的账本/频道', N'user', N'dbo', N'table', N'AccBoxBook', N'column', N'Id'
GO
exec sp_addextendedproperty N'MS_Description', N'全球数据库（全库）中唯一标识', N'user', N'dbo', N'table', N'AccBoxBook', N'column', N'RowGUID'
GO
exec sp_addextendedproperty N'MS_Description', N'Book:账本,Chnnl:频道', N'user', N'dbo', N'table', N'AccBoxBook', N'column', N'Type'
GO
exec sp_addextendedproperty N'MS_Description', N'加密字段', N'user', N'dbo', N'table', N'AccBoxBook', N'column', N'sseColumn'
GO
exec sp_addextendedproperty N'MS_Description', N'特殊值def为默认图标', N'user', N'dbo', N'table', N'AccBoxBook', N'column', N'IcoPath'


GO


exec sp_addextendedproperty N'MS_Description', N'通用项目', N'user', N'dbo', N'table', N'AccCourse', N'column', N'Id'
GO
exec sp_addextendedproperty N'MS_Description', N'全球数据库（全库）中唯一标识', N'user', N'dbo', N'table', N'AccCourse', N'column', N'RowGUID'
GO
exec sp_addextendedproperty N'MS_Description', N'加密字段', N'user', N'dbo', N'table', N'AccCourse', N'column', N'sseColumn'


GO


exec sp_addextendedproperty N'MS_Description', N'基本类型', N'user', N'dbo', N'table', N'AccType', N'column', N'Id'
GO
exec sp_addextendedproperty N'MS_Description', N'全球数据库（全库）中唯一标识', N'user', N'dbo', N'table', N'AccType', N'column', N'RowGUID'
GO
exec sp_addextendedproperty N'MS_Description', N'InC:收入科目,OutC:支出科目,handler:经手人,payType:支付方式,voucher:凭证', N'user', N'dbo', N'table', N'AccType', N'column', N'Type'
GO
exec sp_addextendedproperty N'MS_Description', N'加密字段', N'user', N'dbo', N'table', N'AccType', N'column', N'sseColumn'


GO


exec sp_addextendedproperty N'MS_Description', N'单价', N'user', N'dbo', N'table', N'AccUser', N'column', N'UnitPrice'


GO


exec sp_addextendedproperty N'MS_Description', N'全球数据库（全库）中唯一标识', N'user', N'dbo', N'table', N'AccUserUPrice', N'column', N'RowGUID'
GO
exec sp_addextendedproperty N'MS_Description', N'账套key', N'user', N'dbo', N'table', N'AccUserUPrice', N'column', N'AccBoxKey'
GO
exec sp_addextendedproperty N'MS_Description', N'项目key', N'user', N'dbo', N'table', N'AccUserUPrice', N'column', N'cueKey'


GO


exec sp_addextendedproperty N'MS_Description', N'来源页面', N'user', N'dbo', N'table', N'UserLog', N'column', N'ScPage'
GO
exec sp_addextendedproperty N'MS_Description', N'操作员', N'user', N'dbo', N'table', N'UserLog', N'column', N'PassID'


GO

EXEC('insert into DBbase(Version)values(6)')
GO
EXEC('insert into UserPass(RowGUID,PassID,UserName,PassWord,UserMail)values(''8fb18ca7-770d-463c-a9c9-f13fa9897f9b'',''666666'',''admin'',''7a57a5a743894a0e'',''admin@admin.com'')')

GO

