USE [Clinica]
GO
/****** Object:  Table [Clinica].[AgendaProfesional]    Script Date: 18-08-2025 21:38:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Clinica].[AgendaProfesional](
	[IdAgendaProfesional] [int] IDENTITY(1,1) NOT NULL,
	[IdProfesional] [int] NOT NULL,
	[FechaHora] [datetime] NULL,
	[IndEliminado] [tinyint] NOT NULL,
	[IdAgendaDisponibleCentroMedico] [int] NULL,
PRIMARY KEY CLUSTERED 
(
	[IdAgendaProfesional] 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].[AgendaProfesional] ADD  DEFAULT ((0)) FOR [IndEliminado]
GO
ALTER TABLE [Clinica].[AgendaProfesional]  WITH CHECK ADD  CONSTRAINT [FK__AgendaPro__IdAge__7E8CC4B1] FOREIGN KEY([IdAgendaDisponibleCentroMedico])
REFERENCES [Clinica].[AgendaDisponibleCentroMedico] ([IdAgendaDisponibleCentroMedico])
GO
ALTER TABLE [Clinica].[AgendaProfesional] CHECK CONSTRAINT [FK__AgendaPro__IdAge__7E8CC4B1]
GO
ALTER TABLE [Clinica].[AgendaProfesional]  WITH CHECK ADD  CONSTRAINT [FK__AgendaPro__IdPro__70A8B9AE] FOREIGN KEY([IdProfesional])
REFERENCES [Clinica].[Profesional] ([IdProfesional])
GO
ALTER TABLE [Clinica].[AgendaProfesional] CHECK CONSTRAINT [FK__AgendaPro__IdPro__70A8B9AE]
GO
