SCO供应链协同

## 数据表：T_DRP_FACTOR(方案元素)

### T_DRP_FACTOR(方案元素)：描述

名称 | T_DRP_FACTOR(方案元素)
代码 | T_DRP_FACTOR
注释 | 方案元素
模型 | SCO供应链协同
主键 | PK_DRP_FACTOR

### T_DRP_FACTOR(方案元素)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
元素ID | FID | int |  | TRUE |
PSQL主键ID | FPSQLID | int |  | TRUE |
元素唯一标识 | FUNIQUE | varchar(30) | 30 | TRUE |
字段别名 | FFIELDNAME | varchar(30) | 30 | TRUE |
字段表达式 | FEXPRESSION | varchar(255) | 255 | TRUE |
编码 | FNUMBER | varchar(30) | 30 | TRUE |
状态 | FDOCUMENTSTATUS | char(1) | 1 | TRUE | A:新建 Z:暂存 B: 审核中 C: 已审核 D:重新审核
创建人 | FCREATORID | int |  | TRUE |
创建日期 | FCREATEDATE | datetime |  | FALSE |
修改人 | FMODIFIERID | int |  | TRUE |
修改日期 | FMODIFYDATE | datetime |  | FALSE |
禁用状态 | FFORBIDSTATUS | char(1) | 1 | TRUE | 'A'否 ‘B'是
审核人 | FAPPROVERID | int |  | TRUE |
审核日期 | FAPPROVEDATE | datetime |  | FALSE |
禁用人 | FFORBIDDERID | int |  | TRUE |
禁用日期 | FFORBIDDATE | datetime |  | FALSE |

### T_DRP_FACTOR(方案元素)：脚本代码

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_FACTOR') and o.name = 'FK_T_DRP_FA_R_DRP_PSQ_T_DRP_PS')
alter table T_DRP_FACTOR
drop constraint FK_T_DRP_FA_R_DRP_PSQ_T_DRP_PS
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_FACTOR_L') and o.name = 'FK_T_DRP_FA_R_DRP_PLA_T_DRP_FA')
alter table T_DRP_FACTOR_L
drop constraint FK_T_DRP_FA_R_DRP_PLA_T_DRP_FA
go
if exists (select 1
from sysindexes
where id = object_id('T_DRP_FACTOR')
and name = 'IDX_DRP_FACTOR_NUM'
and indid > 0
and indid < 255)
drop index T_DRP_FACTOR.IDX_DRP_FACTOR_NUM
go
if exists (select 1
from sysindexes
where id = object_id('T_DRP_FACTOR')
and name = 'IDX_DRP_FACTOR_FUNIQUE'
and indid > 0
and indid < 255)
drop index T_DRP_FACTOR.IDX_DRP_FACTOR_FUNIQUE
go
if exists (select 1
from sysobjects
where id = object_id('T_DRP_FACTOR')
and type = 'U')
drop table T_DRP_FACTOR
go
/*==============================================================*/
/* Table: T_DRP_FACTOR */
/*==============================================================*/
create table T_DRP_FACTOR (
FID int not null default 0,
FPSQLID int not null default 0,
FUNIQUE varchar(30) not null default '',
FFIELDNAME varchar(30) not null default '',
FEXPRESSION varchar(255) not null default '',
FNUMBER varchar(30) not null default '',
FDOCUMENTSTATUS char(1) not null default '',
FCREATORID int not null default 0,
FCREATEDATE datetime null,
FMODIFIERID int not null default 0,
FMODIFYDATE datetime null,
FFORBIDSTATUS char(1) not null default 'A',
FAPPROVERID int not null default 0,
FAPPROVEDATE datetime null,
FFORBIDDERID int not null default 0,
FFORBIDDATE datetime null,
constraint PK_DRP_FACTOR primary key (FID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'方案元素',
'user', @CurrentUser, 'table', 'T_DRP_FACTOR'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'A:新建 Z:暂存 B: 审核中 C: 已审核 D:重新审核',
'user', @CurrentUser, 'table', 'T_DRP_FACTOR', 'column', 'FDOCUMENTSTATUS'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'''A''否 ‘B''是',
'user', @CurrentUser, 'table', 'T_DRP_FACTOR', 'column', 'FFORBIDSTATUS'
go
/*==============================================================*/
/* Index: IDX_DRP_FACTOR_FUNIQUE */
/*==============================================================*/
create unique index IDX_DRP_FACTOR_FUNIQUE on T_DRP_FACTOR (
FUNIQUE ASC
)
go
/*==============================================================*/
/* Index: IDX_DRP_FACTOR_NUM */
/*==============================================================*/
create index IDX_DRP_FACTOR_NUM on T_DRP_FACTOR (
FNUMBER ASC
)
go
alter table T_DRP_FACTOR
add constraint FK_T_DRP_FA_R_DRP_PSQ_T_DRP_PS foreign key (FPSQLID)
references T_DRP_PSQL (FPSQLID)
go

### T_DRP_FACTOR(方案元素)：键值定义

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

### T_DRP_FACTOR(方案元素)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_DRP_FACTOR_FUNIQUE | IDX_DRP_FACTOR_FUNIQUE | TRUE | FALSE | FALSE | FALSE | FALSE | T_DRP_FACTOR(方案元素)
IDX_DRP_FACTOR_NUM | IDX_DRP_FACTOR_NUM | FALSE | FALSE | FALSE | FALSE | FALSE | T_DRP_FACTOR(方案元素)

上一页

主页

下一页