SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
/****** Object:  Table [dbo].[Storia]    Script Date: 09/30/2010 10:53:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Storia]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [dbo].[Storia](
	[ID] [bigint] IDENTITY(1,1) NOT NULL,
	[cliente] [int] NOT NULL,
	[data] [datetime] NOT NULL,
	[ore] [char](5) NOT NULL,
	[operatore] [int] NOT NULL,
	[prestazione1] [bigint] NOT NULL,
	[prestazione2] [bigint] NOT NULL,
	[prestazione3] [bigint] NOT NULL,
	[prestazione4] [bigint] NOT NULL,
	[prestazione5] [bigint] NOT NULL,
	[prestazione6] [bigint] NOT NULL,
	[prestazione7] [bigint] NOT NULL,
	[prestazione8] [bigint] NOT NULL,
	[prestazione9] [bigint] NOT NULL,
	[prestazione10] [bigint] NOT NULL,
	[foto_prima] [image] NULL,
	[foto_come] [image] NULL,
	[foto_ris1] [image] NULL,
	[foto_ris2] [image] NULL,
	[foto_ris3] [image] NULL,
	[materiali_colori] [varchar](1024) NULL,
 CONSTRAINT [PK_Storia] 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] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Agenda]    Script Date: 09/30/2010 10:53:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Agenda]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [dbo].[Agenda](
	[data] [datetime] NOT NULL,
	[operatore] [int] NOT NULL,
	[dalle_ore] [char](5) NOT NULL,
	[alle_ore] [char](5) NOT NULL,
	[cliente] [int] NOT NULL,
	[prestazione1] [bigint] NOT NULL,
	[prestazione2] [bigint] NOT NULL,
	[prestazione3] [bigint] NOT NULL,
	[prestazione4] [bigint] NOT NULL,
	[prestazione5] [bigint] NOT NULL,
	[prestazione6] [bigint] NOT NULL,
	[prestazione7] [bigint] NOT NULL,
	[prestazione8] [bigint] NOT NULL,
	[prestazione9] [bigint] NOT NULL,
	[prestazione10] [bigint] NOT NULL,
	[Fatto] [int] NOT NULL,
	[Arrivato] [int] NOT NULL,
 CONSTRAINT [PK_Agenda] PRIMARY KEY CLUSTERED 
(
	[data] ASC,
	[operatore] ASC,
	[dalle_ore] 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
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Foto_Appuntamenti]    Script Date: 09/30/2010 10:53:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Foto_Appuntamenti]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [dbo].[Foto_Appuntamenti](
	[data] [datetime] NOT NULL,
	[operatore] [int] NOT NULL,
	[dalle_ore] [char](5) NOT NULL,
	[cliente] [int] NOT NULL,
	[foto_prima] [image] NULL,
	[foto_come] [image] NULL,
	[foto_ris1] [image] NULL,
	[foto_ris2] [image] NULL,
	[foto_ris3] [image] NULL,
 CONSTRAINT [PK_Foto_Appuntamenti] PRIMARY KEY CLUSTERED 
(
	[data] ASC,
	[operatore] ASC,
	[dalle_ore] ASC,
	[cliente] 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]
/****** Object:  Table [dbo].[Foto_Clienti]    Script Date: 09/30/2010 10:53:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Foto_Clienti]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [dbo].[Foto_Clienti](
	[cliente] [int] NOT NULL,
	[immagine] [image] NULL,
 CONSTRAINT [PK_Foto_Clienti] PRIMARY KEY CLUSTERED 
(
	[cliente] 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].[Prove]    Script Date: 09/30/2010 10:53:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Prove]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [dbo].[Prove](
	[cliente] [int] NOT NULL,
	[foto1] [image] NULL,
	[foto2] [image] NULL,
	[foto3] [image] NULL,
	[foto4] [image] NULL,
	[foto5] [image] NULL,
	[foto] [image] NULL,
 CONSTRAINT [PK_Prove] PRIMARY KEY CLUSTERED 
(
	[cliente] 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].[Date]    Script Date: 09/30/2010 10:53:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Date]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [dbo].[Date](
	[ID] [bigint] NOT NULL,
	[Data] [datetime] NOT NULL,
	[Anno_Segnalazione] [int] NOT NULL,
 CONSTRAINT [PK_Date] 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].[Link]    Script Date: 09/30/2010 10:53:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Link]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [dbo].[Link](
	[ID] [bigint] IDENTITY(1,1) NOT NULL,
	[Descrizione] [char](100) NULL,
	[Indirizzo] [char](300) NULL,
 CONSTRAINT [PK_Link] 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
SET ANSI_PADDING OFF
GO
DELETE FROM Link	
		WHERE (ID ='0')or (ID ='2')or (ID ='3')or (ID ='4')
SET IDENTITY_INSERT [dbo].[Link] ON
INSERT [dbo].[Link] ([ID], [Descrizione], [Indirizzo]) VALUES (0, N'Sito parrucchiere Virtuale                                                                          ', N'http://www.taaz.com/makeover.html#tab=lipstick                                                                                                                                                                                                                                                              ')
INSERT [dbo].[Link] ([ID], [Descrizione], [Indirizzo]) VALUES (2, N'Sito parrucchiere Virtuale                                                                          ', N'http://www.hairfinder.com/it/virtuale_tagli.htm                                                                                                                                                                                                                                                             ')
INSERT [dbo].[Link] ([ID], [Descrizione], [Indirizzo]) VALUES (3, N'Sito parrucchiere Virtuale                                                                          ', N'http://www.ukhairdressers.com/hair_move/index.asp                                                                                                                                                                                                                                                           ')
INSERT [dbo].[Link] ([ID], [Descrizione], [Indirizzo]) VALUES (4, N'Sito parrucchiere Virtuale                                                                          ', N'http://www.hairfinder.com/italiano.htm                                                                                                                                                                                                                                                                      ')
SET IDENTITY_INSERT [dbo].[Link] OFF
/****** Object:  Table [dbo].[combol]    Script Date: 09/30/2010 10:53:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[combol]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [dbo].[combol](
	[combol_cliente] [int] NOT NULL,
	[combol_riga] [int] NOT NULL,
	[combol_comunicazione] [char](50) NOT NULL,
 CONSTRAINT [PK_combol] PRIMARY KEY CLUSTERED 
(
	[combol_cliente] ASC,
	[combol_riga] 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
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Ferie]    Script Date: 09/30/2010 10:53:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Ferie]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
CREATE TABLE [dbo].[Ferie](
	[IDSoggetto] [bigint] NOT NULL,
	[IDFerie] [int] NOT NULL,
	[Lunedì] [bit] NOT NULL,
	[Martedì] [bit] NOT NULL,
	[Mercoledì] [bit] NOT NULL,
	[Giovedì] [bit] NOT NULL,
	[Venerdì] [bit] NOT NULL,
	[Sabato] [bit] NOT NULL,
	[Domenica] [bit] NOT NULL,
	[DaData] [datetime] NOT NULL,
	[AData] [datetime] NOT NULL,
 CONSTRAINT [PK_Ferie] PRIMARY KEY CLUSTERED 
(
	[IDSoggetto] ASC,
	[IDFerie] 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
