SCO供应链协同

## 数据表：T_RPM_RPMODE(返利模式)

### T_RPM_RPMODE(返利模式)：描述

名称 | T_RPM_RPMODE(返利模式)
代码 | T_RPM_RPMODE
注释 | 返利模式
模型 | SCO供应链协同
主键 | PK_RPM_RPMODE

### T_RPM_RPMODE(返利模式)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
主键ID | FRPMODEID | int |  | TRUE |
编码 | FNUMBER | nvarchar(30) | 30 | TRUE |
返利方式 | FRPWAYID | int |  | TRUE |
是否系统预置 | FISSYSTEM | char(1) | 1 | TRUE |
禁用状态 | FFORBIDSTATUS | char(1) | 1 | TRUE |

### T_RPM_RPMODE(返利模式)：脚本代码

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_RPM_RPMODE') and o.name = 'FK_T_RPM_RP_R_RPMODE__T_RPM_RE')
alter table T_RPM_RPMODE
drop constraint FK_T_RPM_RP_R_RPMODE__T_RPM_RE
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_RPM_RPMODEBASISEENTRY') and o.name = 'FK_T_RPM_RP_R_RPMODE__T_RPM_RP')
alter table T_RPM_RPMODEBASISEENTRY
drop constraint FK_T_RPM_RP_R_RPMODE__T_RPM_RP
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_RPM_RPMODEENTRY') and o.name = 'FK_T_RPM_RP_R_RPMODE__T_RPM_RP')
alter table T_RPM_RPMODEENTRY
drop constraint FK_T_RPM_RP_R_RPMODE__T_RPM_RP
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_RPM_RPMODEOBJENTRY') and o.name = 'FK_T_RPM_RP_R_RPMODE__T_RPM_RP')
alter table T_RPM_RPMODEOBJENTRY
drop constraint FK_T_RPM_RP_R_RPMODE__T_RPM_RP
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_RPM_RPMODE_L') and o.name = 'FK_T_RPM_RP_R_RPMODE__T_RPM_RP')
alter table T_RPM_RPMODE_L
drop constraint FK_T_RPM_RP_R_RPMODE__T_RPM_RP
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_RPM_RPPOLICY') and o.name = 'FK_T_RPM_RP_R_RPMODE__T_RPM_RP')
alter table T_RPM_RPPOLICY
drop constraint FK_T_RPM_RP_R_RPMODE__T_RPM_RP
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_RPMODE')
and name = 'IDX_RPM_RPMODE_NUM'
and indid > 0
and indid < 255)
drop index T_RPM_RPMODE.IDX_RPM_RPMODE_NUM
go
if exists (select 1
from sysobjects
where id = object_id('T_RPM_RPMODE')
and type = 'U')
drop table T_RPM_RPMODE
go
/*==============================================================*/
/* Table: T_RPM_RPMODE */
/*==============================================================*/
create table T_RPM_RPMODE (
FRPMODEID int not null default 0,
FNUMBER nvarchar(30) not null default '',
FRPWAYID int not null default 0,
FISSYSTEM char(1) not null default '0',
FFORBIDSTATUS char(1) not null default '1',
constraint PK_RPM_RPMODE primary key (FRPMODEID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'返利模式',
'user', @CurrentUser, 'table', 'T_RPM_RPMODE'
go
/*==============================================================*/
/* Index: IDX_RPM_RPMODE_NUM */
/*==============================================================*/
create index IDX_RPM_RPMODE_NUM on T_RPM_RPMODE (
FNUMBER ASC
)
go
alter table T_RPM_RPMODE
add constraint FK_T_RPM_RP_R_RPMODE__T_RPM_RE foreign key (FRPWAYID)
references T_RPM_RETURNPROFITWAY (FRETURNPROFITWAYID)
go

### T_RPM_RPMODE(返利模式)：键值定义

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

### T_RPM_RPMODE(返利模式)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_RPM_RPMODE_NUM | IDX_RPM_RPMODE_NUM | FALSE | FALSE | FALSE | FALSE | FALSE | T_RPM_RPMODE(返利模式)

上一页

主页

下一页