USE [master] GO /****** Object: Database [SCP] Script Date: 2018-05-02 20:47:12 ******/ CREATE DATABASE [SCP] ON PRIMARY ( NAME = N'ChangKeTecSCP', FILENAME = N'C:\SqlData\SCP.mdf' , SIZE = 73728KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB ) LOG ON ( NAME = N'ChangKeTecSCP_log', FILENAME = N'C:\SqlData\SCP_0.ldf' , SIZE = 73728KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB ) GO ALTER DATABASE [SCP] SET COMPATIBILITY_LEVEL = 100 GO IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')) begin EXEC [SCP].[dbo].[sp_fulltext_database] @action = 'enable' end GO ALTER DATABASE [SCP] SET ANSI_NULL_DEFAULT OFF GO ALTER DATABASE [SCP] SET ANSI_NULLS OFF GO ALTER DATABASE [SCP] SET ANSI_PADDING OFF GO ALTER DATABASE [SCP] SET ANSI_WARNINGS OFF GO ALTER DATABASE [SCP] SET ARITHABORT OFF GO ALTER DATABASE [SCP] SET AUTO_CLOSE OFF GO ALTER DATABASE [SCP] SET AUTO_SHRINK OFF GO ALTER DATABASE [SCP] SET AUTO_UPDATE_STATISTICS ON GO ALTER DATABASE [SCP] SET CURSOR_CLOSE_ON_COMMIT OFF GO ALTER DATABASE [SCP] SET CURSOR_DEFAULT GLOBAL GO ALTER DATABASE [SCP] SET CONCAT_NULL_YIELDS_NULL OFF GO ALTER DATABASE [SCP] SET NUMERIC_ROUNDABORT OFF GO ALTER DATABASE [SCP] SET QUOTED_IDENTIFIER OFF GO ALTER DATABASE [SCP] SET RECURSIVE_TRIGGERS OFF GO ALTER DATABASE [SCP] SET DISABLE_BROKER GO ALTER DATABASE [SCP] SET AUTO_UPDATE_STATISTICS_ASYNC OFF GO ALTER DATABASE [SCP] SET DATE_CORRELATION_OPTIMIZATION OFF GO ALTER DATABASE [SCP] SET TRUSTWORTHY OFF GO ALTER DATABASE [SCP] SET ALLOW_SNAPSHOT_ISOLATION OFF GO ALTER DATABASE [SCP] SET PARAMETERIZATION SIMPLE GO ALTER DATABASE [SCP] SET READ_COMMITTED_SNAPSHOT OFF GO ALTER DATABASE [SCP] SET HONOR_BROKER_PRIORITY OFF GO ALTER DATABASE [SCP] SET RECOVERY FULL GO ALTER DATABASE [SCP] SET MULTI_USER GO ALTER DATABASE [SCP] SET PAGE_VERIFY CHECKSUM GO ALTER DATABASE [SCP] SET DB_CHAINING OFF GO EXEC sys.sp_db_vardecimal_storage_format N'SCP', N'ON' GO USE [SCP] GO /****** Object: Table [dbo].[__MigrationHistory] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[__MigrationHistory]( [MigrationId] [nvarchar](150) NOT NULL, [nvarchar(150)] [nvarchar](300) NOT NULL, [Model] [varbinary](max) NOT NULL, [ProductVersion] [nvarchar](32) NOT NULL, CONSTRAINT [PK___MigrationHistory] PRIMARY KEY CLUSTERED ( [MigrationId] ASC, [nvarchar(150)] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO /****** Object: Table [dbo].[ERP_ORDER] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ERP_ORDER]( [UID] [int] NOT NULL, [ErpBillNum] [nvarchar](50) NOT NULL, [VendId] [nvarchar](50) NULL, [ModType] [nvarchar](50) NULL, [Contacter] [nvarchar](50) NULL, [Site] [nvarchar](50) NULL, [Buyer] [nvarchar](50) NULL, [BuyerPhone] [nvarchar](50) NULL, [Address] [nvarchar](200) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL, CONSTRAINT [PK_TB_QadOrder] PRIMARY KEY CLUSTERED ( [UID] 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 /****** Object: Table [dbo].[ERP_ORDER_DETAIL] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ERP_ORDER_DETAIL]( [UID] [int] NOT NULL, [ErpBillNum] [nvarchar](50) NOT NULL, [PoLine] [int] NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [PartPrice] [money] NOT NULL, [BeginTime] [datetime2](3) NULL, [EndTime] [datetime2](3) NULL, [PlanQty] [money] NOT NULL, [ClosedQty] [money] NOT NULL, [DockCode] [nvarchar](50) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL, CONSTRAINT [PK_ERP_ORDER_DETAIL] PRIMARY KEY CLUSTERED ( [UID] 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 /****** Object: Table [dbo].[TA_BILLTYPE] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TA_BILLTYPE]( [UID] [int] IDENTITY(1,1) NOT NULL, [BillType] [int] NOT NULL, [TypeName] [nvarchar](50) NOT NULL, [TypeDesc] [nvarchar](50) NOT NULL, [State] [int] NOT NULL, [Prefix] [nvarchar](50) NOT NULL, [BillNumRule] [nvarchar](500) NOT NULL, [LastNumber] [int] NOT NULL, [LastBillNum] [nvarchar](50) NULL, [LastBillTime] [datetime] NOT NULL, [PrintTemplateFileName] [nvarchar](500) NULL, [ImportTemplateFileName] [nvarchar](500) NULL, [Sep] [varchar](50) NULL, [PaperOrientation] [int] NOT NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL, CONSTRAINT [PK_TA_BILLTYPE] PRIMARY KEY CLUSTERED ( [BillType] 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 /****** Object: Table [dbo].[TA_CONFIG] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TA_CONFIG]( [UID] [int] IDENTITY(1,1) NOT NULL, [ParamName] [nvarchar](50) NOT NULL, [ParamValue] [nvarchar](50) NOT NULL, [State] [int] NOT NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL, CONSTRAINT [PK_SYS_CONFIG] PRIMARY KEY CLUSTERED ( [ParamName] 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 /****** Object: Table [dbo].[TA_FACTORY] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TA_FACTORY]( [UID] [int] NOT NULL, [FactoryId] [nvarchar](50) NOT NULL, [FactoryName] [nvarchar](255) NULL, [ErpSite] [nvarchar](50) NOT NULL, [ErpDomain] [nvarchar](50) NOT NULL, [Address] [nvarchar](255) NULL, [ZipCode] [nvarchar](255) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](255) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL, CONSTRAINT [PK_TA_Factory] PRIMARY KEY CLUSTERED ( [FactoryId] 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 /****** Object: Table [dbo].[TA_PART] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TA_PART]( [UID] [bigint] IDENTITY(1,1) NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [ErpPartCode] [nvarchar](50) NULL, [PartDesc1] [nvarchar](max) NOT NULL, [PartDesc2] [nvarchar](max) NULL, [ProjectId] [nvarchar](50) NOT NULL, [Unit] [nvarchar](50) NOT NULL, [PartGroup] [nvarchar](50) NULL, [State] [varchar](10) NULL, [Configuration] [nvarchar](100) NULL, [ValidityDays] [int] NOT NULL, [ReceivePort] [nvarchar](50) NULL, [PalletSize] [nvarchar](50) NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL, CONSTRAINT [PK_TA_PART] PRIMARY KEY CLUSTERED ( [PartCode] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO /****** Object: Table [dbo].[TA_VEND_PART] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TA_VEND_PART]( [UID] [bigint] IDENTITY(1,1) NOT NULL, [VendId] [nvarchar](50) NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [VendPartCode] [nvarchar](50) NOT NULL, [VendPackQty] [decimal](18, 5) NOT NULL, [PoUnit] [nvarchar](50) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL, CONSTRAINT [PK_TA_VEND_PART] PRIMARY KEY CLUSTERED ( [VendId] ASC, [PartCode] ASC, [VendPartCode] 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 /****** Object: Table [dbo].[TA_VENDER] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TA_VENDER]( [UID] [int] IDENTITY(1,1) NOT NULL, [VendId] [nvarchar](50) NOT NULL, [VendName] [nvarchar](50) NOT NULL, [VendAbbCode] [varchar](2) NULL, [VendType] [nvarchar](50) NULL, [Country] [nvarchar](50) NULL, [City] [nvarchar](50) NULL, [Currency] [nvarchar](50) NULL, [Address] [nvarchar](200) NULL, [ZipCode] [nvarchar](50) NULL, [Contacter] [nvarchar](50) NULL, [Phone] [nvarchar](50) NULL, [Fax] [nvarchar](50) NULL, [Email] [nvarchar](50) NULL, [State] [int] NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL, CONSTRAINT [PK23] PRIMARY KEY NONCLUSTERED ( [VendId] 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 /****** Object: Table [dbo].[TB_ASK] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_ASK]( [UID] [int] NOT NULL, [AskBillNum] [nvarchar](50) NOT NULL, [PoBillNum] [nvarchar](50) NOT NULL, [VendId] [nvarchar](50) NOT NULL, [Site] [nvarchar](50) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TB_ASK] PRIMARY KEY CLUSTERED ( [AskBillNum] 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 /****** Object: Table [dbo].[TB_ASK_DETAIL] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_ASK_DETAIL]( [UID] [int] NOT NULL, [AskBillNum] [nvarchar](50) NOT NULL, [PoBillNum] [nvarchar](50) NOT NULL, [PoLine] [int] NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [AskQty] [money] NOT NULL, [ShippedQty] [money] NOT NULL, [ReceivedQty] [money] NOT NULL, [BeginTime] [datetime2](3) NULL, [EndTime] [datetime2](3) NULL, [PoUnit] [nvarchar](50) NULL, [LocUnit] [nvarchar](50) NULL, [PackQty] [money] NOT NULL, [UnConv] [money] NOT NULL, [DockCode] [nvarchar](50) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](200) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_Table_1] PRIMARY KEY CLUSTERED ( [AskBillNum] ASC, [PoLine] 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 /****** Object: Table [dbo].[TB_ASN] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_ASN]( [UID] [int] IDENTITY(1,1) NOT NULL, [AsnBillNum] [nvarchar](50) NOT NULL, [AskBillNum] [nvarchar](50) NOT NULL, [PoBillNum] [nvarchar](50) NULL, [VendId] [nvarchar](50) NOT NULL, [Site] [nvarchar](50) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](50) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [ShipTime] [datetime2](3) NULL, [ShipUser] [nvarchar](50) NULL, [ReceiveTime] [datetime2](3) NULL, [ReceiveUser] [nvarchar](50) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK7_1_1] PRIMARY KEY NONCLUSTERED ( [AsnBillNum] 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 /****** Object: Table [dbo].[TB_ASN_DETAIL] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_ASN_DETAIL]( [UID] [int] IDENTITY(1,1) NOT NULL, [AsnBillNum] [nvarchar](50) NOT NULL, [PoBillNum] [nvarchar](50) NULL, [PoLine] [int] NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [Batch] [nvarchar](50) NOT NULL, [ProduceDate] [date] NULL, [VendBatch] [nvarchar](50) NULL, [Qty] [money] NOT NULL, [PoUnit] [nvarchar](50) NULL, [LocUnit] [nvarchar](50) NULL, [PackQty] [money] NOT NULL, [UnConv] [money] NOT NULL, [DockCode] [nvarchar](50) NULL, [State] [int] NULL, [Remark] [nvarchar](50) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TF_ASN_DETAIL_1] PRIMARY KEY CLUSTERED ( [AsnBillNum] ASC, [PoLine] ASC, [PartCode] ASC, [Batch] 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 /****** Object: Table [dbo].[TB_INVOICE] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_INVOICE]( [UID] [int] IDENTITY(1,1) NOT NULL, [InvcBillNum] [nvarchar](200) NOT NULL, [Site] [nvarchar](50) NULL, [InvoiceNum] [nvarchar](50) NULL, [ExpressNum] [nvarchar](50) NULL, [VendId] [nvarchar](50) NOT NULL, [Tax] [decimal](18, 2) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](50) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TB_INVOICE] PRIMARY KEY CLUSTERED ( [InvcBillNum] 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 /****** Object: Table [dbo].[TB_INVOICE_DETAIL] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_INVOICE_DETAIL]( [UID] [int] IDENTITY(1,1) NOT NULL, [InvcBillNum] [nvarchar](50) NOT NULL, [RecvBillNum] [nvarchar](50) NULL, [AsnBillNum] [nvarchar](50) NULL, [PoBillNum] [nvarchar](50) NOT NULL, [PoLineNum] [int] NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [Batch] [nvarchar](50) NOT NULL, [ProduceDate] [date] NULL, [VendBatch] [nvarchar](50) NULL, [Qty] [decimal](18, 5) NOT NULL, [PoUnit] [nvarchar](50) NULL, [Price] [decimal](18, 5) NOT NULL, [Currency] [nvarchar](50) NULL, [PackQty] [decimal](18, 5) NULL, [State] [int] NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TB_INVOICE_DETAIL] PRIMARY KEY CLUSTERED ( [UID] 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 /****** Object: Table [dbo].[TB_PLAN] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_PLAN]( [UID] [int] IDENTITY(1,1) NOT NULL, [PlanId] [nvarchar](50) NOT NULL, [PlanName] [nvarchar](250) NULL, [ErpPlanId] [nvarchar](50) NOT NULL, [Version] [nvarchar](50) NOT NULL, [VendId] [nvarchar](50) NOT NULL, [Site] [nvarchar](50) NOT NULL, [PlanType] [int] NOT NULL, [State] [int] NOT NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TS_LONGTERM_PLAN] PRIMARY KEY CLUSTERED ( [PlanId] 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 /****** Object: Table [dbo].[TB_PLAN_DETAIL] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_PLAN_DETAIL]( [UID] [int] NOT NULL, [PlanId] [nvarchar](50) NOT NULL, [PlanPieriod] [nvarchar](50) NOT NULL, [BeginDate] [date] NOT NULL, [EndDate] [date] NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [Qty] [money] NOT NULL, [State] [int] NOT NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TB_PLAN_DETAIL] PRIMARY KEY CLUSTERED ( [PlanId] ASC, [PlanPieriod] ASC, [PartCode] 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 /****** Object: Table [dbo].[TB_PO] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_PO]( [UID] [int] IDENTITY(1,1) NOT NULL, [PoBillNum] [nvarchar](50) NOT NULL, [ErpBillNum] [nvarchar](50) NULL, [VendId] [nvarchar](50) NOT NULL, [ModType] [int] NULL, [Contacter] [nvarchar](50) NULL, [Site] [nvarchar](50) NULL, [Buyer] [nvarchar](50) NULL, [BuyerPhone] [nvarchar](50) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK7_1] PRIMARY KEY NONCLUSTERED ( [PoBillNum] 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 /****** Object: Table [dbo].[TB_PO_DETAIL] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_PO_DETAIL]( [UID] [int] IDENTITY(1,1) NOT NULL, [PoBillNum] [nvarchar](50) NOT NULL, [PoLine] [int] NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [PlanQty] [money] NOT NULL, [ShippedQty] [money] NOT NULL, [ReceivedQty] [money] NOT NULL, [RejectQty] [nvarchar](50) NULL, [BeginTime] [datetime2](3) NULL, [EndTime] [datetime2](3) NULL, [PoUnit] [nvarchar](50) NULL, [LocUnit] [nvarchar](50) NULL, [Price] [money] NOT NULL, [Currency] [nvarchar](50) NULL, [PackQty] [money] NOT NULL, [UnConv] [money] NOT NULL, [DockCode] [nvarchar](50) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](200) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TF_PO_DETAIL_1] PRIMARY KEY CLUSTERED ( [PoBillNum] ASC, [PoLine] 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 /****** Object: Table [dbo].[TB_RECEIVE] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_RECEIVE]( [UID] [int] IDENTITY(1,1) NOT NULL, [RecvBillNum] [nvarchar](50) NOT NULL, [PoBillNum] [nvarchar](50) NOT NULL, [AsnBillNum] [nvarchar](50) NULL, [Site] [nvarchar](50) NULL, [VendId] [nvarchar](50) NOT NULL, [ShipTime] [datetime2](3) NOT NULL, [State] [int] NOT NULL, [Remark] [nvarchar](50) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TB_RECEIVE] PRIMARY KEY CLUSTERED ( [RecvBillNum] 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 /****** Object: Table [dbo].[TB_RECEIVE_DETAIL] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_RECEIVE_DETAIL]( [UID] [int] IDENTITY(1,1) NOT NULL, [RecvBillNum] [nvarchar](50) NOT NULL, [PoBIllNum] [nvarchar](50) NOT NULL, [PoLine] [int] NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [Batch] [nvarchar](50) NOT NULL, [Qty] [money] NOT NULL, [DockCode] [nvarchar](50) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TB_RECEIVE_DETAIL] PRIMARY KEY CLUSTERED ( [RecvBillNum] ASC, [PoBIllNum] ASC, [PoLine] 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 /****** Object: Table [dbo].[TB_REJECT] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_REJECT]( [UID] [int] IDENTITY(1,1) NOT NULL, [RjctBillNum] [nvarchar](50) NOT NULL, [PoBillNum] [nvarchar](50) NOT NULL, [AsnBillNum] [nvarchar](50) NULL, [Site] [nvarchar](50) NULL, [VendId] [nvarchar](50) NOT NULL, [ShipTime] [datetime2](7) NOT NULL, [State] [int] NOT NULL, [Remark] [nvarchar](50) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TB_RETURN] PRIMARY KEY CLUSTERED ( [RjctBillNum] 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 /****** Object: Table [dbo].[TB_REJECT_DETAIL] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TB_REJECT_DETAIL]( [UID] [int] IDENTITY(1,1) NOT NULL, [RjctBillNum] [nvarchar](50) NOT NULL, [PoBillNum] [nvarchar](50) NOT NULL, [PoLine] [int] NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [Batch] [nvarchar](50) NOT NULL, [Qty] [money] NOT NULL, [State] [int] NOT NULL, [Remark] [nvarchar](500) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TB_REJECT_DETAIL] PRIMARY KEY CLUSTERED ( [RjctBillNum] ASC, [PoBillNum] ASC, [PoLine] 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 /****** Object: Table [dbo].[TL_BASEDATA] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TL_BASEDATA]( [UID] [bigint] IDENTITY(1,1) NOT NULL, [UserName] [nvarchar](80) NOT NULL, [LogTime] [datetime] NOT NULL, [LogType] [varchar](50) NOT NULL, [DataType] [varchar](50) NOT NULL, [OldValue] [nvarchar](4000) NOT NULL, [NewValue] [nvarchar](4000) NOT NULL, [Remark] [nvarchar](500) NULL, CONSTRAINT [PK_TL_BASEDATA] PRIMARY KEY CLUSTERED ( [UID] 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 /****** Object: Table [dbo].[TL_BILL] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TL_BILL]( [UID] [bigint] IDENTITY(1,1) NOT NULL, [UserName] [nvarchar](80) NOT NULL, [LogTime] [datetime] NOT NULL, [LogType] [nvarchar](50) NOT NULL, [BillNum] [nvarchar](50) NOT NULL, [BillType] [int] NOT NULL, [Message] [nvarchar](max) NULL, CONSTRAINT [PK_TL_BILL] PRIMARY KEY CLUSTERED ( [UID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO /****** Object: Table [dbo].[TL_USER] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TL_USER]( [UID] [bigint] IDENTITY(1,1) NOT NULL, [UserId] [nvarchar](80) NOT NULL, [UserName] [nvarchar](50) NOT NULL, [LogTime] [datetime] NOT NULL, [LogType] [varchar](50) NOT NULL, [LogSite] [nvarchar](200) NOT NULL, [Message] [nvarchar](max) NULL, CONSTRAINT [PK_TL_LOG] PRIMARY KEY CLUSTERED ( [UID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO /****** Object: Table [dbo].[TS_BARCODE] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TS_BARCODE]( [UID] [bigint] IDENTITY(1,1) NOT NULL, [BarCode] [varchar](50) NOT NULL, [FullBarCode] [varchar](500) NOT NULL, [PartCode] [varchar](50) NOT NULL, [VendPartCode] [varchar](50) NULL, [Batch] [varchar](50) NOT NULL, [ProduceDate] [datetime2](3) NOT NULL, [ManageType] [int] NOT NULL, [SerialNum] [varchar](50) NOT NULL, [Qty] [money] NOT NULL, [BarCodeType] [int] NOT NULL, [BillNum] [varchar](50) NOT NULL, [BillLine] [int] NOT NULL, [VendId] [varchar](50) NULL, [VendBatch] [nvarchar](50) NULL, [PackQty] [money] NOT NULL, [CreateOper] [nvarchar](50) NOT NULL, [CreateTime] [datetime] NOT NULL, [State] [int] NOT NULL, [Remark] [nvarchar](500) NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TS_BARCODE] PRIMARY KEY CLUSTERED ( [BarCode] 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 /****** Object: Table [dbo].[TS_INFO] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TS_INFO]( [UID] [int] IDENTITY(1,1) NOT NULL, [VendId] [nvarchar](50) NULL, [Site] [nvarchar](50) NOT NULL, [InfoType] [int] NULL, [Title] [nvarchar](50) NULL, [Infomation] [text] NULL, [FileName] [nvarchar](500) NULL, [state] [int] NULL, [Remark] [nvarchar](50) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTIme] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NULL, [GUID] [uniqueidentifier] ROWGUIDCOL NOT NULL, CONSTRAINT [PK_TA_Info] PRIMARY KEY CLUSTERED ( [UID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO /****** Object: Table [dbo].[TS_STOCK] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TS_STOCK]( [UID] [bigint] IDENTITY(1,1) NOT NULL, [BarCode] [nvarchar](50) NOT NULL, [LocCode] [nvarchar](50) NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [Batch] [nvarchar](50) NOT NULL, [State] [int] NOT NULL, [Qty] [money] NOT NULL, [VendId] [nvarchar](50) NULL, [VendBatch] [nvarchar](50) NULL, [ReceiveTime] [datetime2](3) NOT NULL, [ProduceDate] [date] NOT NULL, [Remark] [nvarchar](500) NULL, CONSTRAINT [PK_TS_STOCK_DETAIL] PRIMARY KEY CLUSTERED ( [BarCode] ASC, [LocCode] ASC, [State] 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 /****** Object: Table [dbo].[TS_UNI_API] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TS_UNI_API]( [UID] [int] IDENTITY(1,1) NOT NULL, [InterfaceType] [nvarchar](50) NOT NULL, [TableName] [nvarchar](50) NULL, [BillType] [int] NULL, [SubBillType] [int] NULL, [BillNum] [nvarchar](50) NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [Batch] [nvarchar](50) NOT NULL, [FromLoc] [nvarchar](50) NULL, [ToLoc] [nvarchar](50) NULL, [FromErpLoc] [varchar](8) NULL, [ToErpLoc] [varchar](8) NULL, [Qty] [decimal](18, 5) NOT NULL, [State] [int] NOT NULL, [PutTime] [datetime] NOT NULL, [VendId] [nvarchar](50) NULL, [PoUnit] [nvarchar](50) NULL, [LocUnit] [nvarchar](50) NULL, [ValidDate] [datetime] NOT NULL, [ErpBillNum] [nvarchar](50) NULL, [ErpLineNum] [int] NOT NULL, [VendBatch] [nvarchar](50) NULL, [SourceBillNum] [nvarchar](50) NULL, [CreateUser] [nvarchar](50) NULL, [CreateTime] [datetime] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TS_UNI_INTERFACE] PRIMARY KEY CLUSTERED ( [UID] 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 /****** Object: Table [dbo].[TS_UNI_API_HIS] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TS_UNI_API_HIS]( [UID] [int] NOT NULL, [InterfaceType] [nvarchar](50) NOT NULL, [TableName] [nvarchar](50) NULL, [BillType] [int] NULL, [SubBillType] [int] NULL, [BillNum] [nvarchar](50) NOT NULL, [PartCode] [nvarchar](50) NOT NULL, [Batch] [nvarchar](50) NOT NULL, [FromLoc] [nvarchar](50) NULL, [ToLoc] [nvarchar](50) NULL, [FromErpLoc] [varchar](8) NULL, [ToErpLoc] [varchar](8) NULL, [Qty] [decimal](18, 5) NOT NULL, [State] [int] NOT NULL, [PutTime] [datetime] NOT NULL, [VendId] [nvarchar](50) NULL, [PoUnit] [nvarchar](50) NULL, [LocUnit] [nvarchar](50) NULL, [ValidDate] [datetime] NOT NULL, [ErpBillNum] [nvarchar](50) NULL, [ErpLineNum] [int] NOT NULL, [VendBatch] [nvarchar](50) NULL, [SourceBillNum] [nvarchar](50) NULL, [CreateUser] [nvarchar](50) NULL, [CreateTime] [datetime] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TS_UNI_API_HIS_1] PRIMARY KEY CLUSTERED ( [UID] 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 /****** Object: Table [dbo].[TT_CURRENCY] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TT_CURRENCY]( [UID] [int] IDENTITY(1,1) NOT NULL, [CurrencyId] [nvarchar](50) NOT NULL, [CurrencyName] [nvarchar](50) NULL, [State] [int] NOT NULL, [Remark] [nvarchar](50) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TA_CURRENCY] PRIMARY KEY CLUSTERED ( [CurrencyId] 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 /****** Object: Table [dbo].[TT_PROJECT] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TT_PROJECT]( [UID] [int] IDENTITY(1,1) NOT NULL, [ProjectId] [nvarchar](50) NOT NULL, [ProjectName] [nvarchar](50) NOT NULL, [State] [int] NOT NULL, [Remark] [nvarchar](50) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK_TT_PROJECT] PRIMARY KEY CLUSTERED ( [ProjectId] 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 /****** Object: Table [dbo].[TT_UNIT] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[TT_UNIT]( [UID] [int] IDENTITY(1,1) NOT NULL, [UnitId] [nvarchar](50) NOT NULL, [UnitName] [nvarchar](50) NULL, [State] [int] NOT NULL, [Remak] [nvarchar](200) NULL, [CreateTime] [datetime2](3) NOT NULL, [CreateUser] [nvarchar](50) NOT NULL, [UpdateTime] [datetime2](3) NULL, [UpdateUser] [nvarchar](50) NULL, [UpdateInfo] [nvarchar](500) NULL, [IsDeleted] [bit] NOT NULL, [GUID] [uniqueidentifier] NOT NULL, CONSTRAINT [PK17] PRIMARY KEY NONCLUSTERED ( [UnitId] 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 ALTER TABLE [dbo].[ERP_ORDER] ADD CONSTRAINT [DF_ERP_ORDER_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[ERP_ORDER] ADD CONSTRAINT [DF_ERP_ORDER_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[ERP_ORDER] ADD CONSTRAINT [DF_ERP_ORDER_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[ERP_ORDER] ADD CONSTRAINT [DF_ERP_ORDER_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[ERP_ORDER_DETAIL] ADD CONSTRAINT [DF_ERP_ORDER_DETAIL_PartPrice] DEFAULT ((0)) FOR [PartPrice] GO ALTER TABLE [dbo].[ERP_ORDER_DETAIL] ADD CONSTRAINT [DF_ERP_ORDER_DETAIL_PlanQty] DEFAULT ((0)) FOR [PlanQty] GO ALTER TABLE [dbo].[ERP_ORDER_DETAIL] ADD CONSTRAINT [DF_ERP_ORDER_DETAIL_ClosedQty] DEFAULT ((0)) FOR [ClosedQty] GO ALTER TABLE [dbo].[ERP_ORDER_DETAIL] ADD CONSTRAINT [DF_ERP_ORDER_DETAIL_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[ERP_ORDER_DETAIL] ADD CONSTRAINT [DF_ERP_ORDER_DETAIL_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[ERP_ORDER_DETAIL] ADD CONSTRAINT [DF_ERP_ORDER_DETAIL_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[ERP_ORDER_DETAIL] ADD CONSTRAINT [DF_ERP_ORDER_DETAIL_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_State] DEFAULT ((0)) FOR [State] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_BillNumRule] DEFAULT (N'P|D:l|N:4') FOR [BillNumRule] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_LastNumber] DEFAULT ((1)) FOR [LastNumber] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_LastBillNum] DEFAULT ('') FOR [LastBillNum] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_LastBillTime] DEFAULT (getdate()) FOR [LastBillTime] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_PrintTemplateFileName] DEFAULT ('') FOR [PrintTemplateFileName] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_Sep] DEFAULT ('.') FOR [Sep] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_PaperOrientation] DEFAULT ((0)) FOR [PaperOrientation] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TA_BILLTYPE] ADD CONSTRAINT [DF_TA_BILLTYPE_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TA_CONFIG] ADD CONSTRAINT [DF_SYS_CONFIG_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TA_CONFIG] ADD CONSTRAINT [DF_TA_CONFIG_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TA_CONFIG] ADD CONSTRAINT [DF_TA_CONFIG_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TA_CONFIG] ADD CONSTRAINT [DF_TA_CONFIG_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TA_CONFIG] ADD CONSTRAINT [DF_TA_CONFIG_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TA_FACTORY] ADD CONSTRAINT [DF_TA_FACTORY_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TA_FACTORY] ADD CONSTRAINT [DF_TA_FACTORY_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TA_FACTORY] ADD CONSTRAINT [DF_TA_FACTORY_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TA_FACTORY] ADD CONSTRAINT [DF_TA_FACTORY_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TA_FACTORY] ADD CONSTRAINT [DF_TA_FACTORY_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TA_PART] ADD CONSTRAINT [DF_TA_PART_ErpPartCode] DEFAULT ('') FOR [ErpPartCode] GO ALTER TABLE [dbo].[TA_PART] ADD CONSTRAINT [DF_TA_PART_PartName2] DEFAULT ('''') FOR [PartDesc2] GO ALTER TABLE [dbo].[TA_PART] ADD CONSTRAINT [DF_TA_PART_ProjectId] DEFAULT ('') FOR [ProjectId] GO ALTER TABLE [dbo].[TA_PART] ADD CONSTRAINT [DF_TA_PART_Unit] DEFAULT (N'EA') FOR [Unit] GO ALTER TABLE [dbo].[TA_PART] ADD CONSTRAINT [DF_TA_PART_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TA_PART] ADD CONSTRAINT [DF_TA_PART_ValidityDays] DEFAULT ((365)) FOR [ValidityDays] GO ALTER TABLE [dbo].[TA_PART] ADD CONSTRAINT [DF_TA_PART_ReceivePort] DEFAULT ('') FOR [ReceivePort] GO ALTER TABLE [dbo].[TA_PART] ADD CONSTRAINT [DF_TA_PART_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TA_PART] ADD CONSTRAINT [DF_TA_PART_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TA_PART] ADD CONSTRAINT [DF_TA_PART_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TA_PART] ADD CONSTRAINT [DF_TA_PART_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TA_VEND_PART] ADD CONSTRAINT [DF_Table_1_CustId] DEFAULT ('') FOR [VendId] GO ALTER TABLE [dbo].[TA_VEND_PART] ADD CONSTRAINT [DF_TA_Vend_PART_VendPackQty] DEFAULT ((1)) FOR [VendPackQty] GO ALTER TABLE [dbo].[TA_VEND_PART] ADD CONSTRAINT [DF_TA_Vend_PART_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TA_VEND_PART] ADD CONSTRAINT [DF_TA_VEND_PART_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TA_VEND_PART] ADD CONSTRAINT [DF_TA_VEND_PART_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TA_VEND_PART] ADD CONSTRAINT [DF_TA_VEND_PART_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TA_VEND_PART] ADD CONSTRAINT [DF_TA_VEND_PART_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TA_VENDER] ADD CONSTRAINT [DF_TA_SUPERLIER_VendAbbCode] DEFAULT ((0)) FOR [VendAbbCode] GO ALTER TABLE [dbo].[TA_VENDER] ADD CONSTRAINT [DF__t_Supplie__state__56E8E7AB] DEFAULT ((0)) FOR [State] GO ALTER TABLE [dbo].[TA_VENDER] ADD CONSTRAINT [DF_TA_VENDER_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TA_VENDER] ADD CONSTRAINT [DF_TA_VENDER_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TA_VENDER] ADD CONSTRAINT [DF_TA_VENDER_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TA_VENDER] ADD CONSTRAINT [DF_TA_VENDER_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_ASK] ADD CONSTRAINT [DF_TB_ASK_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_ASK] ADD CONSTRAINT [DF_TB_ASK_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_ASK] ADD CONSTRAINT [DF_TB_ASK_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_ASK] ADD CONSTRAINT [DF_TB_ASK_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_ASK] ADD CONSTRAINT [DF_TB_ASK_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_ASK_DETAIL] ADD CONSTRAINT [DF_Table_1_PoLine] DEFAULT ((1)) FOR [PoLine] GO ALTER TABLE [dbo].[TB_ASK_DETAIL] ADD CONSTRAINT [DF_Table_1_BillQty_1] DEFAULT ((0)) FOR [AskQty] GO ALTER TABLE [dbo].[TB_ASK_DETAIL] ADD CONSTRAINT [DF_Table_1_ShippedQty] DEFAULT ((0)) FOR [ShippedQty] GO ALTER TABLE [dbo].[TB_ASK_DETAIL] ADD CONSTRAINT [DF_Table_1_ReceivedQty] DEFAULT ((0)) FOR [ReceivedQty] GO ALTER TABLE [dbo].[TB_ASK_DETAIL] ADD CONSTRAINT [DF_Table_1_PackQty] DEFAULT ((1)) FOR [PackQty] GO ALTER TABLE [dbo].[TB_ASK_DETAIL] ADD CONSTRAINT [DF_TB_ASK_DETAIL_UnConv] DEFAULT ((1)) FOR [UnConv] GO ALTER TABLE [dbo].[TB_ASK_DETAIL] ADD CONSTRAINT [DF_Table_1_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_ASK_DETAIL] ADD CONSTRAINT [DF_Table_1_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_ASK_DETAIL] ADD CONSTRAINT [DF_Table_1_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_ASK_DETAIL] ADD CONSTRAINT [DF_Table_1_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_ASK_DETAIL] ADD CONSTRAINT [DF_Table_1_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_ASN] ADD CONSTRAINT [DF__KF_Suppli__cBill__208CD6FA] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_ASN] ADD CONSTRAINT [DF_TB_ASN_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_ASN] ADD CONSTRAINT [DF_TB_ASN_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_ASN] ADD CONSTRAINT [DF_TF_ASN_ShipTime] DEFAULT ('1-1-1') FOR [ShipTime] GO ALTER TABLE [dbo].[TB_ASN] ADD CONSTRAINT [DF_TB_ASN_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_ASN] ADD CONSTRAINT [DF_TB_ASN_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_ASN_DETAIL] ADD CONSTRAINT [DF_TB_ASN_DETAIL_ErpBillNum] DEFAULT ('') FOR [PoBillNum] GO ALTER TABLE [dbo].[TB_ASN_DETAIL] ADD CONSTRAINT [DF_TF_ASN_DETAIL_PoLineNum] DEFAULT ((1)) FOR [PoLine] GO ALTER TABLE [dbo].[TB_ASN_DETAIL] ADD CONSTRAINT [DF_TF_ASN_DETAIL_ProduceDate] DEFAULT (getdate()) FOR [ProduceDate] GO ALTER TABLE [dbo].[TB_ASN_DETAIL] ADD CONSTRAINT [DF__KF_Supplie__nQty__6CD828CA] DEFAULT ((0)) FOR [Qty] GO ALTER TABLE [dbo].[TB_ASN_DETAIL] ADD CONSTRAINT [DF_TF_ASN_DETAIL_PackQty] DEFAULT ((1)) FOR [PackQty] GO ALTER TABLE [dbo].[TB_ASN_DETAIL] ADD CONSTRAINT [DF_TB_ASN_DETAIL_UnConv] DEFAULT ((1)) FOR [UnConv] GO ALTER TABLE [dbo].[TB_ASN_DETAIL] ADD CONSTRAINT [DF_TF_ASN_DETAIL_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_ASN_DETAIL] ADD CONSTRAINT [DF_TB_ASN_DETAIL_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_ASN_DETAIL] ADD CONSTRAINT [DF_TB_ASN_DETAIL_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_ASN_DETAIL] ADD CONSTRAINT [DF_TB_ASN_DETAIL_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_ASN_DETAIL] ADD CONSTRAINT [DF_TB_ASN_DETAIL_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_INVOICE] ADD CONSTRAINT [DF_TB_INVOICE_Tax] DEFAULT ((0.16)) FOR [Tax] GO ALTER TABLE [dbo].[TB_INVOICE] ADD CONSTRAINT [DF_TB_INVOICE_State] DEFAULT ((0)) FOR [State] GO ALTER TABLE [dbo].[TB_INVOICE] ADD CONSTRAINT [DF_TB_INVOICE_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_INVOICE] ADD CONSTRAINT [DF_TB_INVOICE_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_INVOICE] ADD CONSTRAINT [DF_TB_INVOICE_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_INVOICE] ADD CONSTRAINT [DF_TB_INVOICE_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_INVOICE_DETAIL] ADD CONSTRAINT [DF_TB_INVOICE_DETAIL_PoLineNum] DEFAULT ((1)) FOR [PoLineNum] GO ALTER TABLE [dbo].[TB_INVOICE_DETAIL] ADD CONSTRAINT [DF_TB_INVOICE_DETAIL_ProduceDate] DEFAULT (getdate()) FOR [ProduceDate] GO ALTER TABLE [dbo].[TB_INVOICE_DETAIL] ADD CONSTRAINT [DF_Table_1_BillQty] DEFAULT ((0)) FOR [Qty] GO ALTER TABLE [dbo].[TB_INVOICE_DETAIL] ADD CONSTRAINT [DF_TB_INVOICE_DETAIL_Price] DEFAULT ((0)) FOR [Price] GO ALTER TABLE [dbo].[TB_INVOICE_DETAIL] ADD CONSTRAINT [DF_TB_INVOICE_DETAIL_PackQty] DEFAULT ((1)) FOR [PackQty] GO ALTER TABLE [dbo].[TB_INVOICE_DETAIL] ADD CONSTRAINT [DF_TB_INVOICE_DETAIL_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_INVOICE_DETAIL] ADD CONSTRAINT [DF_TB_INVOICE_DETAIL_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_INVOICE_DETAIL] ADD CONSTRAINT [DF_TB_INVOICE_DETAIL_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_INVOICE_DETAIL] ADD CONSTRAINT [DF_TB_INVOICE_DETAIL_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_INVOICE_DETAIL] ADD CONSTRAINT [DF_TB_INVOICE_DETAIL_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_PLAN] ADD CONSTRAINT [DF_TS_LONGTERM_PLAN_PlanType] DEFAULT ((1)) FOR [PlanType] GO ALTER TABLE [dbo].[TB_PLAN] ADD CONSTRAINT [DF_TS_LONGTERM_PLAN_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_PLAN] ADD CONSTRAINT [DF_TS_LONGTERM_PLAN_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_PLAN] ADD CONSTRAINT [DF_TS_LONGTERM_PLAN_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_PLAN] ADD CONSTRAINT [DF_TS_LONGTERM_PLAN_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_PLAN] ADD CONSTRAINT [DF_TS_LONGTERM_PLAN_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_PLAN_DETAIL] ADD CONSTRAINT [DF_TB_PLAN_DETAIL_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_PLAN_DETAIL] ADD CONSTRAINT [DF_TB_PLAN_DETAIL_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_PLAN_DETAIL] ADD CONSTRAINT [DF_TB_PLAN_DETAIL_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_PLAN_DETAIL] ADD CONSTRAINT [DF_TB_PLAN_DETAIL_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_PLAN_DETAIL] ADD CONSTRAINT [DF_TB_PLAN_DETAIL_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_PO] ADD CONSTRAINT [DF__KF_Purcha__cBill__3E1D39E1] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_PO] ADD CONSTRAINT [DF_TB_PO_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_PO] ADD CONSTRAINT [DF_TB_PO_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_PO] ADD CONSTRAINT [DF_TB_PO_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_PO] ADD CONSTRAINT [DF_TB_PO_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF_TF_PO_DETAIL_Line] DEFAULT ((1)) FOR [PoLine] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF__KF_Purchas__nQty__5BAD9CC8] DEFAULT ((0)) FOR [PlanQty] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF_TF_PO_D_dClosedQty] DEFAULT ((0)) FOR [ShippedQty] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF_TF_PO_DETAIL_ReceivedQty] DEFAULT ((0)) FOR [ReceivedQty] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF_TF_PO_DETAIL_PurchasePrice] DEFAULT ((0)) FOR [Price] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF_TF_PO_DETAIL_PackQty] DEFAULT ((1)) FOR [PackQty] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF_TB_PO_DETAIL_UnConv] DEFAULT ((1)) FOR [UnConv] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF_TF_PO_DETAIL_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF_TB_PO_DETAIL_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF_TB_PO_DETAIL_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF_TB_PO_DETAIL_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_PO_DETAIL] ADD CONSTRAINT [DF_TB_PO_DETAIL_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_RECEIVE] ADD CONSTRAINT [DF_TB_RECEIVE_ShipTime] DEFAULT (sysdatetime()) FOR [ShipTime] GO ALTER TABLE [dbo].[TB_RECEIVE] ADD CONSTRAINT [DF_TB_RECEIVE_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_RECEIVE] ADD CONSTRAINT [DF_TB_RECEIVE_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_RECEIVE] ADD CONSTRAINT [DF_TB_RECEIVE_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_RECEIVE] ADD CONSTRAINT [DF_TB_RECEIVE_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_RECEIVE_DETAIL] ADD CONSTRAINT [DF_TB_RECEIVE_DETAIL_PoBIllNum] DEFAULT ('') FOR [PoBIllNum] GO ALTER TABLE [dbo].[TB_RECEIVE_DETAIL] ADD CONSTRAINT [DF_TB_RECEIVE_DETAIL_PoLineNum] DEFAULT ((1)) FOR [PoLine] GO ALTER TABLE [dbo].[TB_RECEIVE_DETAIL] ADD CONSTRAINT [DF_Table_1_ClosedQty] DEFAULT ((0)) FOR [Qty] GO ALTER TABLE [dbo].[TB_RECEIVE_DETAIL] ADD CONSTRAINT [DF_TB_RECEIVE_DETAIL_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_RECEIVE_DETAIL] ADD CONSTRAINT [DF_TB_RECEIVE_DETAIL_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_RECEIVE_DETAIL] ADD CONSTRAINT [DF_TB_RECEIVE_DETAIL_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_RECEIVE_DETAIL] ADD CONSTRAINT [DF_TB_RECEIVE_DETAIL_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_RECEIVE_DETAIL] ADD CONSTRAINT [DF_TB_RECEIVE_DETAIL_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_REJECT] ADD CONSTRAINT [DF_TB_RETURN_ShipTime] DEFAULT (sysdatetime()) FOR [ShipTime] GO ALTER TABLE [dbo].[TB_REJECT] ADD CONSTRAINT [DF_TB_RETURN_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_REJECT] ADD CONSTRAINT [DF_TB_REJECT_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_REJECT] ADD CONSTRAINT [DF_TB_REJECT_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_REJECT] ADD CONSTRAINT [DF_TB_REJECT_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TB_REJECT_DETAIL] ADD CONSTRAINT [DF_TB_REJECT_DETAIL_PoBillNum] DEFAULT ('') FOR [PoBillNum] GO ALTER TABLE [dbo].[TB_REJECT_DETAIL] ADD CONSTRAINT [DF_TB_RETURN_DETAIL_PoLineNum] DEFAULT ((1)) FOR [PoLine] GO ALTER TABLE [dbo].[TB_REJECT_DETAIL] ADD CONSTRAINT [DF_TB_RETURN_DETAIL_ReceivedQty] DEFAULT ((0)) FOR [Qty] GO ALTER TABLE [dbo].[TB_REJECT_DETAIL] ADD CONSTRAINT [DF_TB_RETURN_DETAIL_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TB_REJECT_DETAIL] ADD CONSTRAINT [DF_TB_REJECT_DETAIL_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TB_REJECT_DETAIL] ADD CONSTRAINT [DF_TB_REJECT_DETAIL_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TB_REJECT_DETAIL] ADD CONSTRAINT [DF_TB_REJECT_DETAIL_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TB_REJECT_DETAIL] ADD CONSTRAINT [DF_TB_REJECT_DETAIL_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TL_BASEDATA] ADD CONSTRAINT [DF_TL_BASEDATA_LogTime] DEFAULT (getdate()) FOR [LogTime] GO ALTER TABLE [dbo].[TL_BASEDATA] ADD CONSTRAINT [DF_Table_1_LogSite] DEFAULT ('') FOR [OldValue] GO ALTER TABLE [dbo].[TL_BASEDATA] ADD CONSTRAINT [DF_TL_BASEDATA_NewValue] DEFAULT ('') FOR [NewValue] GO ALTER TABLE [dbo].[TL_BILL] ADD CONSTRAINT [DF_TL_BILL_LogTime] DEFAULT (getdate()) FOR [LogTime] GO ALTER TABLE [dbo].[TL_BILL] ADD CONSTRAINT [DF_Table_1_OldData] DEFAULT ((0)) FOR [BillNum] GO ALTER TABLE [dbo].[TL_USER] ADD CONSTRAINT [DF_TL_LOG_LogTime] DEFAULT (getdate()) FOR [LogTime] GO ALTER TABLE [dbo].[TL_USER] ADD CONSTRAINT [DF_TL_LOG_LogSite] DEFAULT ((0)) FOR [LogSite] GO ALTER TABLE [dbo].[TS_BARCODE] ADD CONSTRAINT [DF_TS_BARCODE_Batch] DEFAULT (N'‘’‘’') FOR [Batch] GO ALTER TABLE [dbo].[TS_BARCODE] ADD CONSTRAINT [DF_TS_BARCODE_ProduceDate] DEFAULT (sysdatetime()) FOR [ProduceDate] GO ALTER TABLE [dbo].[TS_BARCODE] ADD CONSTRAINT [DF_TS_BARCODE_SerialNum] DEFAULT ('''') FOR [SerialNum] GO ALTER TABLE [dbo].[TS_BARCODE] ADD CONSTRAINT [DF_TS_BARCODE_Qty] DEFAULT ((1)) FOR [Qty] GO ALTER TABLE [dbo].[TS_BARCODE] ADD CONSTRAINT [DF_TS_BARCODE_SourceBillNum] DEFAULT ('‘’') FOR [BillNum] GO ALTER TABLE [dbo].[TS_BARCODE] ADD CONSTRAINT [DF_TS_BARCODE_BillLine] DEFAULT ((0)) FOR [BillLine] GO ALTER TABLE [dbo].[TS_BARCODE] ADD CONSTRAINT [DF_TS_BARCODE_PackQty] DEFAULT ((1)) FOR [PackQty] GO ALTER TABLE [dbo].[TS_BARCODE] ADD CONSTRAINT [DF_TS_BARCODE_CreateOper] DEFAULT (N'‘’‘’') FOR [CreateOper] GO ALTER TABLE [dbo].[TS_BARCODE] ADD CONSTRAINT [DF_TS_BARCODE_CreateTime] DEFAULT (getdate()) FOR [CreateTime] GO ALTER TABLE [dbo].[TS_BARCODE] ADD CONSTRAINT [DF_TS_BARCODE_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TS_BARCODE] ADD CONSTRAINT [DF_TS_BARCODE_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TS_INFO] ADD CONSTRAINT [DF_TS_INFO_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TS_INFO] ADD CONSTRAINT [DF_TS_INFO_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TS_INFO] ADD CONSTRAINT [DF_TS_INFO_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TS_INFO] ADD CONSTRAINT [DF_TA_INFO_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TS_STOCK] ADD CONSTRAINT [DF_TS_STOCK_DETAIL_Batch] DEFAULT (N'‘’‘’') FOR [Batch] GO ALTER TABLE [dbo].[TS_STOCK] ADD CONSTRAINT [DF_TS_STOCK_DETAIL_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TS_STOCK] ADD CONSTRAINT [DF_TS_UNIQUE_STOCK_Qty] DEFAULT ((1)) FOR [Qty] GO ALTER TABLE [dbo].[TS_STOCK] ADD CONSTRAINT [DF_TS_STOCK_DETAIL_VendBatch] DEFAULT ('') FOR [VendBatch] GO ALTER TABLE [dbo].[TS_STOCK] ADD CONSTRAINT [DF_TS_STOCK_DETAIL_ReceiveDate] DEFAULT (getdate()) FOR [ReceiveTime] GO ALTER TABLE [dbo].[TS_STOCK] ADD CONSTRAINT [DF_TS_STOCK_DETAIL_ProduceDate] DEFAULT ('1-1-1') FOR [ProduceDate] GO ALTER TABLE [dbo].[TS_UNI_API] ADD CONSTRAINT [DF_TS_UNI_INTERFACE_Qty] DEFAULT ((0)) FOR [Qty] GO ALTER TABLE [dbo].[TS_UNI_API] ADD CONSTRAINT [DF_TS_UNI_INTERFACE_State] DEFAULT ((0)) FOR [State] GO ALTER TABLE [dbo].[TS_UNI_API] ADD CONSTRAINT [DF_TS_UNI_INTERFACE_PutTime] DEFAULT (getdate()) FOR [PutTime] GO ALTER TABLE [dbo].[TS_UNI_API] ADD CONSTRAINT [DF_TS_UNI_INTERFACE_ValidDate] DEFAULT (getdate()) FOR [ValidDate] GO ALTER TABLE [dbo].[TS_UNI_API] ADD CONSTRAINT [DF_TS_UNI_INTERFACE_ErpLineNum] DEFAULT ((0)) FOR [ErpLineNum] GO ALTER TABLE [dbo].[TS_UNI_API] ADD CONSTRAINT [DF_TS_UNI_INTERFACE_CreateTime] DEFAULT (getdate()) FOR [CreateTime] GO ALTER TABLE [dbo].[TS_UNI_API] ADD CONSTRAINT [DF_TS_UNI_API_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TS_UNI_API_HIS] ADD CONSTRAINT [DF_TS_UNI_API_HIS_Qty_1] DEFAULT ((0)) FOR [Qty] GO ALTER TABLE [dbo].[TS_UNI_API_HIS] ADD CONSTRAINT [DF_TS_UNI_API_HIS_State_1] DEFAULT ((0)) FOR [State] GO ALTER TABLE [dbo].[TS_UNI_API_HIS] ADD CONSTRAINT [DF_TS_UNI_API_HIS_PutTime_1] DEFAULT (getdate()) FOR [PutTime] GO ALTER TABLE [dbo].[TS_UNI_API_HIS] ADD CONSTRAINT [DF_TS_UNI_API_HIS_ValidDate_1] DEFAULT (getdate()) FOR [ValidDate] GO ALTER TABLE [dbo].[TS_UNI_API_HIS] ADD CONSTRAINT [DF_TS_UNI_API_HIS_ErpLineNum_1] DEFAULT ((0)) FOR [ErpLineNum] GO ALTER TABLE [dbo].[TS_UNI_API_HIS] ADD CONSTRAINT [DF_TS_UNI_API_HIS_CreateTime_1] DEFAULT (getdate()) FOR [CreateTime] GO ALTER TABLE [dbo].[TS_UNI_API_HIS] ADD CONSTRAINT [DF_TS_UNI_API_HIS_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TT_CURRENCY] ADD CONSTRAINT [DF_TT_CURRENCY_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TT_CURRENCY] ADD CONSTRAINT [DF_TT_CURRENCY_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TT_CURRENCY] ADD CONSTRAINT [DF_TT_CURRENCY_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TT_CURRENCY] ADD CONSTRAINT [DF_TT_CURRENCY_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TT_CURRENCY] ADD CONSTRAINT [DF_TT_CURRENCY_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TT_PROJECT] ADD CONSTRAINT [DF_TT_PROJECT_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TT_PROJECT] ADD CONSTRAINT [DF_TT_PROJECT_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TT_PROJECT] ADD CONSTRAINT [DF_TT_PROJECT_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TT_PROJECT] ADD CONSTRAINT [DF_TT_PROJECT_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TT_PROJECT] ADD CONSTRAINT [DF_TT_PROJECT_GUID] DEFAULT (newid()) FOR [GUID] GO ALTER TABLE [dbo].[TT_UNIT] ADD CONSTRAINT [DF_TT_UNIT_State] DEFAULT ((1)) FOR [State] GO ALTER TABLE [dbo].[TT_UNIT] ADD CONSTRAINT [DF_TT_UNIT_CreateTime] DEFAULT (sysdatetime()) FOR [CreateTime] GO ALTER TABLE [dbo].[TT_UNIT] ADD CONSTRAINT [DF_TT_UNIT_CreateUser] DEFAULT ('') FOR [CreateUser] GO ALTER TABLE [dbo].[TT_UNIT] ADD CONSTRAINT [DF_TT_UNIT_IsDeleted] DEFAULT ((0)) FOR [IsDeleted] GO ALTER TABLE [dbo].[TT_UNIT] ADD CONSTRAINT [DF_TT_UNIT_GUID] DEFAULT (newid()) FOR [GUID] GO /****** Object: StoredProcedure [dbo].[P_GetAllTables] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO create procedure [dbo].[P_GetAllTables] as begin SELECT 表名 = Case When A.colorder=1 Then D.name Else '' End, 表说明 = Case When A.colorder=1 Then isnull(F.value,'') Else '' End, -- 表名 = D.name, -- 表说明 = isnull(F.value,''), 字段序号 = A.colorder, 字段名 = A.name, 字段说明 = isnull(G.[value],''), 自增长 = Case When COLUMNPROPERTY( A.id,A.name,'IsIdentity')=1 Then '●'Else '' End, 主键 = Case When exists(SELECT 1 FROM sysobjects Where xtype='PK' and parent_obj=A.id and name in ( SELECT name FROM sysindexes WHERE indid in( SELECT indid FROM sysindexkeys WHERE id = A.id AND colid=A.colid))) then '●' else '' end, 类型 = B.name, 长度 = COLUMNPROPERTY(A.id,A.name,'PRECISION'), 小数位数 = isnull(COLUMNPROPERTY(A.id,A.name,'Scale'),0), 允许空 = Case When A.isnullable=1 Then '●'Else '' End, 默认值 = isnull(E.Text,''), 占用字节数 = A.Length FROM syscolumns A Left Join systypes B On A.xusertype=B.xusertype Inner Join sysobjects D On A.id=D.id and D.xtype='U' and D.name<>'dtproperties' Left Join syscomments E on A.cdefault=E.id Left Join sys.extended_properties G on A.id=G.major_id and A.colid=G.minor_id Left Join sys.extended_properties F On D.id=F.major_id and F.minor_id=0 --where d.name='OrderInfo' --如果只查询指定表,加上此条件 Order By D.Name,A.id,A.colorder end GO /****** Object: StoredProcedure [dbo].[p_GetTableRows] Script Date: 2018-05-02 20:47:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO create procedure [dbo].[p_GetTableRows] as begin SELECT a.name, b.rows FROM sysobjects AS a INNER JOIN sysindexes AS b ON a.id = b.id WHERE (a.type = 'u') AND (b.indid IN (0, 1)) ORDER BY b.rows desc,a.name DESC end GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER', @level2type=N'COLUMN',@level2name=N'ErpBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据类型(1:日程单,2:离散订单)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER', @level2type=N'COLUMN',@level2name=N'ModType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'联系人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER', @level2type=N'COLUMN',@level2name=N'Contacter' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER', @level2type=N'COLUMN',@level2name=N'Site' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购员' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER', @level2type=N'COLUMN',@level2name=N'Buyer' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购员电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER', @level2type=N'COLUMN',@level2name=N'BuyerPhone' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态(1:有效,0:无效)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER', @level2type=N'COLUMN',@level2name=N'CreateTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER', @level2type=N'COLUMN',@level2name=N'CreateUser' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP主表(记录从接口获取的所有数据)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'ErpBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单行' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'PoLine' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单价格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'PartPrice' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货开始时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'BeginTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货结束时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'EndTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'计划数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'PlanQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'已结数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'ClosedQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货口' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'DockCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态(1:有效,0:无效)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'CreateTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL', @level2type=N'COLUMN',@level2name=N'CreateUser' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP订单明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ERP_ORDER_DETAIL' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'BillType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类型名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'TypeName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'TypeDesc' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'前缀' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'Prefix' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号规则' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'BillNumRule' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最终序号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'LastNumber' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最终单据编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'LastBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最终单据时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'LastBillTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'打印模板文件' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'PrintTemplateFileName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'导入模板文件名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'ImportTemplateFileName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号分隔符(".")' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE', @level2type=N'COLUMN',@level2name=N'Sep' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据类型表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_BILLTYPE' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'参数名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_CONFIG', @level2type=N'COLUMN',@level2name=N'ParamName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'参数值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_CONFIG', @level2type=N'COLUMN',@level2name=N'ParamValue' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_CONFIG', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_CONFIG', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'系统配置表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_CONFIG' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工厂编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_FACTORY', @level2type=N'COLUMN',@level2name=N'FactoryId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工厂名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_FACTORY', @level2type=N'COLUMN',@level2name=N'FactoryName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_FACTORY', @level2type=N'COLUMN',@level2name=N'ErpSite' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP域' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_FACTORY', @level2type=N'COLUMN',@level2name=N'ErpDomain' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_FACTORY', @level2type=N'COLUMN',@level2name=N'Address' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮编' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_FACTORY', @level2type=N'COLUMN',@level2name=N'ZipCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工厂表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_FACTORY' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'ErpPartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件描述1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'PartDesc1' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件描述2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'PartDesc2' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'ProjectId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'Unit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件组' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'PartGroup' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态(0:失效 1:有效)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'配置信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'Configuration' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'保质期(天)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'ValidityDays' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货口' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'ReceivePort' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'托盘尺寸' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'PalletSize' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_PART' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VEND_PART', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VEND_PART', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VEND_PART', @level2type=N'COLUMN',@level2name=N'VendPartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商包装数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VEND_PART', @level2type=N'COLUMN',@level2name=N'VendPackQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VEND_PART', @level2type=N'COLUMN',@level2name=N'PoUnit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态(0:失效 1:有效)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VEND_PART', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VEND_PART', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商零件表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VEND_PART' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'VendName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商缩写' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'VendAbbCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商类型 (1:国内,1:国外)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'VendType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'国家' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'Country' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'城市' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'City' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'币种' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'Currency' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'Address' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮编' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'ZipCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'联系人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'Contacter' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'Phone' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'传真' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'Fax' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电子邮件' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'Email' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TA_VENDER' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'要货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK', @level2type=N'COLUMN',@level2name=N'AskBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK', @level2type=N'COLUMN',@level2name=N'PoBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK', @level2type=N'COLUMN',@level2name=N'Site' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'要货主表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'要货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'AskBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'PoBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单行' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'PoLine' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'要货数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'AskQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'已发数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'ShippedQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'已收数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'ReceivedQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货开始时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'BeginTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货结束时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'EndTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'PoUnit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标包数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'PackQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'转换率' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'UnConv' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货口' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'DockCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'要货明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASK_DETAIL' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN', @level2type=N'COLUMN',@level2name=N'AsnBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'要货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN', @level2type=N'COLUMN',@level2name=N'AskBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN', @level2type=N'COLUMN',@level2name=N'PoBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN', @level2type=N'COLUMN',@level2name=N'Site' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发货时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN', @level2type=N'COLUMN',@level2name=N'ShipTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN', @level2type=N'COLUMN',@level2name=N'ReceiveTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发货单主表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'AsnBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'PoBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单行' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'PoLine' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'物料号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'Batch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生产日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'ProduceDate' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'VendBatch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发货数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'Qty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'PoUnit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'存储单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'LocUnit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标包数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'PackQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'转换率' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'UnConv' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货口' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'DockCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态 ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发货单明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_ASN_DETAIL' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发票单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE', @level2type=N'COLUMN',@level2name=N'InvcBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE', @level2type=N'COLUMN',@level2name=N'Site' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'金税发票编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE', @level2type=N'COLUMN',@level2name=N'InvoiceNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'快递单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE', @level2type=N'COLUMN',@level2name=N'ExpressNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供货商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'税率' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE', @level2type=N'COLUMN',@level2name=N'Tax' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发票主表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发票单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'InvcBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'RecvBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'AsnBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'PoBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单行' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'PoLineNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'Batch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生产日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'ProduceDate' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'VendBatch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'Qty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'PoUnit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'价格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'Price' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'货币' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'Currency' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标包数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'PackQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态 0:不合格 1:合格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发票明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_INVOICE_DETAIL' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N' 计划单号(ERP计划单号+版本号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN', @level2type=N'COLUMN',@level2name=N'PlanId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'计划单名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN', @level2type=N'COLUMN',@level2name=N'PlanName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP计划单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN', @level2type=N'COLUMN',@level2name=N'ErpPlanId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'版本号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN', @level2type=N'COLUMN',@level2name=N'Version' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN', @level2type=N'COLUMN',@level2name=N'Site' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'计划类型(0:预测计划,1:固定计划)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN', @level2type=N'COLUMN',@level2name=N'PlanType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'计划主表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'计划单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN_DETAIL', @level2type=N'COLUMN',@level2name=N'PlanId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(D:日,W:周,M:月)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN_DETAIL', @level2type=N'COLUMN',@level2name=N'PlanPieriod' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开始日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN_DETAIL', @level2type=N'COLUMN',@level2name=N'BeginDate' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结束日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN_DETAIL', @level2type=N'COLUMN',@level2name=N'EndDate' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN_DETAIL', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN_DETAIL', @level2type=N'COLUMN',@level2name=N'Qty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'计划明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PLAN_DETAIL' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO', @level2type=N'COLUMN',@level2name=N'PoBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO', @level2type=N'COLUMN',@level2name=N'ErpBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据类型(1:日程单,2:离散订单)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO', @level2type=N'COLUMN',@level2name=N'ModType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'联系人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO', @level2type=N'COLUMN',@level2name=N'Contacter' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO', @level2type=N'COLUMN',@level2name=N'Site' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购员' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO', @level2type=N'COLUMN',@level2name=N'Buyer' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购员电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO', @level2type=N'COLUMN',@level2name=N'BuyerPhone' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单主表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'PoBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单行' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'PoLine' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订货数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'PlanQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'已发数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'ShippedQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'已收数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'ReceivedQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'已退数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'RejectQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货开始时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'BeginTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货结束时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'EndTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'PoUnit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'存储单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'LocUnit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'价格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'Price' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'币种' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'Currency' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标包数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'PackQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单明细表 ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_PO_DETAIL' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE', @level2type=N'COLUMN',@level2name=N'RecvBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE', @level2type=N'COLUMN',@level2name=N'PoBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE', @level2type=N'COLUMN',@level2name=N'AsnBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE', @level2type=N'COLUMN',@level2name=N'Site' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供货商名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发货时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE', @level2type=N'COLUMN',@level2name=N'ShipTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'制单人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE', @level2type=N'COLUMN',@level2name=N'CreateUser' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货单主表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE_DETAIL', @level2type=N'COLUMN',@level2name=N'RecvBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE_DETAIL', @level2type=N'COLUMN',@level2name=N'PoBIllNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单行' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE_DETAIL', @level2type=N'COLUMN',@level2name=N'PoLine' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE_DETAIL', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE_DETAIL', @level2type=N'COLUMN',@level2name=N'Batch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'已结束量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE_DETAIL', @level2type=N'COLUMN',@level2name=N'Qty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货口' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE_DETAIL', @level2type=N'COLUMN',@level2name=N'DockCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态 0:不合格 1:合格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE_DETAIL', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'制单人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE_DETAIL', @level2type=N'COLUMN',@level2name=N'CreateUser' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_RECEIVE_DETAIL' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'退货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT', @level2type=N'COLUMN',@level2name=N'RjctBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT', @level2type=N'COLUMN',@level2name=N'PoBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT', @level2type=N'COLUMN',@level2name=N'AsnBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT', @level2type=N'COLUMN',@level2name=N'Site' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供货商名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发货时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT', @level2type=N'COLUMN',@level2name=N'ShipTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'制单人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT', @level2type=N'COLUMN',@level2name=N'CreateUser' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'退货单主表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'退货单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT_DETAIL', @level2type=N'COLUMN',@level2name=N'RjctBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT_DETAIL', @level2type=N'COLUMN',@level2name=N'PoBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单行' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT_DETAIL', @level2type=N'COLUMN',@level2name=N'PoLine' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT_DETAIL', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT_DETAIL', @level2type=N'COLUMN',@level2name=N'Batch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'退货数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT_DETAIL', @level2type=N'COLUMN',@level2name=N'Qty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态 0:不合格 1:合格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT_DETAIL', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'制单人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT_DETAIL', @level2type=N'COLUMN',@level2name=N'CreateUser' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'退货明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TB_REJECT_DETAIL' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BASEDATA', @level2type=N'COLUMN',@level2name=N'UserName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BASEDATA', @level2type=N'COLUMN',@level2name=N'LogTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BASEDATA', @level2type=N'COLUMN',@level2name=N'LogType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志级别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BASEDATA', @level2type=N'COLUMN',@level2name=N'DataType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'原值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BASEDATA', @level2type=N'COLUMN',@level2name=N'OldValue' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BASEDATA', @level2type=N'COLUMN',@level2name=N'NewValue' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BASEDATA', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'基础数据修改日志表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BASEDATA' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BILL', @level2type=N'COLUMN',@level2name=N'UserName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BILL', @level2type=N'COLUMN',@level2name=N'LogTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BILL', @level2type=N'COLUMN',@level2name=N'LogType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BILL', @level2type=N'COLUMN',@level2name=N'BillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BILL', @level2type=N'COLUMN',@level2name=N'BillType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BILL', @level2type=N'COLUMN',@level2name=N'Message' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据状态变更日志表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_BILL' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作员工号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_USER', @level2type=N'COLUMN',@level2name=N'UserId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作员姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_USER', @level2type=N'COLUMN',@level2name=N'UserName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_USER', @level2type=N'COLUMN',@level2name=N'LogTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_USER', @level2type=N'COLUMN',@level2name=N'LogType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'IP或机器名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_USER', @level2type=N'COLUMN',@level2name=N'LogSite' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_USER', @level2type=N'COLUMN',@level2name=N'Message' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作员日志表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TL_USER' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标签号(批次管理不带流水号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'BarCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'完整标签号(批次管理也带流水号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'FullBarCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'VendPartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'Batch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生产日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'ProduceDate' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'ManageType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'流水号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'SerialNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'Qty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1:一维码 2:二维码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'BarCodeType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购订单号(生产计划号)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'BillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据行' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'BillLine' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'VendBatch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标包数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'PackQty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'CreateOper' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'CreateTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态(0:待检,1:合格,2:不合格,3:过期,4:待判定)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标签表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_BARCODE' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_INFO', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_INFO', @level2type=N'COLUMN',@level2name=N'Site' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'信息类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_INFO', @level2type=N'COLUMN',@level2name=N'InfoType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_INFO', @level2type=N'COLUMN',@level2name=N'Title' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'信息内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_INFO', @level2type=N'COLUMN',@level2name=N'Infomation' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'附件文件名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_INFO', @level2type=N'COLUMN',@level2name=N'FileName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_INFO', @level2type=N'COLUMN',@level2name=N'state' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布信息表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_INFO' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标签号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK', @level2type=N'COLUMN',@level2name=N'BarCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'库位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK', @level2type=N'COLUMN',@level2name=N'LocCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK', @level2type=N'COLUMN',@level2name=N'Batch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK', @level2type=N'COLUMN',@level2name=N'Qty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK', @level2type=N'COLUMN',@level2name=N'VendBatch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK', @level2type=N'COLUMN',@level2name=N'ReceiveTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生产时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK', @level2type=N'COLUMN',@level2name=N'ProduceDate' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'原料库存表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_STOCK' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'InterfaceType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口表名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'TableName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'BillType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'子单据类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'SubBillType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'BillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'Batch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'来源库位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'FromLoc' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'目标库位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'ToLoc' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'来源ERP库位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'FromErpLoc' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'目标ERP库位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'ToErpLoc' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'Qty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'PutTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'PoUnit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'存储单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'LocUnit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生效日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'ValidDate' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP单据号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'ErpBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP行号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'ErpLineNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'VendBatch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上游单据号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'SourceBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'CreateUser' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API', @level2type=N'COLUMN',@level2name=N'CreateTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口记录表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'InterfaceType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口表名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'TableName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'BillType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'子单据类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'SubBillType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单据编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'BillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'PartCode' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'Batch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'来源库位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'FromLoc' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'目标库位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'ToLoc' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'来源ERP库位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'FromErpLoc' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'目标ERP库位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'ToErpLoc' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'Qty' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'PutTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'VendId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采购单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'PoUnit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'存储单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'LocUnit' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生效日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'ValidDate' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP单据号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'ErpBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ERP行号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'ErpLineNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商批次' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'VendBatch' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上游单据号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'SourceBillNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'CreateUser' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS', @level2type=N'COLUMN',@level2name=N'CreateTime' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口记录历史表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TS_UNI_API_HIS' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'币种' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_CURRENCY', @level2type=N'COLUMN',@level2name=N'CurrencyId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'货币描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_CURRENCY', @level2type=N'COLUMN',@level2name=N'CurrencyName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_CURRENCY', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_CURRENCY', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'币种表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_CURRENCY' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_PROJECT', @level2type=N'COLUMN',@level2name=N'ProjectId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_PROJECT', @level2type=N'COLUMN',@level2name=N'ProjectName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_PROJECT', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_PROJECT', @level2type=N'COLUMN',@level2name=N'Remark' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_PROJECT' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_UNIT', @level2type=N'COLUMN',@level2name=N'UnitId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单位名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_UNIT', @level2type=N'COLUMN',@level2name=N'UnitName' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_UNIT', @level2type=N'COLUMN',@level2name=N'State' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_UNIT', @level2type=N'COLUMN',@level2name=N'Remak' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'计量单位表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TT_UNIT' GO USE [master] GO ALTER DATABASE [SCP] SET READ_WRITE GO