SCO供应链协同

## 数据表：T_SPM_PROMOTIONAPPLYPMATENTRY(促销赠品信息表)

### T_SPM_PROMOTIONAPPLYPMATENTRY(促销赠品信息表)：描述

名称 | T_SPM_PROMOTIONAPPLYPMATENTRY(促销赠品信息表)
代码 | T_SPM_PROMOTIONAPPLYPMATENTRY
注释 | 促销赠品信息表
模型 | SCO供应链协同
主键 | PK_SPM_PROMOTIONAPPLYPMATENT

### T_SPM_PROMOTIONAPPLYPMATENTRY(促销赠品信息表)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
分录主键 | FENTRYID | int |  | TRUE |
促销申请单ID | FID | int |  | TRUE |
序号 | FSEQ | int |  | TRUE |
物料 | FMATERIALID | int |  | TRUE |
辅助属性 | FASSISTPROPERTYID | int |  | TRUE |
基本计量单位 | FBASEUNITID | int |  | TRUE |
赠送基本数量 | FBASEPRESENTQTY | decimal(23,10) | 23 | TRUE |
计量单位 | FUNITID | int |  | TRUE |
赠送数量 | FPRESENTQTY | decimal(23,10) | 23 | TRUE |
促销基本限量 | FBASELIMITPRESENTQTY | decimal(23,10) | 23 | TRUE |
促销限量 | FLIMITPRESENTQTY | decimal(23,10) | 23 | TRUE |
成本价 | FCOSTPRICE | decimal(23,10) | 23 | TRUE |
备注 | FREMARK | nvarchar(255) | 255 | TRUE |
物料分配内码 | FMATMASTERID | int |  | TRUE |

### T_SPM_PROMOTIONAPPLYPMATENTRY(促销赠品信息表)：脚本代码

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_PROMOTIONAPPLYPMATENTRY') and o.name = 'FK_T_SPM_PR_REFERENCE_T_SPM_PR')
alter table T_SPM_PROMOTIONAPPLYPMATENTRY
drop constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONAPPLYPMATENTRY')
and name = 'IDX_SPM_PROAPPLYPM_MID'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONAPPLYPMATENTRY.IDX_SPM_PROAPPLYPM_MID
go
if exists (select 1
from sysindexes
where id = object_id('T_SPM_PROMOTIONAPPLYPMATENTRY')
and name = 'IDX_SPM_PROAPPLYPM_ID'
and indid > 0
and indid < 255)
drop index T_SPM_PROMOTIONAPPLYPMATENTRY.IDX_SPM_PROAPPLYPM_ID
go
if exists (select 1
from sysobjects
where id = object_id('T_SPM_PROMOTIONAPPLYPMATENTRY')
and type = 'U')
drop table T_SPM_PROMOTIONAPPLYPMATENTRY
go
/*==============================================================*/
/* Table: T_SPM_PROMOTIONAPPLYPMATENTRY */
/*==============================================================*/
create table T_SPM_PROMOTIONAPPLYPMATENTRY (
FENTRYID int not null default 0,
FID int not null default 0,
FSEQ int not null default 0,
FMATERIALID int not null default 0,
FASSISTPROPERTYID int not null default 0,
FBASEUNITID int not null default 0,
FBASEPRESENTQTY decimal(23,10) not null default 0,
FUNITID int not null default 0,
FPRESENTQTY decimal(23,10) not null default 0,
FBASELIMITPRESENTQTY decimal(23,10) not null default 0,
FLIMITPRESENTQTY decimal(23,10) not null default 0,
FCOSTPRICE decimal(23,10) not null default 0,
FREMARK nvarchar(255) not null default '',
FMATMASTERID int not null default 0,
constraint PK_SPM_PROMOTIONAPPLYPMATENT primary key (FENTRYID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'促销赠品信息表',
'user', @CurrentUser, 'table', 'T_SPM_PROMOTIONAPPLYPMATENTRY'
go
/*==============================================================*/
/* Index: IDX_SPM_PROAPPLYPM_ID */
/*==============================================================*/
create index IDX_SPM_PROAPPLYPM_ID on T_SPM_PROMOTIONAPPLYPMATENTRY (
FID ASC
)
go
/*==============================================================*/
/* Index: IDX_SPM_PROAPPLYPM_MID */
/*==============================================================*/
create index IDX_SPM_PROAPPLYPM_MID on T_SPM_PROMOTIONAPPLYPMATENTRY (
FMATMASTERID ASC,
FBASEUNITID ASC,
FID ASC
)
go
alter table T_SPM_PROMOTIONAPPLYPMATENTRY
add constraint FK_T_SPM_PR_REFERENCE_T_SPM_PR foreign key (FID)
references T_SPM_PROMOTIONAPPLY (FID)
go

### T_SPM_PROMOTIONAPPLYPMATENTRY(促销赠品信息表)：键值定义

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

### T_SPM_PROMOTIONAPPLYPMATENTRY(促销赠品信息表)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_SPM_PROAPPLYPM_ID | IDX_SPM_PROAPPLYPM_ID | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONAPPLYPMATENTRY(促销赠品信息表)
IDX_SPM_PROAPPLYPM_MID | IDX_SPM_PROAPPLYPM_MID | FALSE | FALSE | FALSE | FALSE | FALSE | T_SPM_PROMOTIONAPPLYPMATENTRY(促销赠品信息表)

上一页

主页

下一页