SCO供应链协同

## 数据表：T_RPM_ACCOUNTBALANCERULEENTRY(返利余额使用规则明细)

### T_RPM_ACCOUNTBALANCERULEENTRY(返利余额使用规则明细)：描述

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

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

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
分录主键 | FEntryID | bigint |  | TRUE |
规则ID | FID | bigint |  | TRUE |
客户类别 | FCUSTOMERTYPEID | varchar(36) | 36 | TRUE |
客户 | FCUSTOMERID | int |  | TRUE |
订单金额>= | FORDERAMOUNT | decimal(23,10) | 23 | TRUE |
订单金额使用比例(%) | FUSERATE | decimal(23,10) | 23 | TRUE |
行号 | FSEQ | int |  | TRUE |
开始时间 | FSTARTDATE | datetime |  | FALSE |
结束时间 | FENDDATE | datetime |  | FALSE |
备注 | FREMARK | nvarchar(255) | 255 | TRUE |
使用方式 | FUSETYPE | char(1) | 1 | TRUE |
固定金额 | FFIXEDAMOUNT | decimal(23,10) | 23 | TRUE |
固定单位金额 | FFIXEDUNITAMOUNT | decimal(23,10) | 23 | TRUE |

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

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 sysindexes
where id = object_id('T_RPM_ACCOUNTBALANCERULEENTRY')
and name = 'IDX_RPM_ACCOUNTBRE_CUSTTYPE'
and indid > 0
and indid < 255)
drop index T_RPM_ACCOUNTBALANCERULEENTRY.IDX_RPM_ACCOUNTBRE_CUSTTYPE
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_ACCOUNTBALANCERULEENTRY')
and name = 'IDX_RPM_ACCOUNTBRE_CUST'
and indid > 0
and indid < 255)
drop index T_RPM_ACCOUNTBALANCERULEENTRY.IDX_RPM_ACCOUNTBRE_CUST
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_ACCOUNTBALANCERULEENTRY')
and name = 'IDX_RPM_ACCOUNTBRE_ID'
and indid > 0
and indid < 255)
drop index T_RPM_ACCOUNTBALANCERULEENTRY.IDX_RPM_ACCOUNTBRE_ID
go
if exists (select 1
from sysobjects
where id = object_id('T_RPM_ACCOUNTBALANCERULEENTRY')
and type = 'U')
drop table T_RPM_ACCOUNTBALANCERULEENTRY
go
/*==============================================================*/
/* Table: T_RPM_ACCOUNTBALANCERULEENTRY */
/*==============================================================*/
create table T_RPM_ACCOUNTBALANCERULEENTRY (
FEntryID bigint not null default 0,
FID bigint not null default 0,
FCUSTOMERTYPEID varchar(36) not null default '',
FCUSTOMERID int not null default 0,
FORDERAMOUNT decimal(23,10) not null default 0.0,
FUSERATE decimal(23,10) not null default 0.0,
FSEQ int not null default 0,
FSTARTDATE datetime null default getdate(),
FENDDATE datetime null,
FREMARK nvarchar(255) not null default '',
FUSETYPE char(1) not null default '',
FFIXEDAMOUNT decimal(23,10) not null default 0,
FFIXEDUNITAMOUNT decimal(23,10) not null default 0,
constraint PK_RPM_ACCOUNTBALANCERULEENT primary key (FEntryID)
)
go
/*==============================================================*/
/* Index: IDX_RPM_ACCOUNTBRE_ID */
/*==============================================================*/
create index IDX_RPM_ACCOUNTBRE_ID on T_RPM_ACCOUNTBALANCERULEENTRY (
FID ASC
)
go
/*==============================================================*/
/* Index: IDX_RPM_ACCOUNTBRE_CUST */
/*==============================================================*/
create index IDX_RPM_ACCOUNTBRE_CUST on T_RPM_ACCOUNTBALANCERULEENTRY (
FCUSTOMERID ASC,
FCUSTOMERTYPEID ASC,
FID ASC
)
go
/*==============================================================*/
/* Index: IDX_RPM_ACCOUNTBRE_CUSTTYPE */
/*==============================================================*/
create index IDX_RPM_ACCOUNTBRE_CUSTTYPE on T_RPM_ACCOUNTBALANCERULEENTRY (
FCUSTOMERTYPEID ASC,
FCUSTOMERID ASC,
FID ASC
)
go
alter table T_RPM_ACCOUNTBALANCERULEENTRY
add constraint FK_T_RPM_AC_REFERENCE_T_RPM_AC foreign key (FID)
references T_RPM_ACCOUNTBALANCERULE (FID)
go

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

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

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

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_RPM_ACCOUNTBRE_ID | IDX_RPM_ACCOUNTBRE_ID | FALSE | FALSE | FALSE | FALSE | FALSE | T_RPM_ACCOUNTBALANCERULEENTRY(返利余额使用规则明细)
IDX_RPM_ACCOUNTBRE_CUST | IDX_RPM_ACCOUNTBRE_CUST | FALSE | FALSE | FALSE | FALSE | FALSE | T_RPM_ACCOUNTBALANCERULEENTRY(返利余额使用规则明细)
IDX_RPM_ACCOUNTBRE_CUSTTYPE | IDX_RPM_ACCOUNTBRE_CUSTTYPE | FALSE | FALSE | FALSE | FALSE | FALSE | T_RPM_ACCOUNTBALANCERULEENTRY(返利余额使用规则明细)

上一页

主页

下一页