SCO供应链协同

## 数据表：T_RPM_ACCOUNTBALANCERULE(返利余额使用规则)

### T_RPM_ACCOUNTBALANCERULE(返利余额使用规则)：描述

名称 | T_RPM_ACCOUNTBALANCERULE(返利余额使用规则)
代码 | T_RPM_ACCOUNTBALANCERULE
注释 |
模型 | SCO供应链协同
主键 | PK_RPM_ACCOUNTBALANCERULE

### T_RPM_ACCOUNTBALANCERULE(返利余额使用规则)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
FID | FID | bigint |  | TRUE |
规则编码 | FNUMBER | nvarchar(30) | 30 | TRUE |
结算组织 | FSETTLEORGID | int |  | TRUE |
返利账户 | FACCOUNTID | int |  | TRUE |
币别 | FCURRENCYID | int |  | TRUE |
数据状态 | FDOCUMENTSTATUS | char(1) | 1 | TRUE |
是否支持促销活动使用 | FISSUPPORTSPM | char(1) | 1 | TRUE |
禁用状态 | FFORBIDSTATUS | char(1) | 1 | TRUE | 'A'否 ‘B'是
创建人 | FCREATORID | int |  | TRUE |
创建日期 | FCREATEDATE | datetime |  | FALSE |
修改人 | FMODIFIERID | int |  | TRUE |
修改日期 | FMODIFYDATE | datetime |  | FALSE |
审核人 | FAPPROVERID | int |  | TRUE |
审核日期 | FAPPROVEDATE | datetime |  | FALSE |
是否指定物料 | FISAPPOINTEDMAT | char(1) | 1 | TRUE |

### T_RPM_ACCOUNTBALANCERULE(返利余额使用规则)：脚本代码

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_ACCOUNTBALANCERULEENTRY') and o.name = 'FK_T_RPM_AC_REFERENCE_T_RPM_AC')
alter table T_RPM_ACCOUNTBALANCERULEENTRY
drop constraint FK_T_RPM_AC_REFERENCE_T_RPM_AC
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_ACCOUNTBALANCERULE_L') and o.name = 'FK_T_RPM_AC_REFERENCE_T_RPM_AC')
alter table T_RPM_ACCOUNTBALANCERULE_L
drop constraint FK_T_RPM_AC_REFERENCE_T_RPM_AC
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_BALANCERULEAPTENTRY') and o.name = 'FK_T_RPM_BA_REFERENCE_T_RPM_AC')
alter table T_RPM_BALANCERULEAPTENTRY
drop constraint FK_T_RPM_BA_REFERENCE_T_RPM_AC
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_ACCOUNTBALANCERULE')
and name = 'IDX_RPM_ACCOUNTBR_ORG'
and indid > 0
and indid < 255)
drop index T_RPM_ACCOUNTBALANCERULE.IDX_RPM_ACCOUNTBR_ORG
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_ACCOUNTBALANCERULE')
and name = 'IDX_RPM_ACCOUNTBR_NUM'
and indid > 0
and indid < 255)
drop index T_RPM_ACCOUNTBALANCERULE.IDX_RPM_ACCOUNTBR_NUM
go
if exists (select 1
from sysobjects
where id = object_id('T_RPM_ACCOUNTBALANCERULE')
and type = 'U')
drop table T_RPM_ACCOUNTBALANCERULE
go
/*==============================================================*/
/* Table: T_RPM_ACCOUNTBALANCERULE */
/*==============================================================*/
create table T_RPM_ACCOUNTBALANCERULE (
FID bigint not null default 0,
FNUMBER nvarchar(30) not null default '',
FSETTLEORGID int not null default 0,
FACCOUNTID int not null default 0,
FCURRENCYID int not null default 0,
FDOCUMENTSTATUS char(1) not null default 'Z',
FISSUPPORTSPM char(1) not null default '',
FFORBIDSTATUS char(1) not null default 'A',
FCREATORID int not null default 0,
FCREATEDATE datetime null,
FMODIFIERID int not null default 0,
FMODIFYDATE datetime null,
FAPPROVERID int not null default 0,
FAPPROVEDATE datetime null,
FISAPPOINTEDMAT char(1) not null default '0',
constraint PK_RPM_ACCOUNTBALANCERULE primary key (FID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'''A''否 ‘B''是',
'user', @CurrentUser, 'table', 'T_RPM_ACCOUNTBALANCERULE', 'column', 'FFORBIDSTATUS'
go
/*==============================================================*/
/* Index: IDX_RPM_ACCOUNTBR_NUM */
/*==============================================================*/
create index IDX_RPM_ACCOUNTBR_NUM on T_RPM_ACCOUNTBALANCERULE (
FNUMBER ASC
)
go
/*==============================================================*/
/* Index: IDX_RPM_ACCOUNTBR_ORG */
/*==============================================================*/
create unique index IDX_RPM_ACCOUNTBR_ORG on T_RPM_ACCOUNTBALANCERULE (
FSETTLEORGID ASC,
FACCOUNTID ASC,
FCURRENCYID ASC
)
go

### T_RPM_ACCOUNTBALANCERULE(返利余额使用规则)：键值定义

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

### T_RPM_ACCOUNTBALANCERULE(返利余额使用规则)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_RPM_ACCOUNTBR_NUM | IDX_RPM_ACCOUNTBR_NUM | FALSE | FALSE | FALSE | FALSE | FALSE | T_RPM_ACCOUNTBALANCERULE(返利余额使用规则)
IDX_RPM_ACCOUNTBR_ORG | IDX_RPM_ACCOUNTBR_ORG | TRUE | FALSE | FALSE | FALSE | FALSE | T_RPM_ACCOUNTBALANCERULE(返利余额使用规则)

上一页

主页

下一页