USE [befri_Goldhoo] GO /****** Object: Table [Discount].[DiscountRecLine] Script Date: 2020/12/4 11:42:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [Discount].[DiscountRecLine]( [DiscountRecLineId] [int] NOT NULL, [DiscountRecId] [int] NOT NULL, [InventoryId] [int] NOT NULL, [InventoryNumber] [varchar](20) NULL, [InventoryName] [nvarchar](50) NULL, [Spec] [varchar](200) NULL, [BatchNumber] [varchar](20) NULL, [IncreasedQty] [numeric](9, 0) NOT NULL, [DecreasedQty] [numeric](9, 0) NOT NULL, [DiscountCoef] [numeric](5, 2) NULL, [IncreasedPrice] [money] NULL, [DecreasedPrice] [money] NULL, [IncreasedMoney] [money] NULL, [DecreasedMoney] [money] NULL, [LineStatus] [tinyint] NULL, [VersionNumber] [smallint] NOT NULL, [Description] [nvarchar](200) NULL, CONSTRAINT [PK_DISCOUNTRECLINE] PRIMARY KEY CLUSTERED ( [DiscountRecLineId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING ON GO ALTER TABLE [Discount].[DiscountRecLine] ADD CONSTRAINT [DF__DiscountR__Versi__488B491C] DEFAULT ((0)) FOR [VersionNumber] GO ALTER TABLE [Discount].[DiscountRecLine] WITH CHECK ADD CONSTRAINT [FK_DISCOUNT_REFERENCE_DISCOUNT] FOREIGN KEY([DiscountRecId]) REFERENCES [Discount].[DiscountRec] ([DiscountRecId]) ON UPDATE CASCADE ON DELETE CASCADE GO ALTER TABLE [Discount].[DiscountRecLine] CHECK CONSTRAINT [FK_DISCOUNT_REFERENCE_DISCOUNT] GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'���������¼������' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'DiscountRecLineId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'���������¼����' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'DiscountRecId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'�������' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'InventoryId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'�������' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'InventoryNumber' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'�������' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'InventoryName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'����ͺ�' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'Spec' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'����' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'BatchNumber' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'�������' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'IncreasedQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'��������' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'DecreasedQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'�ۿ�ϵ��' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'DiscountCoef' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'��ⵥ��' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'IncreasedPrice' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'���ⵥ��' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'DecreasedPrice' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'���ӽ��' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'IncreasedMoney' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'���ٽ��' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'DecreasedMoney' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'��״̬' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'LineStatus' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'��¼�汾' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'VersionNumber' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'��ע' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine', @level2type=N'COLUMN',@level2name=N'Description' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'�ۿ۹���.�ۿ۲�Ʒ������¼��' , @level0type=N'SCHEMA',@level0name=N'Discount', @level1type=N'TABLE',@level1name=N'DiscountRecLine' GO