USE [Clinica]
GO
/****** Object:  Table [Clinica].[AgendaDisponibleCentroMedico]    Script Date: 18-08-2025 21:38:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Clinica].[AgendaDisponibleCentroMedico](
	[IdAgendaDisponibleCentroMedico] [int] IDENTITY(1,1) NOT NULL,
	[IdCentroMedico] [int] NOT NULL,
	[DiaSemana] [int] NOT NULL,
	[Hora] [datetime] NOT NULL,
	[DuracionMinutos] [int] NOT NULL,
	[IndVigente] [int] NOT NULL,
	[IndEliminado] [int] NOT NULL,
 CONSTRAINT [PK__AgendaDi__16C1A0C452668359] PRIMARY KEY CLUSTERED 
(
	[IdAgendaDisponibleCentroMedico] 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].[AgendaDisponibleCentroMedico] ADD  CONSTRAINT [DF__AgendaDis__DiaSe__7ABC33CD]  DEFAULT ((1)) FOR [DiaSemana]
GO
ALTER TABLE [Clinica].[AgendaDisponibleCentroMedico] ADD  CONSTRAINT [DF__AgendaDis__Durac__7BB05806]  DEFAULT ((30)) FOR [DuracionMinutos]
GO
ALTER TABLE [Clinica].[AgendaDisponibleCentroMedico] ADD  CONSTRAINT [DF__AgendaDis__IndVi__7CA47C3F]  DEFAULT ((1)) FOR [IndVigente]
GO
ALTER TABLE [Clinica].[AgendaDisponibleCentroMedico] ADD  CONSTRAINT [DF__AgendaDis__IndEl__7D98A078]  DEFAULT ((0)) FOR [IndEliminado]
GO
ALTER TABLE [Clinica].[AgendaDisponibleCentroMedico]  WITH CHECK ADD  CONSTRAINT [FK__AgendaDis__IdCen__79C80F94] FOREIGN KEY([IdCentroMedico])
REFERENCES [Clinica].[CentroMedico] ([IdCentroMedico])
GO
ALTER TABLE [Clinica].[AgendaDisponibleCentroMedico] CHECK CONSTRAINT [FK__AgendaDis__IdCen__79C80F94]
GO
