- TableSpec 增字段 child_tables: &'static [(&'static str, &'static str)] - 18 个实体 spec 各自声明子表(Resource / Dataset 两条,其余 16 条空) - service/crud.rs 删掉按 api_name 分叉的 child_tables(),改读 spec.child_tables - 边界账本删掉已失效条目(CP3 crud.rs match spec.api_name)
33 lines
1.4 KiB
Rust
33 lines
1.4 KiB
Rust
//! `Credential` 的实体元数据(对位上游 `ssw.tdc.entity.CredentialEntity`)。
|
|
//!
|
|
//! 🔴 本仓**额外**去敏 `secretKey`(比上游严)—— 凭据密钥不该出现在列表接口里。
|
|
//!
|
|
//! 本文件只放**这一个**实体的 spec —— 通用元数据结构见 [`super::TableSpec`]。
|
|
|
|
use super::TableSpec;
|
|
|
|
/// 本实体的完整元数据(注册表唯一真源)。
|
|
pub const SPEC: TableSpec = TableSpec {
|
|
api_name: "Credential",
|
|
path: "/api/ssw/tdc/Credential",
|
|
table: "tdc_credential",
|
|
keyword_columns: &["f_subject_name", "f_credential_code"],
|
|
filter_columns: &[
|
|
("subjectType", "f_subject_type"),
|
|
("subjectId", "f_subject_id"),
|
|
("status", "f_status"),
|
|
],
|
|
tenant_column: Some("f_tenant_id"),
|
|
default_order_column: "f_creator_time",
|
|
extra_where: None,
|
|
no_create: None,
|
|
no_update: None,
|
|
no_delete: None,
|
|
frozen_columns: &[],
|
|
// 🟡 **有意比上游更严的一处**:上游 `CredentialEntity.f_secret_key` **漏标** `@JsonIgnore`
|
|
// (该列是「预留 SK 密文(本期空)」,上游自注)⇒ 本仓补上去敏。
|
|
// 该列本仓**从不写入**(恒 NULL)⇒ 对外行为零差异,纯属兜底。
|
|
hidden_fields: &["secretKey"],
|
|
child_tables: &[],
|
|
};
|