CREATE TABLE [dbo].[SCBillingMeterGroupOverageCycleCharges]
(
[BillingMeterGroupOverageCycleChargeID] [int] NOT NULL IDENTITY(1, 1),
[InvoiceID] [int] NOT NULL,
[ContractDetailID] [int] NOT NULL,
[BillingMeterGroupID] [int] NOT NULL,
[CycleChargeDetailID] [int] NOT NULL,
[OverageFromDate] [datetime] NOT NULL,
[OverageToDate] [datetime] NOT NULL,
[CoveredCopies] [decimal] (18, 6) NOT NULL,
[NonAdjustedCoveredCopies] [decimal] (18, 6) NOT NULL,
[CreatorID] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_SCBillingMeterGroupOverageCycleCharges_CreateDate] DEFAULT (getdate()),
[UpdatorID] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_SCBillingMeterGroupOverageCycleCharges_LastUpdate] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCBillingMeterGroupOverageCycleCharges] ADD CONSTRAINT [FK_SCBillingMeterGroupOverageCycleCharges_BillingMeterGroupID_SCBillingMeterGroups] FOREIGN KEY ([BillingMeterGroupID]) REFERENCES [dbo].[SCBillingMeterGroups] ([BillingMeterGroupID])
GO