优化
This commit is contained in:
@@ -103,6 +103,10 @@ CREATE TABLE IF NOT EXISTS fin_bill (
|
||||
remark VARCHAR(500) NULL COMMENT '平台账单内部备注',
|
||||
issued_at DATETIME(3) NULL COMMENT '出账时间,未出账时为空',
|
||||
issued_by BIGINT UNSIGNED NULL COMMENT '出账操作人ID,未出账时为空',
|
||||
customer_confirmation_status VARCHAR(24) NOT NULL DEFAULT 'NOT_REQUIRED' COMMENT '客户确认状态:NOT_REQUIRED无需确认、PENDING_CONFIRMATION待确认、CONFIRMED已确认',
|
||||
customer_confirmed_by BIGINT UNSIGNED NULL COMMENT '客户确认人用户ID',
|
||||
customer_confirmed_by_name VARCHAR(128) NULL COMMENT '客户确认人姓名快照',
|
||||
customer_confirmed_at DATETIME(3) NULL COMMENT '客户确认时间',
|
||||
voided_at DATETIME(3) NULL COMMENT '作废时间,未作废时为空',
|
||||
voided_by BIGINT UNSIGNED NULL COMMENT '作废操作人ID,未作废时为空',
|
||||
void_reason VARCHAR(500) NULL COMMENT '账单作废原因',
|
||||
@@ -336,6 +340,7 @@ CREATE TABLE IF NOT EXISTS fin_settlement (
|
||||
UNIQUE KEY uk_fin_settlement_receivable_statement (tenant_id, reconciliation_statement_id, direction),
|
||||
KEY idx_fin_settlement_customer_direction_status (tenant_id, direction, status),
|
||||
KEY idx_fin_settlement_supplier_status (supplier_id, direction, status),
|
||||
KEY idx_fin_settlement_receivable_statistics (direction, currency_code, generated_date, status, tenant_id),
|
||||
CONSTRAINT chk_fin_settlement_tenant CHECK (tenant_id > 0),
|
||||
CONSTRAINT chk_fin_settlement_currency CHECK (currency_code = 'CNY'),
|
||||
CONSTRAINT chk_fin_settlement_direction CHECK (direction IN ('RECEIVABLE', 'PAYABLE')),
|
||||
|
||||
Reference in New Issue
Block a user