USE [Clinica]
GO
/****** Object:  Table [Clinica].[CaracteristicaBox]    Script Date: 18-08-2025 21:38:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Clinica].[CaracteristicaBox](
	[IdCaracteristicaBox] [int] IDENTITY(1,1) NOT NULL,
	[IdCaracteristica] [int] NOT NULL,
	[IdBox] [int] NOT NULL,
	[IndVigente] [tinyint] NOT NULL,
	[IndEliminado] [tinyint] NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[IdCaracteristicaBox] 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 [Clinica].[CaracteristicaBox] ADD  DEFAULT ((1)) FOR [IndVigente]
GO
ALTER TABLE [Clinica].[CaracteristicaBox] ADD  DEFAULT ((0)) FOR [IndEliminado]
GO
ALTER TABLE [Clinica].[CaracteristicaBox]  WITH CHECK ADD FOREIGN KEY([IdBox])
REFERENCES [Clinica].[Box] ([IdBox])
GO
ALTER TABLE [Clinica].[CaracteristicaBox]  WITH CHECK ADD FOREIGN KEY([IdCaracteristica])
REFERENCES [Clinica].[Caracteristica] ([IdCaracteristica])
GO
