SCO供应链协同

## 数据表：T_DRP_CHANNELSTOCK(渠道仓库信息)

### T_DRP_CHANNELSTOCK(渠道仓库信息)：描述

名称 | T_DRP_CHANNELSTOCK(渠道仓库信息)
代码 | T_DRP_CHANNELSTOCK
注释 | 渠道仓库信息
模型 | SCO供应链协同
主键 | PK_DRP_CHANNELSTOCK

### T_DRP_CHANNELSTOCK(渠道仓库信息)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
分录主键 | FENTRYID | int |  | TRUE |
渠道ID | FCHANNELID | int |  | TRUE |
库存组织ID | FSTOCKORGID | int |  | TRUE |
是否默认 | FISDEFAULT | char(1) | 1 | TRUE | ‘0’ 否 ‘1’是
备注 | FNOTE | nvarchar(255) | 255 | FALSE |
配货优先顺序 | FSTOCKPRIOR | int |  | TRUE |
序号 | FSEQ | int |  | TRUE |
仓库 | FSTOCKID | int |  | TRUE |
是否参与DRP运算 | FSTOCKISDRP | char(1) | 1 | TRUE | ‘0’ 否 ‘1’是

### T_DRP_CHANNELSTOCK(渠道仓库信息)：脚本代码

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_CHANNELSTOCK') and o.name = 'FK_T_DRP_CH_REFERENCE_T_DRP_CH')
alter table T_DRP_CHANNELSTOCK
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_CHANNELSTOCKMATERIAL') and o.name = 'FK_T_DRP_CH_REFERENCE_T_DRP_CH')
alter table T_DRP_CHANNELSTOCKMATERIAL
drop constraint FK_T_DRP_CH_REFERENCE_T_DRP_CH
go
if exists (select 1
from sysindexes
where id = object_id('T_DRP_CHANNELSTOCK')
and name = 'IDX_DRP_CHANNELSTOCK_ID'
and indid > 0
and indid < 255)
drop index T_DRP_CHANNELSTOCK.IDX_DRP_CHANNELSTOCK_ID
go
if exists (select 1
from sysobjects
where id = object_id('T_DRP_CHANNELSTOCK')
and type = 'U')
drop table T_DRP_CHANNELSTOCK
go
/*==============================================================*/
/* Table: T_DRP_CHANNELSTOCK */
/*==============================================================*/
create table T_DRP_CHANNELSTOCK (
FENTRYID int not null default 0,
FCHANNELID int not null default 0,
FSTOCKORGID int not null default 0,
FISDEFAULT char(1) not null default '0',
FNOTE nvarchar(255) null,
FSTOCKPRIOR int not null default 0,
FSEQ int not null default 0,
FSTOCKID int not null default 0,
FSTOCKISDRP char(1) not null default '0',
constraint PK_DRP_CHANNELSTOCK primary key (FENTRYID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'渠道仓库信息',
'user', @CurrentUser, 'table', 'T_DRP_CHANNELSTOCK'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'‘0’ 否 ‘1’是',
'user', @CurrentUser, 'table', 'T_DRP_CHANNELSTOCK', 'column', 'FISDEFAULT'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'‘0’ 否 ‘1’是',
'user', @CurrentUser, 'table', 'T_DRP_CHANNELSTOCK', 'column', 'FSTOCKISDRP'
go
/*==============================================================*/
/* Index: IDX_DRP_CHANNELSTOCK_ID */
/*==============================================================*/
create index IDX_DRP_CHANNELSTOCK_ID on T_DRP_CHANNELSTOCK (
FCHANNELID ASC
)
go
alter table T_DRP_CHANNELSTOCK
add constraint FK_T_DRP_CH_REFERENCE_T_DRP_CH foreign key (FCHANNELID)
references T_DRP_CHANNEL (FCHANNELID)
go

### T_DRP_CHANNELSTOCK(渠道仓库信息)：键值定义

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

### T_DRP_CHANNELSTOCK(渠道仓库信息)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_DRP_CHANNELSTOCK_ID | IDX_DRP_CHANNELSTOCK_ID | FALSE | FALSE | FALSE | FALSE | FALSE | T_DRP_CHANNELSTOCK(渠道仓库信息)

上一页

主页

下一页