USE [Clinica]
GO
/****** Object:  Table [Core].[Cliente]    Script Date: 18-08-2025 21:38:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Core].[Cliente](
	[IdCliente] [int] IDENTITY(1,1) NOT NULL,
	[IdTipoCliente] [int] NOT NULL,
	[RazonSocial] [varchar](256) NULL,
	[Rut] [varchar](15) NULL,
	[Direccion] [varchar](512) NULL,
	[Eliminado] [int] NULL,
	[UriLogo] [varchar](512) NOT NULL,
	[IdTipoProducto] [int] NOT NULL,
	[IndTurnoDiscontinuo] [int] NULL,
	[UriLogoAlternativo] [varchar](512) NOT NULL,
	[IdEstilo] [int] NULL,
 CONSTRAINT [PK_Cliente] PRIMARY KEY CLUSTERED 
(
	[IdCliente] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [Core].[Cliente]  WITH CHECK ADD  CONSTRAINT [FK_Cliente_Estilo] FOREIGN KEY([IdEstilo])
REFERENCES [Core].[Estilo] ([IdEstilo])
GO
ALTER TABLE [Core].[Cliente] CHECK CONSTRAINT [FK_Cliente_Estilo]
GO
ALTER TABLE [Core].[Cliente]  WITH CHECK ADD  CONSTRAINT [FK_Cliente_TipoCliente] FOREIGN KEY([IdTipoCliente])
REFERENCES [Core].[TipoCliente] ([IdTipoCliente])
GO
ALTER TABLE [Core].[Cliente] CHECK CONSTRAINT [FK_Cliente_TipoCliente]
GO
ALTER TABLE [Core].[Cliente]  WITH CHECK ADD  CONSTRAINT [FK_Cliente_TipoProducto] FOREIGN KEY([IdTipoProducto])
REFERENCES [Core].[TipoProducto] ([IdTipoProducto])
GO
ALTER TABLE [Core].[Cliente] CHECK CONSTRAINT [FK_Cliente_TipoProducto]
GO
