USE [Clinica]
GO
/****** Object:  Table [Clinica].[Grupo]    Script Date: 18-08-2025 21:40:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Clinica].[Grupo](
	[IdGrupo] [int] IDENTITY(1,1) NOT NULL,
	[Descripcion] [varchar](128) NOT NULL,
	[IndActivo] [tinyint] NOT NULL,
	[IdTipoPrestacion] [int] NULL,
PRIMARY KEY CLUSTERED 
(
	[IdGrupo] 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].[Grupo] ADD  DEFAULT ('') FOR [Descripcion]
GO
ALTER TABLE [Clinica].[Grupo] ADD  CONSTRAINT [DF_Grupo_IndActivo]  DEFAULT ((1)) FOR [IndActivo]
GO
ALTER TABLE [Clinica].[Grupo]  WITH CHECK ADD FOREIGN KEY([IdTipoPrestacion])
REFERENCES [Clinica].[TipoPrestacion] ([IdTipoPrestacion])
GO
