@g1cloud/entity-modeler-next 5.2.41 → 5.2.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,25 @@
1
- import { EmbeddableCatalog, LogicalModel } from './types';
1
+ import { EmbeddableCatalog, LangCode, LogicalModel } from './types';
2
2
  export type SqlDialect = 'postgres';
3
3
  export interface DdlContext {
4
4
  /** EMBED_PREDEF 서브컬럼의 카탈로그 기본 물리명 해석용(validateModel과 동형 주입). */
5
5
  embeddableCatalog?: EmbeddableCatalog;
6
+ /**
7
+ * `COMMENT ON` 을 낼 **로케일**. 미주입이면 주석을 **아예 내지 않는다**.
8
+ *
9
+ * ★★**「옵션이냐 항상이냐」를 따로 두지 않은 이유** — DDL 주석은 본질적으로 **로케일에 묶인 값**이라
10
+ * *「어느 언어로 낼지 모른다」* 와 *「낼지 말지 모른다」* 가 같은 물음이다. 플래그를 따로 두면 두 축이
11
+ * 갈려 `commentLocale` 없이 `emitComments:true` 같은 **답 없는 조합**이 생긴다. 미주입=미방출은
12
+ * 「모르는 값 규약」의 이 축 사본이다(모르면 발명하지 않고 침묵한다).
13
+ *
14
+ * ★**호출자가 넘길 것은 «프로젝트 기본 언어»이지 «접속 유저 언어»가 아니다** — 레거시가 그렇게 했고
15
+ * (`AbstractSrcGen.getDefaultLanguage()` = `systemSetting.language`), DDL 주석은 **DB 에 굳는 값**이라
16
+ * 접속자에 따라 산출이 달라지면 안 된다. controller 의 `userLanguage`(접속 유저)를 그대로 넘기지 말 것.
17
+ *
18
+ * ⚠️**로케일 폴백을 «하지 않는다»**(`pickMultiLangText` 를 쓰지 않는 유일한 논리명 소비처다). 지정 로케일이
19
+ * 비면 그 `COMMENT` 문을 **통째로 생략**한다 — 레거시 동형(`DatabaseCommentBuilder` 가 `isBlank` 로
20
+ * 건너뛴다)이고, 폴백하면 「ja 논리명을 모른다」가 「ko 값이다」로 바뀌어 **DB 에 굳는다**.
21
+ */
22
+ commentLocale?: LangCode;
6
23
  }
7
24
  /** 표시 모드 → 기본 DDL 방언. 현재는 PG 단일. */
8
25
  export declare function defaultSqlDialect(): SqlDialect;
@@ -1,7 +1,14 @@
1
1
  import { ModelId } from './types';
2
2
  import { OpShape } from '../command/op';
3
- /** 감사 대상 종류 — 논리 모델의 편집 단위. 레이아웃 축은 대상이 아니다. */
4
- export type OpSubjectKind = 'entity' | 'attribute' | 'operation' | 'index' | 'association' | 'associationEnd' | 'group';
3
+ /**
4
+ * 감사 대상 종류 — 논리 모델의 편집 단위 + **노트**.
5
+ *
6
+ * ★노트만 예외적으로 `layout` 에 사는데 감사 대상이다(2026-09-10 결정) — 노트는 *설계 의도*를 담는
7
+ * 편집 산출물이고, 그것이 언제 사라졌는지 못 보면 이미 동작하는 시점 복원에서 **어느 seq 로 돌릴지
8
+ * 고를 근거가 없다**. 편입 축은 존재·메모·연결 셋뿐이고 기하·스타일은 여전히 범위 밖이다(캔버스에서
9
+ * 가장 자주 바뀌어 이력을 덮는다).
10
+ */
11
+ export type OpSubjectKind = 'entity' | 'attribute' | 'operation' | 'index' | 'association' | 'associationEnd' | 'group' | 'note';
5
12
  /** 무엇이 바뀐 대상인가. `entityRef`는 자식(속성/연산/인덱스)의 부모(이름 조회·복원 스코프). */
6
13
  export interface OpSubject {
7
14
  kind: OpSubjectKind;
@@ -44,7 +51,7 @@ export declare const OP_AUDIT_INVENTORY: Record<string, OpAuditHandling>;
44
51
  export declare function describeOpSubjects(op: OpShape): OpSubjectTouch[];
45
52
  /** 발굴용 top-level 소속 대상. */
46
53
  export interface OpContainer {
47
- kind: 'entity' | 'association' | 'group';
54
+ kind: 'entity' | 'association' | 'group' | 'note';
48
55
  ref: ModelId;
49
56
  }
50
57
  /**
@@ -34,6 +34,7 @@ export interface FieldAuditTarget {
34
34
  indexRef?: ModelId;
35
35
  associationRef?: ModelId;
36
36
  groupRef?: ModelId;
37
+ noteRef?: ModelId;
37
38
  end?: 'end1' | 'end2';
38
39
  /** 단일 필드로 좁힘(생략 시 전 필드). */
39
40
  field?: string;