Tms crvat invoice pre p
来自ling
-- Create table
create table TMS_CRVAT_INVOICE_PRE_P
(
crvat_invoice_pre_p_id CHAR(36) not null,
crvat_invoice_pre_h_id CHAR(36),
crvat_invoice_req_p_id CHAR(36),
invoicing_type VARCHAR2(100) not null,
source_code VARCHAR2(100),
acctd_amount_cr NUMBER,
vat_amount NUMBER,
invoice_amount NUMBER not null,
tax_trx_type_id CHAR(36),
legal_entity_id CHAR(36),
legal_entity_code VARCHAR2(100),
legal_entity_name VARCHAR2(500),
registration_number VARCHAR2(100),
registration_code VARCHAR2(100),
inventory_item_id VARCHAR2(100),
inventory_item_number VARCHAR2(100),
inventory_item_descripton VARCHAR2(2000),
inventory_item_models VARCHAR2(500),
uom_code VARCHAR2(100),
uom_code_descripton VARCHAR2(100),
price_of_unit NUMBER,
inventory_item_qty NUMBER,
orig_legal_entity_id CHAR(36),
orig_legal_entity_code VARCHAR2(100),
orig_legal_entity_name VARCHAR2(500),
orig_registration_number VARCHAR2(100),
orig_registration_code VARCHAR2(100),
start_date DATE,
end_date DATE,
status VARCHAR2(30),
attribute_category VARCHAR2(100),
attribute1 VARCHAR2(240),
attribute2 VARCHAR2(240),
attribute3 VARCHAR2(240),
attribute4 VARCHAR2(240),
attribute5 VARCHAR2(240),
attribute6 VARCHAR2(240),
attribute7 VARCHAR2(240),
attribute8 VARCHAR2(240),
attribute9 VARCHAR2(240),
attribute10 VARCHAR2(240),
reference1 VARCHAR2(240),
reference2 VARCHAR2(240),
reference3 VARCHAR2(240),
reference4 VARCHAR2(240),
reference5 VARCHAR2(240),
archive_base_date DATE not null,
biz_org_code VARCHAR2(100) not null,
created_by CHAR(36) not null,
creation_date DATE not null,
last_updated_by CHAR(36) not null,
last_update_date DATE not null,
record_version NUMBER not null,
deleted_flag VARCHAR2(10) default 0 not null,
deleted_by CHAR(36),
deletion_date DATE,
data_owner_code VARCHAR2(100),
company_id CHAR(36),
operation_org_code VARCHAR2(100),
org_id CHAR(36)
);
-- Add comments to the table
comment on table TMS_CRVAT_INVOICE_PRE_P
is '销项税特殊开票准备单明细';
-- Add comments to the columns
comment on column TMS_CRVAT_INVOICE_PRE_P.crvat_invoice_pre_p_id
is '特殊开票准备单行ID';
comment on column TMS_CRVAT_INVOICE_PRE_P.crvat_invoice_pre_h_id
is '开票准备单-头表ID';
comment on column TMS_CRVAT_INVOICE_PRE_P.crvat_invoice_req_p_id
is '特殊开票申请单行ID';
comment on column TMS_CRVAT_INVOICE_PRE_P.invoicing_type
is '开票方式_枚举值(属地/汇总)';
comment on column TMS_CRVAT_INVOICE_PRE_P.source_code
is '交易来源_枚举值(仅手工)';
comment on column TMS_CRVAT_INVOICE_PRE_P.acctd_amount_cr
is '本次开票金额(不含税)';
comment on column TMS_CRVAT_INVOICE_PRE_P.vat_amount
is '本次开票税额';
comment on column TMS_CRVAT_INVOICE_PRE_P.invoice_amount
is '本次开票总金额';
comment on column TMS_CRVAT_INVOICE_PRE_P.tax_trx_type_id
is '涉税交易类型ID';
comment on column TMS_CRVAT_INVOICE_PRE_P.legal_entity_id
is '销方纳税人ID';
comment on column TMS_CRVAT_INVOICE_PRE_P.legal_entity_code
is '销方纳税人CODE';
comment on column TMS_CRVAT_INVOICE_PRE_P.legal_entity_name
is '销方纳税名称';
comment on column TMS_CRVAT_INVOICE_PRE_P.registration_number
is '销方证件号码';
comment on column TMS_CRVAT_INVOICE_PRE_P.registration_code
is '销方证件类型_枚举值';
comment on column TMS_CRVAT_INVOICE_PRE_P.inventory_item_id
is '货物ID';
comment on column TMS_CRVAT_INVOICE_PRE_P.inventory_item_number
is '商品及服务编码';
comment on column TMS_CRVAT_INVOICE_PRE_P.inventory_item_descripton
is '商品及服务名称';
comment on column TMS_CRVAT_INVOICE_PRE_P.inventory_item_models
is '规格型号';
comment on column TMS_CRVAT_INVOICE_PRE_P.uom_code
is '单位代码';
comment on column TMS_CRVAT_INVOICE_PRE_P.uom_code_descripton
is '单位名称';
comment on column TMS_CRVAT_INVOICE_PRE_P.price_of_unit
is '单价';
comment on column TMS_CRVAT_INVOICE_PRE_P.inventory_item_qty
is '货物数量';
comment on column TMS_CRVAT_INVOICE_PRE_P.orig_legal_entity_id
is '申请单上销方纳税人ID';
comment on column TMS_CRVAT_INVOICE_PRE_P.orig_legal_entity_code
is '申请单上销方纳税人CODE';
comment on column TMS_CRVAT_INVOICE_PRE_P.orig_legal_entity_name
is '申请单上销方纳税名称';
comment on column TMS_CRVAT_INVOICE_PRE_P.orig_registration_number
is '申请单上销方证件号码';
comment on column TMS_CRVAT_INVOICE_PRE_P.orig_registration_code
is '申请单上销方证件类型_枚举值';
comment on column TMS_CRVAT_INVOICE_PRE_P.start_date
is '有效日期';
comment on column TMS_CRVAT_INVOICE_PRE_P.end_date
is '失效日期';
comment on column TMS_CRVAT_INVOICE_PRE_P.status
is '状态';
comment on column TMS_CRVAT_INVOICE_PRE_P.attribute_category
is '扩展字段结构类型';
comment on column TMS_CRVAT_INVOICE_PRE_P.attribute1
is '扩展字段1';
comment on column TMS_CRVAT_INVOICE_PRE_P.attribute2
is '扩展字段2';
comment on column TMS_CRVAT_INVOICE_PRE_P.attribute3
is '扩展字段3';
comment on column TMS_CRVAT_INVOICE_PRE_P.attribute4
is '扩展字段4';
comment on column TMS_CRVAT_INVOICE_PRE_P.attribute5
is '扩展字段5';
comment on column TMS_CRVAT_INVOICE_PRE_P.attribute6
is '扩展字段6';
comment on column TMS_CRVAT_INVOICE_PRE_P.attribute7
is '扩展字段7';
comment on column TMS_CRVAT_INVOICE_PRE_P.attribute8
is '扩展字段8';
comment on column TMS_CRVAT_INVOICE_PRE_P.attribute9
is '扩展字段9';
comment on column TMS_CRVAT_INVOICE_PRE_P.attribute10
is '扩展字段10';
comment on column TMS_CRVAT_INVOICE_PRE_P.reference1
is '参考字段1';
comment on column TMS_CRVAT_INVOICE_PRE_P.reference2
is '参考字段2';
comment on column TMS_CRVAT_INVOICE_PRE_P.reference3
is '参考字段3';
comment on column TMS_CRVAT_INVOICE_PRE_P.reference4
is '参考字段4';
comment on column TMS_CRVAT_INVOICE_PRE_P.reference5
is '参考字段5';
comment on column TMS_CRVAT_INVOICE_PRE_P.archive_base_date
is '归档基准日期';
comment on column TMS_CRVAT_INVOICE_PRE_P.biz_org_code
is '业务组织编号';
comment on column TMS_CRVAT_INVOICE_PRE_P.created_by
is '创建人';
comment on column TMS_CRVAT_INVOICE_PRE_P.creation_date
is '创建时间';
comment on column TMS_CRVAT_INVOICE_PRE_P.last_updated_by
is '最后修改人';
comment on column TMS_CRVAT_INVOICE_PRE_P.last_update_date
is '最后修改时间';
comment on column TMS_CRVAT_INVOICE_PRE_P.record_version
is '记录版本号';
comment on column TMS_CRVAT_INVOICE_PRE_P.deleted_flag
is '删除标记';
comment on column TMS_CRVAT_INVOICE_PRE_P.deleted_by
is '删除人';
comment on column TMS_CRVAT_INVOICE_PRE_P.deletion_date
is '删除时间';
comment on column TMS_CRVAT_INVOICE_PRE_P.data_owner_code
is '数据拥有者代码(机构/组织等)';
comment on column TMS_CRVAT_INVOICE_PRE_P.company_id
is '所属公司ID';
comment on column TMS_CRVAT_INVOICE_PRE_P.operation_org_code
is '运营组织CODE';
comment on column TMS_CRVAT_INVOICE_PRE_P.org_id
is '组织ID';
-- Create/Recreate primary, unique and foreign key constraints
alter table TMS_CRVAT_INVOICE_PRE_P
add constraint PK_TMS_CRVAT_INVOICE_PRE_P primary key (CRVAT_INVOICE_PRE_P_ID);