SCO供应链协同

## 数据表：T_DRP_CHANNELDISTRIBUTION(经销代理商表)

### T_DRP_CHANNELDISTRIBUTION(经销代理商表)：描述

名称 | T_DRP_CHANNELDISTRIBUTION(经销代理商表)
代码 | T_DRP_CHANNELDISTRIBUTION
注释 | 经销代理商表
模型 | SCO供应链协同
主键 | PK_DRP_CHANNELDISTRIBUTION

### T_DRP_CHANNELDISTRIBUTION(经销代理商表)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
主键ID | FID | int |  | TRUE |
分配内码ID | FMASTERID | int |  | TRUE |
编码 | FNUMBER | nvarchar(30) | 30 | TRUE |
渠道类别 | FCHANNELTYPEID | int |  | TRUE |
所属分支机构 | FORGBRANCHID | int |  | TRUE |
对应客户 | FCUSTOMERID | int |  | TRUE |
创建组织 | FCREATEORGID | int |  | TRUE |
使用组织 | FUSEORGID | int |  | TRUE |
负责人 | FHEAD | nvarchar(50) | 50 | TRUE |
联系电话 | FTEL | nvarchar(50) | 50 | TRUE |
地址 | FADDRESS | nvarchar(255) | 255 | TRUE |
状态 | FDOCUMENTSTATUS | char(1) | 1 | TRUE |
禁用状态 | FFORBIDSTATUS | char(1) | 1 | TRUE |
经度 | FLONGITUDE | nvarchar(50) | 50 | TRUE |
纬度 | FLATITUDE | nvarchar(50) | 50 | TRUE |
创建人 | FCREATORID | int |  | TRUE |
创建日期 | FCREATEDATE | datetime |  | FALSE |
修改人 | FMODIFIERID | int |  | TRUE |
修改日期 | FMODIFYDATE | datetime |  | FALSE |
审核人 | FAPPROVERID | int |  | TRUE |
审核日期 | FAPPROVEDATE | datetime |  | FALSE |
禁用人 | FFORBIDDERID | int |  | TRUE |
禁用日期 | FFORBIDDATE | datetime |  | FALSE |

### T_DRP_CHANNELDISTRIBUTION(经销代理商表)：脚本代码

if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('T_DRP_CHANNELDISTRIBUTION_L') and o.name = 'FK_T_DRP_CH_REFERENCE_T_DRP_CH')
alter table T_DRP_CHANNELDISTRIBUTION_L
drop constraint FK_T_DRP_CH_REFERENCE_T_DRP_CH
go
if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('T_DRP_DISTRIBUTIONCONTACT') and o.name = 'FK_T_DRP_DI_REFERENCE_T_DRP_CH')
alter table T_DRP_DISTRIBUTIONCONTACT
drop constraint FK_T_DRP_DI_REFERENCE_T_DRP_CH
go
if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('T_DRP_DISTRIBUTIONSTOCK') and o.name = 'FK_T_DRP_DI_REFERENCE_T_DRP_CH')
alter table T_DRP_DISTRIBUTIONSTOCK
drop constraint FK_T_DRP_DI_REFERENCE_T_DRP_CH
go
if exists (select 1
from sysindexes
where id = object_id('T_DRP_CHANNELDISTRIBUTION')
and name = 'IDX_DRP_CHANNELDIS_NUM'
and indid > 0
and indid < 255)
drop index T_DRP_CHANNELDISTRIBUTION.IDX_DRP_CHANNELDIS_NUM
go
if exists (select 1
from sysobjects
where id = object_id('T_DRP_CHANNELDISTRIBUTION')
and type = 'U')
drop table T_DRP_CHANNELDISTRIBUTION
go
/*==============================================================*/
/* Table: T_DRP_CHANNELDISTRIBUTION */
/*==============================================================*/
create table T_DRP_CHANNELDISTRIBUTION (
FID int not null default 0,
FMASTERID int not null default 0,
FNUMBER nvarchar(30) not null default '',
FCHANNELTYPEID int not null default 0,
FORGBRANCHID int not null default 0,
FCUSTOMERID int not null default 0,
FCREATEORGID int not null default 0,
FUSEORGID int not null default 0,
FHEAD nvarchar(50) not null default '',
FTEL nvarchar(50) not null default '',
FADDRESS nvarchar(255) not null default '',
FDOCUMENTSTATUS char(1) not null default '',
FFORBIDSTATUS char(1) not null default '',
FLONGITUDE nvarchar(50) not null default '',
FLATITUDE nvarchar(50) not null default '',
FCREATORID int not null default 0,
FCREATEDATE datetime null,
FMODIFIERID int not null default 0,
FMODIFYDATE datetime null,
FAPPROVERID int not null default 0,
FAPPROVEDATE datetime null,
FFORBIDDERID int not null default 0,
FFORBIDDATE datetime null,
constraint PK_DRP_CHANNELDISTRIBUTION primary key (FID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'经销代理商表',
'user', @CurrentUser, 'table', 'T_DRP_CHANNELDISTRIBUTION'
go
/*==============================================================*/
/* Index: IDX_DRP_CHANNELDIS_NUM */
/*==============================================================*/
create index IDX_DRP_CHANNELDIS_NUM on T_DRP_CHANNELDISTRIBUTION (
FNUMBER ASC
)
go

### T_DRP_CHANNELDISTRIBUTION(经销代理商表)：键值定义

名称 | 代码 | 主要的
PK_DRP_CHANNELDISTRIBUTION | PK_DRP_CHANNELDISTRIBUTION | TRUE

### T_DRP_CHANNELDISTRIBUTION(经销代理商表)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_DRP_CHANNELDIS_NUM | IDX_DRP_CHANNELDIS_NUM | FALSE | FALSE | FALSE | FALSE | FALSE | T_DRP_CHANNELDISTRIBUTION(经销代理商表)

上一页

主页

下一页