CREATE TABLE [dbo].[SCBillingEquipmentMiscChargeCycleCharges]
(
[BillingEquipmentMiscChargeCycleChargeID] [int] NOT NULL IDENTITY(1, 1),
[InvoiceID] [int] NOT NULL,
[ContractDetailID] [int] NOT NULL,
[BillingEquipmentMiscChargeID] [int] NOT NULL,
[BillingEquipmentID] [int] NOT NULL,
[CycleChargeDetailID] [int] NOT NULL,
[FromDate] [datetime] NOT NULL,
[ToDate] [datetime] NOT NULL,
[Quantity] [decimal] (18, 6) NOT NULL,
[Rate] [decimal] (18, 6) NOT NULL,
[Amount] [money] NOT NULL,
[NonAdjustedAmount] [money] NOT NULL,
[CreatorID] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_SCBillingEquipmentMiscChargeCycleCharges_CreateDate] DEFAULT (getdate()),
[UpdatorID] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_SCBillingEquipmentMiscChargeCycleCharges_LastUpdate] DEFAULT (getdate()),
[BillWithID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCBillingEquipmentMiscChargeCycleCharges] ADD CONSTRAINT [PK__SCBillin__814F6143A9CEE6F5] PRIMARY KEY CLUSTERED ([BillingEquipmentMiscChargeCycleChargeID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SCBillingEquipmentMiscChargeCycleCharges] ADD CONSTRAINT [FK_SCBillingEquipmentMiscChargeCycleCharges_BillingEquipmentMiscChargeID_SCBillingEquipmentMiscCharges] FOREIGN KEY ([BillingEquipmentMiscChargeID]) REFERENCES [dbo].[SCBillingEquipmentMiscCharges] ([BillingEquipmentMiscChargeID])
GO