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