SCO供应链协同

## 数据表：T_RPM_ACCOUNTBALANCE(返利账户余额表)

### T_RPM_ACCOUNTBALANCE(返利账户余额表)：描述

名称 | T_RPM_ACCOUNTBALANCE(返利账户余额表)
代码 | T_RPM_ACCOUNTBALANCE
注释 |
模型 | SCO供应链协同
主键 | PK_RPM_ACCOUNTBALANCE

### T_RPM_ACCOUNTBALANCE(返利账户余额表)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
主键ID | FID | int |  | TRUE |
编号 | FBILLNO | nvarchar(30) | 30 | TRUE |
账户 | FACCOUNTID | int |  | TRUE |
客户 | FCUSTOMERID | int |  | TRUE |
客户分配内码 | FCUSTMASTERID | int |  | TRUE |
核算组织 | FORGID | int |  | TRUE |
是否初始化 | FISINIT | char(1) | 1 | TRUE |
账户余额 | FBALANCEAMOUNT | decimal(23,10) | 23 | TRUE |
更新时间 | FUPDATETIME | datetime |  | FALSE |
币别 | FCURRENCYID | int |  | TRUE |
状态 | FDOCUMENTSTATUS | char(1) | 1 | TRUE |
创建人 | FCREATORID | int |  | TRUE |
创建日期 | FCREATEDATE | datetime |  | FALSE |
修改人 | FMODIFIERID | int |  | TRUE |
修改日期 | FMODIFYDATE | datetime |  | FALSE |
审核人 | FAPPROVERID | int |  | TRUE |
审核日期 | FAPPROVEDATE | datetime |  | FALSE |

### T_RPM_ACCOUNTBALANCE(返利账户余额表)：脚本代码

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_ACCOUNTBALANCE') and o.name = 'FK_T_RPM_AC_REFERENCE_T_RPM_AC')
alter table T_RPM_ACCOUNTBALANCE
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_ACCOUNTUPDATEDETAIL') and o.name = 'FK_T_RPM_AC_REFERENCE_T_RPM_AC')
alter table T_RPM_ACCOUNTUPDATEDETAIL
drop constraint FK_T_RPM_AC_REFERENCE_T_RPM_AC
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_ACCOUNTBALANCE')
and name = 'IDX_RPM_ACCOUNTBALANCE_CM'
and indid > 0
and indid < 255)
drop index T_RPM_ACCOUNTBALANCE.IDX_RPM_ACCOUNTBALANCE_CM
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_ACCOUNTBALANCE')
and name = 'IDX_RPM_ACCOUNTBALANCE_ACID'
and indid > 0
and indid < 255)
drop index T_RPM_ACCOUNTBALANCE.IDX_RPM_ACCOUNTBALANCE_ACID
go
if exists (select 1
from sysobjects
where id = object_id('T_RPM_ACCOUNTBALANCE')
and type = 'U')
drop table T_RPM_ACCOUNTBALANCE
go
/*==============================================================*/
/* Table: T_RPM_ACCOUNTBALANCE */
/*==============================================================*/
create table T_RPM_ACCOUNTBALANCE (
FID int not null default 0,
FBILLNO nvarchar(30) not null default '',
FACCOUNTID int not null default 0,
FCUSTOMERID int not null default 0,
FCUSTMASTERID int not null default 0,
FORGID int not null default 0,
FISINIT char(1) not null default '0',
FBALANCEAMOUNT decimal(23,10) not null default 0.0,
FUPDATETIME datetime null,
FCURRENCYID int not null default 0,
FDOCUMENTSTATUS char(1) not null default 'Z',
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,
constraint PK_RPM_ACCOUNTBALANCE primary key (FID)
)
go
/*==============================================================*/
/* Index: IDX_RPM_ACCOUNTBALANCE_ACID */
/*==============================================================*/
create unique index IDX_RPM_ACCOUNTBALANCE_ACID on T_RPM_ACCOUNTBALANCE (
FCUSTOMERID ASC,
FORGID ASC,
FACCOUNTID ASC,
FCURRENCYID ASC
)
go
/*==============================================================*/
/* Index: IDX_RPM_ACCOUNTBALANCE_CM */
/*==============================================================*/
create index IDX_RPM_ACCOUNTBALANCE_CM on T_RPM_ACCOUNTBALANCE (
FCUSTMASTERID ASC,
FACCOUNTID ASC,
FORGID ASC,
FCURRENCYID ASC
)
go
alter table T_RPM_ACCOUNTBALANCE
add constraint FK_T_RPM_AC_REFERENCE_T_RPM_AC foreign key (FACCOUNTID)
references T_RPM_ACCOUNT (FID)
go

### T_RPM_ACCOUNTBALANCE(返利账户余额表)：键值定义

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

### T_RPM_ACCOUNTBALANCE(返利账户余额表)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_RPM_ACCOUNTBALANCE_ACID | IDX_RPM_ACCOUNTBALANCE_ACID | TRUE | FALSE | FALSE | FALSE | FALSE | T_RPM_ACCOUNTBALANCE(返利账户余额表)
IDX_RPM_ACCOUNTBALANCE_CM | IDX_RPM_ACCOUNTBALANCE_CM | FALSE | FALSE | FALSE | FALSE | FALSE | T_RPM_ACCOUNTBALANCE(返利账户余额表)

上一页

主页

下一页