集团财务

## 数据表：T_CR_RecalScheme(重算方案)

### T_CR_RecalScheme(重算方案)：描述

名称 | T_CR_RecalScheme(重算方案)
代码 | T_CR_RecalScheme
注释 | 重算方案
模型 | 集团财务
主键 | pk_cr_recalscheme

### T_CR_RecalScheme(重算方案)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
内码 | FSchemeID | int |  | TRUE |
编码 | FNumber | nvarchar(30) | 30 | TRUE |
创建人 | FCREATORID | int |  | TRUE |
创建日期 | FCREATEDATE | datetime |  | FALSE |
修改人 | FMODIFIERID | int |  | TRUE |
修改日期 | FMODIFYDATE | datetime |  | FALSE |
审核人 | FAUDITORID | int |  | TRUE |
审核日期 | FAUDITDATE | datetime |  | FALSE |
禁用人 | FFORBIDDERID | int |  | TRUE |
禁用日期 | FFORBIDDATE | datetime |  | FALSE |
数据状态 | FDOCUMENTSTATUS | char(1) | 1 | TRUE | Z暂存，A创建，B审核中，C已审核，D重新审核
禁用状态 | FFORBIDSTATUS | varchar(1) | 1 | TRUE | A否，B是
合并方案 | FSCOPETYPEID | int |  | FALSE |
合并范围 | FSCOPEID | int |  | FALSE |

### T_CR_RecalScheme(重算方案)：脚本代码

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_CR_RecalSchemeCompany') and o.name = 'FK_T_CR_REC_REFERENCE_T_CR_REC')
alter table T_CR_RecalSchemeCompany
drop constraint FK_T_CR_REC_REFERENCE_T_CR_REC
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_CR_RecalSchemeCurrUnit') and o.name = 'FK_T_CR_REC_REFERENCE_T_CR_REC')
alter table T_CR_RecalSchemeCurrUnit
drop constraint FK_T_CR_REC_REFERENCE_T_CR_REC
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_CR_RecalSchemeCurrency') and o.name = 'FK_T_CR_REC_REFERENCE_T_CR_REC')
alter table T_CR_RecalSchemeCurrency
drop constraint FK_T_CR_REC_REFERENCE_T_CR_REC
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_CR_RecalSchemeRpt') and o.name = 'FK_T_CR_REC_REFERENCE_T_CR_REC')
alter table T_CR_RecalSchemeRpt
drop constraint FK_T_CR_REC_REFERENCE_T_CR_REC
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_CR_RecalScheme_L') and o.name = 'FK_T_CR_REC_REFERENCE_T_CR_REC')
alter table T_CR_RecalScheme_L
drop constraint FK_T_CR_REC_REFERENCE_T_CR_REC
go
if exists (select 1
from sysindexes
where id = object_id('T_CR_RecalScheme')
and name = 'IDX_CR_RecalScheme_CREATEDATE'
and indid > 0
and indid < 255)
drop index T_CR_RecalScheme.IDX_CR_RecalScheme_CREATEDATE
go
if exists (select 1
from sysindexes
where id = object_id('T_CR_RecalScheme')
and name = 'IDX_CR_RecalScheme_FNUMBER'
and indid > 0
and indid < 255)
drop index T_CR_RecalScheme.IDX_CR_RecalScheme_FNUMBER
go
if exists (select 1
from sysobjects
where id = object_id('T_CR_RecalScheme')
and type = 'U')
drop table T_CR_RecalScheme
go
/*==============================================================*/
/* Table: T_CR_RecalScheme */
/*==============================================================*/
create table T_CR_RecalScheme (
FSchemeID int not null default 0,
FNumber nvarchar(30) not null default ' ',
FCREATORID int not null default 0,
FCREATEDATE datetime null,
FMODIFIERID int not null default 0,
FMODIFYDATE datetime null,
FAUDITORID int not null default 0,
FAUDITDATE datetime null,
FFORBIDDERID int not null default 0,
FFORBIDDATE datetime null,
FDOCUMENTSTATUS char(1) not null default 'A',
FFORBIDSTATUS varchar(1) not null default 'A',
FSCOPETYPEID int null default 0,
FSCOPEID int null default 0,
constraint PK_T_CR_RECALSCHEME primary key (FSchemeID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'重算方案',
'user', @CurrentUser, 'table', 'T_CR_RecalScheme'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'Z暂存，A创建，B审核中，C已审核，D重新审核',
'user', @CurrentUser, 'table', 'T_CR_RecalScheme', 'column', 'FDOCUMENTSTATUS'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'A否，B是',
'user', @CurrentUser, 'table', 'T_CR_RecalScheme', 'column', 'FFORBIDSTATUS'
go
/*==============================================================*/
/* Index: IDX_CR_RecalScheme_FNUMBER */
/*==============================================================*/
create index IDX_CR_RecalScheme_FNUMBER on T_CR_RecalScheme (
FNumber ASC
)
go
/*==============================================================*/
/* Index: IDX_CR_RecalScheme_CREATEDATE */
/*==============================================================*/
create index IDX_CR_RecalScheme_CREATEDATE on T_CR_RecalScheme (
FCREATEDATE ASC
)
go

### T_CR_RecalScheme(重算方案)：键值定义

名称 | 代码 | 主要的
pk_cr_recalscheme | PK_CR_RECALSCHEME | TRUE

### T_CR_RecalScheme(重算方案)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_CR_RecalScheme_FNUMBER | IDX_CR_RecalScheme_FNUMBER | FALSE | FALSE | FALSE | FALSE | FALSE | T_CR_RecalScheme(重算方案)
IDX_CR_RecalScheme_CREATEDATE | IDX_CR_RecalScheme_CREATEDATE | FALSE | FALSE | FALSE | FALSE | FALSE | T_CR_RecalScheme(重算方案)

上一页

主页

下一页