[dbo].[ServeqQuantityActual]
CREATE TABLE [dbo].[ServeqQuantityActual]
(
[ServeqQuantityActualID] [int] NOT NULL IDENTITY(1, 1),
[ServeqFID] [int] NOT NULL,
[ReturnedQuantity] [int] NOT NULL CONSTRAINT [DF_ServeqQuantityActual_ReturnedQuantity] DEFAULT ((0)),
[ActualCreatedBy] [int] NOT NULL,
[IsFromMobileApi] [bit] NOT NULL CONSTRAINT [DF_ServeqQuantityActual_IsFromMobileApi] DEFAULT ((0)),
[Date] [datetime] NULL,
[DeliveredQuantity] [int] NOT NULL CONSTRAINT [DF_ServeqQuantityActual_DeliveredQuantity] DEFAULT ((0))
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ServeqQuantityActual_ActualCreatedBy] ON [dbo].[ServeqQuantityActual] ([ActualCreatedBy]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ServeqQuantityActual_ServeqFID] ON [dbo].[ServeqQuantityActual] ([ServeqFID], [IsFromMobileApi]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ServeqQuantityActual] ADD CONSTRAINT [FK_ServeqQuantityActual_Sysuser] FOREIGN KEY ([ActualCreatedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[ServeqQuantityActual] ADD CONSTRAINT [FK_ServeqQuantityActual_Serveq] FOREIGN KEY ([ServeqFID]) REFERENCES [dbo].[Serveq] ([PRIKEY])
GO
GRANT SELECT ON [dbo].[ServeqQuantityActual] TO [MssExec]
GRANT INSERT ON [dbo].[ServeqQuantityActual] TO [MssExec]
GRANT DELETE ON [dbo].[ServeqQuantityActual] TO [MssExec]
GRANT UPDATE ON [dbo].[ServeqQuantityActual] TO [MssExec]
GO