SCO供应链协同

## 数据表：T_SPM_PROMOTIONMODE(促销模式)

### T_SPM_PROMOTIONMODE(促销模式)：描述

名称 | T_SPM_PROMOTIONMODE(促销模式)
代码 | T_SPM_PROMOTIONMODE
注释 | 促销模式
模型 | SCO供应链协同
主键 | PK_SPM_PROMOTIONMODE

### T_SPM_PROMOTIONMODE(促销模式)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
主键ID | FPROMOTIONMODEID | int |  | TRUE |
编码 | FNUMBER | nvarchar(50) | 50 | TRUE |
是否已匹配促销政策 | FISMATCHPOLICY | char(1) | 1 | TRUE |
是否系统预置 | FISSYSTEM | char(1) | 1 | TRUE |
促销类型 | FPROMOTIONTYPEID | int |  | TRUE |
促销方式 | FPROMOTIONWAYID | int |  | TRUE |
禁用状态 | FFORBIDSTATUS | char(1) | 1 | TRUE |

### T_SPM_PROMOTIONMODE(促销模式)：脚本代码

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_SPM_PROMOTIONMODE') and o.name = 'FK_T_SPM_PR_REFERENCE_T_SPM_PR')
alter table T_SPM_PROMOTIONMODE
drop constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR
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_SPM_PROMOTIONMODE') and o.name = 'FK_T_SPM_PR_REFERENCE_T_SPM_PR')
alter table T_SPM_PROMOTIONMODE
drop constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR
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_SPM_PROMOTIONMODEENTRY') and o.name = 'FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR')
alter table T_SPM_PROMOTIONMODEENTRY
drop constraint FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR
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_SPM_PROMOTIONMODE_L') and o.name = 'FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR')
alter table T_SPM_PROMOTIONMODE_L
drop constraint FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR
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_SPM_PROMOTIONPOLICY') and o.name = 'FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR')
alter table T_SPM_PROMOTIONPOLICY
drop constraint FK_T_SPM_PR_R_DRP_PRO_T_SPM_PR
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONMODE')
and name = 'IDX_SPM_PROMOTIONMODEL_NUM'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONMODE.IDX_SPM_PROMOTIONMODEL_NUM
go
if exists (select 1
from sysobjects
where id = object_id('T_SPM_PROMOTIONMODE')
and type = 'U')
drop table T_SPM_PROMOTIONMODE
go
/*==============================================================*/
/* Table: T_SPM_PROMOTIONMODE */
/*==============================================================*/
create table T_SPM_PROMOTIONMODE (
FPROMOTIONMODEID int not null default 0,
FNUMBER nvarchar(50) not null default '',
FISMATCHPOLICY char(1) not null default '',
FISSYSTEM char(1) not null default '',
FPROMOTIONTYPEID int not null default 0,
FPROMOTIONWAYID int not null default 0,
FFORBIDSTATUS char(1) not null default '',
constraint PK_SPM_PROMOTIONMODE primary key (FPROMOTIONMODEID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'促销模式',
'user', @CurrentUser, 'table', 'T_SPM_PROMOTIONMODE'
go
/*==============================================================*/
/* Index: IDX_SPM_PROMOTIONMODEL_NUM */
/*==============================================================*/
create index IDX_SPM_PROMOTIONMODEL_NUM on T_SPM_PROMOTIONMODE (
FNUMBER ASC
)
go
alter table T_SPM_PROMOTIONMODE
add constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR foreign key (FPROMOTIONWAYID)
references T_SPM_PROMOTIONWAY (FPROMOTIONWAYID)
go
alter table T_SPM_PROMOTIONMODE
add constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR foreign key (FPROMOTIONTYPEID)
references T_SPM_PROMOTIONTYPE (FPROMOTIONTYPEID)
go

### T_SPM_PROMOTIONMODE(促销模式)：键值定义

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

### T_SPM_PROMOTIONMODE(促销模式)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_SPM_PROMOTIONMODEL_NUM | IDX_SPM_PROMOTIONMODEL_NUM | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONMODE(促销模式)

上一页

主页

下一页