USE [CallCenter_XinXiangXLX]
GO

/****** Object:  Table [dbo].[T_Cus_CustomerBaseNew]    Script Date: 06/10/2019 09:17:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[T_Cus_CustomerBaseNew]') AND type in (N'U'))
DROP TABLE [dbo].[T_Cus_CustomerBaseNew]
GO

USE [CallCenter_XinXiangXLX]
GO

/****** Object:  Table [dbo].[T_Cus_CustomerBaseNew]    Script Date: 06/10/2019 09:17:58 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[T_Cus_CustomerBaseNew](
	[F_CustomerId] [int] IDENTITY(1,1) NOT NULL,
	[F_CustomerCode] [nvarchar](100) NULL,--客户编码:10位数字
	[F_CompanyName] [nvarchar](200) NULL,--公司名称
	[F_AreaID] [int] NULL,--大区
	[F_BranchID] [int] NULL,--分公司
	[F_Salesman] [nvarchar](200) NULL,--业务员
	[F_SalesPhone] [nvarchar](200) NULL,--业务员电话
	[F_CustomerNature] [nvarchar](200) NULL,--客户性质
	[F_Channel] [nvarchar](200) NULL,--渠道类型:总经销、二级商、种田大户、农户、化工客户、公司员工
	[F_Credit] [nvarchar](200) NULL,--信用等级:一星、二星、三星、四星、五星、空
	[F_Legal] [nvarchar](200) NULL,--法人
	[F_LegalPhone] [nvarchar](200) NULL,--法人电话
	[F_AddressProvince] [nvarchar](200) NULL,--省
	[F_AddressCity] [nvarchar](200) NULL,--市
	[F_AddressCountry] [nvarchar](200) NULL,--县
	[F_AddressTownship] [nvarchar](200) NULL,--乡
	[F_AddressFull] [nvarchar](200) NULL,--详细地址
	[F_Brands] [nvarchar](200) NULL,--经营品牌:心连心、手拉手、沃利沃、双心、空
	[F_Product] [nvarchar](200) NULL,--产品:复合肥心连心、复合肥手拉手、复合肥沃利沃、复合肥双心、尿素心连心、尿素手拉手、尿素沃利沃、尿素双心
	[F_FrozenFlag] [nvarchar](200) NULL,--冻结标志
	[F_IsOpenAccount] [nvarchar](200) NULL,--是否开户:已开户、未开户
	[F_LevelCode] [nvarchar](200) NULL,--上级客户编码
	[F_LevelName] [nvarchar](200) NULL,--上级客户名称
	[F_MnemonicCode] [nvarchar](200) NULL,--助记码
	[F_InvoiceBank] [nvarchar](200) NULL,--开票银行名称
	[F_InvoiceBankAccount] [nvarchar](200) NULL,--开票银行账号
	[F_TaxRegCode] [nvarchar](200) NULL,--纳税人登记号
	[F_IsRunXLX] [nvarchar](200) NULL,--是否经营心连心:是、否
	[F_AnnualSales] [nvarchar](200) NULL,--年销量
	[F_Formula] [nvarchar](200) NULL,--配方
	[F_RaiseCrops] [nvarchar](200) NULL,--种植作物
	[F_PlantingArea] [nvarchar](200) NULL,--种植面积
	[F_FertilizerBrand] [nvarchar](200) NULL,--用肥品牌
	[F_FileId] [int] NULL,--导入使用
	[F_WxPassword] [varchar](100) NULL,
	[F_WxOpenId] [nvarchar](300) NULL,
	[F_Remark] [ntext] NULL,--备注
	[F_CreateBy] [nvarchar](100) NULL,
	[F_CreateOn] [datetime] NULL,
	[F_UpdateCount] [int] NULL,
	[F_UpdateBy] [varchar](50) NULL,
	[F_UpdateOn] [datetime] NULL,
	[F_IsDelete] [smallint] NULL,
	[F_DeleteBy] [nvarchar](100) NULL,
	[F_DeleteOn] [datetime] NULL,

 CONSTRAINT [PK_T_Cus_CustomerBaseNew] PRIMARY KEY CLUSTERED 
(
	[F_CustomerId] 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

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自增ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_CustomerId'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'客户编号:10位数字' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_CustomerCode'
GO


EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公司名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_CompanyName'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'大区ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_AreaID'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分公司ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_BranchID'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'业务员' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_Salesman'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'业务员电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_SalesPhone'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'客户性质' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_CustomerNature'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'渠道类型:总经销、二级商、种田大户、农户、化工客户、公司员工' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_Channel'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'信用等级:一星、二星、三星、四星、五星、空' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_Credit'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'法人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_Legal'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'法人电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_LegalPhone'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'省' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_AddressProvince'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'市' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_AddressCity'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'县' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_AddressCountry'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'乡' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_AddressTownship'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'详细地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_AddressFull'
GO	

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'经营品牌:心连心、手拉手、沃利沃、双心、空' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_Brands'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品:复合肥心连心、复合肥手拉手、复合肥沃利沃、复合肥双心、尿素心连心、尿素手拉手、尿素沃利沃、尿素双心' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_Product'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'冻结标志' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_FrozenFlag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否开户:已开户、未开户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_IsOpenAccount'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上级客户编码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_LevelCode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上级客户名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_LevelName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'助记码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_MnemonicCode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开票银行名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_InvoiceBank'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开票银行账号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_InvoiceBankAccount'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'纳税人登记号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_TaxRegCode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否经营心连心:是、否' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_IsRunXLX'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'年销量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_AnnualSales'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'配方' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_Formula'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'种植作物' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_RaiseCrops'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'种植面积' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_PlantingArea'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用肥品牌' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_FertilizerBrand'
GO


EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'微信登录密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_WxPassword'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'微信openid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_WxOpenId'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_Remark'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人工号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_CreateBy'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_CreateOn'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_UpdateCount'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改人工号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_UpdateBy'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_UpdateOn'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除：0否，1是' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_IsDelete'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'删除人工号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_DeleteBy'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'删除时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew', @level2type=N'COLUMN',@level2name=N'F_DeleteOn'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'客户管理表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Cus_CustomerBaseNew'
GO