create-entity-server 0.0.26 → 0.0.31

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.
Files changed (98) hide show
  1. package/package.json +1 -1
  2. package/template/.env.example +26 -0
  3. package/template/configs/auth/cors.json +15 -0
  4. package/template/configs/auth/jwt.json +12 -0
  5. package/template/configs/{oauth.json → auth/oauth.json} +7 -4
  6. package/template/configs/auth/password.json +45 -0
  7. package/template/configs/{security.json → auth/security.json} +4 -2
  8. package/template/configs/cache.json +2 -1
  9. package/template/configs/keys/.gitkeep +0 -0
  10. package/template/configs/keys/apns.p8.example +7 -0
  11. package/template/configs/keys/firebase.pem.example +7 -0
  12. package/template/configs/server.json +1 -0
  13. package/template/entities/README.md +13 -16
  14. package/template/entities/System/Auth/account.json +172 -16
  15. package/template/entities/System/Auth/account_audit.json +31 -0
  16. package/template/entities/System/Auth/account_device.json +64 -0
  17. package/template/entities/System/Auth/account_login_log.json +69 -0
  18. package/template/entities/System/Auth/account_oauth.json +74 -0
  19. package/template/entities/System/Auth/api_keys.json +18 -9
  20. package/template/entities/System/Auth/identity_verification.json +106 -0
  21. package/template/entities/System/Auth/license.json +41 -20
  22. package/template/entities/System/Auth/password_history.json +19 -0
  23. package/template/entities/System/Auth/rbac_roles.json +10 -7
  24. package/template/entities/System/Backup/backup_log.json +66 -0
  25. package/template/entities/System/Email/smtp_log.json +87 -0
  26. package/template/entities/System/Email/smtp_msg.json +104 -0
  27. package/template/entities/System/Notification/alimtalk_log.json +65 -0
  28. package/template/entities/System/Notification/alimtalk_msg.json +53 -0
  29. package/template/entities/System/Notification/friendtalk_log.json +89 -0
  30. package/template/entities/System/Notification/friendtalk_msg.json +91 -0
  31. package/template/entities/System/Notification/sms_log.json +65 -0
  32. package/template/entities/System/Notification/sms_msg.json +82 -0
  33. package/template/entities/System/Notification/sms_verification.json +50 -0
  34. package/template/entities/System/Payment/pg_cancel.json +60 -0
  35. package/template/entities/System/Payment/pg_order.json +115 -0
  36. package/template/entities/System/Payment/pg_webhook_log.json +52 -0
  37. package/template/entities/System/Push/push_log.json +86 -0
  38. package/template/entities/System/Push/push_msg.json +56 -0
  39. package/template/entities/System/Storage/file_backup_log.json +51 -0
  40. package/template/entities/System/Storage/file_download_log.json +43 -0
  41. package/template/entities/System/Storage/file_meta.json +72 -0
  42. package/template/entities/System/system_audit_log.json +39 -34
  43. package/template/entities/company.json +5 -2
  44. package/template/entities/{product.json → goods.json} +9 -6
  45. package/template/entities/todo.json +4 -2
  46. package/template/samples/entities/01_basic_fields.json +15 -2
  47. package/template/samples/entities/02_types_and_defaults.json +15 -5
  48. package/template/samples/entities/03_hash_and_unique.json +18 -3
  49. package/template/samples/entities/04_fk_and_composite_unique.json +18 -3
  50. package/template/samples/entities/05_cache.json +15 -9
  51. package/template/samples/entities/06_history_and_hard_delete.json +19 -6
  52. package/template/samples/entities/07_license_scope.json +18 -3
  53. package/template/samples/entities/08_hook_sql.json +24 -5
  54. package/template/samples/entities/09_hook_entity.json +12 -2
  55. package/template/samples/entities/10_hook_submit_delete.json +14 -5
  56. package/template/samples/entities/11_hook_webhook.json +20 -6
  57. package/template/samples/entities/12_hook_push.json +15 -2
  58. package/template/samples/entities/13_read_only.json +8 -4
  59. package/template/samples/entities/14_optimistic_lock.json +13 -2
  60. package/template/samples/entities/15_reset_defaults.json +7 -1
  61. package/template/samples/entities/16_isolated_license.json +19 -6
  62. package/template/scripts/reset-all.sh +57 -3
  63. package/template/scripts/run.sh +56 -6
  64. package/template/templates/email/auth/2fa_disabled.html +23 -0
  65. package/template/templates/email/auth/2fa_recovery_regenerated.html +31 -0
  66. package/template/templates/email/auth/2fa_setup_complete.html +43 -0
  67. package/template/templates/email/auth/welcome.html +18 -0
  68. package/template/templates/email/backup/backup_completed.html +35 -0
  69. package/template/templates/email/backup/backup_failed.html +27 -0
  70. package/template/templates/email/backup/backup_partial.html +31 -0
  71. package/template/templates/email/layout.html +47 -0
  72. package/template/templates/email/order/order_confirmation.html +30 -0
  73. package/template/templates/email/storage/storage_quota_exceeded.html +37 -0
  74. package/template/templates/email/storage/storage_quota_warning.html +37 -0
  75. package/template/templates/ocr/business_reg.json +145 -0
  76. package/template/templates/ocr/career_cert.json +93 -0
  77. package/template/templates/ocr/driver_license.json +89 -0
  78. package/template/templates/ocr/facility_card.json +82 -0
  79. package/template/templates/ocr/id_card.json +55 -0
  80. package/template/templates/ocr/invoice.json +92 -0
  81. package/template/templates/ocr/namecard.json +116 -0
  82. package/template/templates/ocr/prompts/business_reg.json +14 -0
  83. package/template/templates/ocr/prompts/career_cert.json +16 -0
  84. package/template/templates/ocr/prompts/driver_license.json +14 -0
  85. package/template/templates/ocr/prompts/facility_card.json +15 -0
  86. package/template/templates/ocr/prompts/general.json +13 -0
  87. package/template/templates/ocr/prompts/id_card.json +11 -0
  88. package/template/templates/ocr/prompts/invoice.json +17 -0
  89. package/template/templates/ocr/prompts/namecard.json +15 -0
  90. package/template/templates/ocr/prompts/receipt.json +14 -0
  91. package/template/templates/ocr/receipt.json +79 -0
  92. package/template/configs/cors.json +0 -7
  93. package/template/configs/jwt.json +0 -8
  94. package/template/entities/Account/account_audit.json +0 -16
  95. /package/template/configs/{backup.json → extensions/backup.json} +0 -0
  96. /package/template/configs/{storage.json → extensions/storage.json} +0 -0
  97. /package/template/configs/{push.json → notification/push.json} +0 -0
  98. /package/template/configs/{smtp.json → notification/smtp.json} +0 -0
@@ -1,28 +1,43 @@
1
1
  {
2
2
  "name": "team_member",
3
3
  "description": "외래키(fk) & 복합 유니크 예제 — 팀-사용자 다대다 중간 테이블",
4
- "index": {
4
+ "fields": {
5
5
  "team_seq": {
6
+ "index": true,
6
7
  "comment": "팀 seq (fk: team.seq)",
7
8
  "required": true
8
9
  },
9
10
  "user_seq": {
11
+ "index": true,
10
12
  "comment": "사용자 seq (fk: user.seq)",
11
13
  "required": true
12
14
  },
13
15
  "role": {
16
+ "index": true,
14
17
  "comment": "팀 내 역할",
15
- "type": ["owner", "admin", "member", "viewer"],
18
+ "type": [
19
+ "owner",
20
+ "admin",
21
+ "member",
22
+ "viewer"
23
+ ],
16
24
  "default": "member"
17
25
  },
18
26
  "invited_by": {
27
+ "index": true,
19
28
  "comment": "초대한 사용자 seq (fk: user.seq, nullable)"
20
29
  },
21
30
  "joined_at": {
31
+ "index": true,
22
32
  "comment": "참가일시 (*_at → DATETIME 자동 추론)"
23
33
  }
24
34
  },
25
- "unique": [["team_seq", "user_seq"]],
35
+ "unique": [
36
+ [
37
+ "team_seq",
38
+ "user_seq"
39
+ ]
40
+ ],
26
41
  "fk": {
27
42
  "invited_by": "user.seq"
28
43
  }
@@ -1,26 +1,28 @@
1
1
  {
2
2
  "name": "config_item",
3
3
  "description": "캐시 예제 — 자주 읽히고 드물게 변경되는 설정값에 엔티티 레벨 캐시 활성화",
4
- "index": {
4
+ "fields": {
5
5
  "key": {
6
+ "index": true,
6
7
  "comment": "설정 키 (고유)",
7
8
  "required": true,
8
9
  "unique": true
9
10
  },
10
11
  "category": {
12
+ "index": true,
11
13
  "comment": "설정 카테고리",
12
- "type": ["system", "ui", "feature_flag", "notification"],
14
+ "type": [
15
+ "system",
16
+ "ui",
17
+ "feature_flag",
18
+ "notification"
19
+ ],
13
20
  "default": "system"
14
21
  },
15
22
  "is_public": {
23
+ "index": true,
16
24
  "comment": "공개 여부 (is_* → TINYINT(1) 자동 추론)"
17
- }
18
- },
19
- "cache": {
20
- "enabled": true,
21
- "ttl_seconds": 600
22
- },
23
- "fields": {
25
+ },
24
26
  "value": {
25
27
  "comment": "설정 값 (문자열 저장, 타입은 애플리케이션에서 해석)",
26
28
  "required": true
@@ -29,6 +31,10 @@
29
31
  "comment": "설정 항목 설명"
30
32
  }
31
33
  },
34
+ "cache": {
35
+ "enabled": true,
36
+ "ttl_seconds": 600
37
+ },
32
38
  "reset_defaults": [
33
39
  {
34
40
  "key": "site.name",
@@ -1,33 +1,46 @@
1
1
  {
2
2
  "name": "article",
3
3
  "description": "이력 보존(history_ttl) & 완전삭제(hard_delete) 예제 — 게시글 수정 이력 3년 보관",
4
- "index": {
4
+ "fields": {
5
5
  "author_seq": {
6
+ "index": true,
6
7
  "comment": "작성자 user seq",
7
8
  "required": true
8
9
  },
9
10
  "title": {
11
+ "index": true,
10
12
  "comment": "제목",
11
13
  "required": true
12
14
  },
13
15
  "category": {
16
+ "index": true,
14
17
  "comment": "카테고리",
15
- "type": ["notice", "blog", "faq", "news"],
18
+ "type": [
19
+ "notice",
20
+ "blog",
21
+ "faq",
22
+ "news"
23
+ ],
16
24
  "default": "blog"
17
25
  },
18
26
  "status": {
27
+ "index": true,
19
28
  "comment": "게시 상태",
20
- "type": ["draft", "published", "archived"],
29
+ "type": [
30
+ "draft",
31
+ "published",
32
+ "archived"
33
+ ],
21
34
  "default": "draft"
22
35
  },
23
36
  "published_at": {
37
+ "index": true,
24
38
  "comment": "게시일시 (*_at → DATETIME 자동 추론)"
25
39
  },
26
40
  "view_count": {
41
+ "index": true,
27
42
  "comment": "조회 수 (*_count → INT 자동 추론)"
28
- }
29
- },
30
- "fields": {
43
+ },
31
44
  "content": {
32
45
  "type": "longtext",
33
46
  "comment": "게시글 본문",
@@ -2,29 +2,38 @@
2
2
  "name": "exchange_rate",
3
3
  "description": "license_scope: false 예제 — 전 라이선스 공용 기준 데이터 (환율). license_seq 컬럼 없이 모든 테넌트가 동일 데이터 공유",
4
4
  "license_scope": false,
5
- "index": {
5
+ "fields": {
6
6
  "base_currency": {
7
+ "index": true,
7
8
  "comment": "기준 통화 (ISO 4217)",
8
9
  "type": "varchar(3)",
9
10
  "required": true
10
11
  },
11
12
  "quote_currency": {
13
+ "index": true,
12
14
  "comment": "환산 통화 (ISO 4217)",
13
15
  "type": "varchar(3)",
14
16
  "required": true
15
17
  },
16
18
  "rate": {
19
+ "index": true,
17
20
  "comment": "환산 비율 (*_rate → 자동추론 없음, decimal 명시)",
18
21
  "type": "decimal",
19
22
  "required": true
20
23
  },
21
24
  "effective_date": {
25
+ "index": true,
22
26
  "comment": "적용일 (*_date → DATE 자동 추론)",
23
27
  "required": true
24
28
  },
25
29
  "source": {
30
+ "index": true,
26
31
  "comment": "환율 출처",
27
- "type": ["ecb", "openexchangerates", "manual"],
32
+ "type": [
33
+ "ecb",
34
+ "openexchangerates",
35
+ "manual"
36
+ ],
28
37
  "default": "manual"
29
38
  }
30
39
  },
@@ -32,7 +41,13 @@
32
41
  "enabled": true,
33
42
  "ttl_seconds": 3600
34
43
  },
35
- "unique": [["base_currency", "quote_currency", "effective_date"]],
44
+ "unique": [
45
+ [
46
+ "base_currency",
47
+ "quote_currency",
48
+ "effective_date"
49
+ ]
50
+ ],
36
51
  "reset_defaults": [
37
52
  {
38
53
  "base_currency": "USD",
@@ -1,22 +1,31 @@
1
1
  {
2
2
  "name": "user_point",
3
3
  "description": "SQL 훅 예제 — INSERT/UPDATE 시 자동 감사 로그 기록 (실행형) + SELECT 결과 주입 (조회형)",
4
- "index": {
4
+ "fields": {
5
5
  "user_seq": {
6
+ "index": true,
6
7
  "comment": "사용자 seq",
7
8
  "required": true,
8
9
  "unique": true
9
10
  },
10
11
  "point": {
12
+ "index": true,
11
13
  "comment": "보유 포인트",
12
14
  "type": "uint"
13
15
  },
14
16
  "grade": {
17
+ "index": true,
15
18
  "comment": "등급",
16
- "type": ["bronze", "silver", "gold", "platinum"],
19
+ "type": [
20
+ "bronze",
21
+ "silver",
22
+ "gold",
23
+ "platinum"
24
+ ],
17
25
  "default": "bronze"
18
26
  },
19
27
  "updated_at": {
28
+ "index": true,
20
29
  "comment": "마지막 포인트 변경일시 (*_at → DATETIME 자동 추론)"
21
30
  }
22
31
  },
@@ -26,7 +35,11 @@
26
35
  "comment": "포인트 생성 이력 기록 (실행형 SQL 훅)",
27
36
  "type": "sql",
28
37
  "query": "INSERT INTO point_history (user_seq, delta, reason, created_time) VALUES (?, ?, ?, NOW())",
29
- "params": ["${new.user_seq}", "${new.point}", "initial_grant"],
38
+ "params": [
39
+ "${new.user_seq}",
40
+ "${new.point}",
41
+ "initial_grant"
42
+ ],
30
43
  "async": false
31
44
  }
32
45
  ],
@@ -35,7 +48,11 @@
35
48
  "comment": "포인트 변경 이력 기록 (실행형 SQL 훅)",
36
49
  "type": "sql",
37
50
  "query": "INSERT INTO point_history (user_seq, delta, reason, created_time) VALUES (?, ?, ?, NOW())",
38
- "params": ["${new.user_seq}", "${new.point}", "update"],
51
+ "params": [
52
+ "${new.user_seq}",
53
+ "${new.point}",
54
+ "update"
55
+ ],
39
56
  "async": true
40
57
  }
41
58
  ],
@@ -44,7 +61,9 @@
44
61
  "comment": "최근 포인트 변경 이력 5건 주입 (조회형 SQL 훅)",
45
62
  "type": "sql",
46
63
  "query": "SELECT delta, reason, created_time FROM point_history WHERE user_seq = ? ORDER BY created_time DESC LIMIT 5",
47
- "params": ["${new.user_seq}"],
64
+ "params": [
65
+ "${new.user_seq}"
66
+ ],
48
67
  "assign_to": "recent_history"
49
68
  }
50
69
  ]
@@ -1,27 +1,37 @@
1
1
  {
2
2
  "name": "post",
3
3
  "description": "entity 훅 예제 — after_get/after_list 시 관련 엔티티 데이터를 자동 주입",
4
- "index": {
4
+ "fields": {
5
5
  "author_seq": {
6
+ "index": true,
6
7
  "comment": "작성자 user seq",
7
8
  "required": true
8
9
  },
9
10
  "title": {
11
+ "index": true,
10
12
  "comment": "제목",
11
13
  "required": true
12
14
  },
13
15
  "status": {
16
+ "index": true,
14
17
  "comment": "상태",
15
- "type": ["draft", "published", "hidden"],
18
+ "type": [
19
+ "draft",
20
+ "published",
21
+ "hidden"
22
+ ],
16
23
  "default": "draft"
17
24
  },
18
25
  "comment_count": {
26
+ "index": true,
19
27
  "comment": "댓글 수 (*_count → INT 자동 추론)"
20
28
  },
21
29
  "like_count": {
30
+ "index": true,
22
31
  "comment": "좋아요 수 (*_count → INT 자동 추론)"
23
32
  },
24
33
  "published_at": {
34
+ "index": true,
25
35
  "comment": "게시일시 (*_at → DATETIME 자동 추론)"
26
36
  }
27
37
  },
@@ -1,28 +1,37 @@
1
1
  {
2
2
  "name": "project",
3
3
  "description": "submit & delete 훅 예제 — 프로젝트 생성 시 기본 태스크 자동 생성, 삭제 시 연관 데이터 정리",
4
- "index": {
4
+ "fields": {
5
5
  "owner_seq": {
6
+ "index": true,
6
7
  "comment": "프로젝트 소유자 user seq",
7
8
  "required": true
8
9
  },
9
10
  "name": {
11
+ "index": true,
10
12
  "comment": "프로젝트명",
11
13
  "required": true
12
14
  },
13
15
  "status": {
16
+ "index": true,
14
17
  "comment": "진행 상태",
15
- "type": ["planning", "active", "on_hold", "completed", "cancelled"],
18
+ "type": [
19
+ "planning",
20
+ "active",
21
+ "on_hold",
22
+ "completed",
23
+ "cancelled"
24
+ ],
16
25
  "default": "planning"
17
26
  },
18
27
  "due_date": {
28
+ "index": true,
19
29
  "comment": "마감일 (*_date → DATE 자동 추론)"
20
30
  },
21
31
  "task_count": {
32
+ "index": true,
22
33
  "comment": "태스크 수 (*_count → INT 자동 추론)"
23
- }
24
- },
25
- "fields": {
34
+ },
26
35
  "description": {
27
36
  "type": "text",
28
37
  "comment": "프로젝트 설명"
@@ -1,34 +1,48 @@
1
1
  {
2
2
  "name": "payment",
3
3
  "description": "webhook 훅 예제 — 결제 완료/환불 시 외부 정산 서비스 실시간 통보",
4
- "index": {
4
+ "fields": {
5
5
  "order_seq": {
6
+ "index": true,
6
7
  "comment": "주문 seq",
7
8
  "required": true
8
9
  },
9
10
  "user_seq": {
11
+ "index": true,
10
12
  "comment": "결제자 user seq",
11
13
  "required": true
12
14
  },
13
15
  "amount": {
16
+ "index": true,
14
17
  "comment": "결제 금액 (*_amount → DECIMAL(15,2) 자동 추론)",
15
18
  "required": true
16
19
  },
17
20
  "method": {
21
+ "index": true,
18
22
  "comment": "결제 수단",
19
- "type": ["card", "bank_transfer", "virtual_account", "point"],
23
+ "type": [
24
+ "card",
25
+ "bank_transfer",
26
+ "virtual_account",
27
+ "point"
28
+ ],
20
29
  "required": true
21
30
  },
22
31
  "status": {
32
+ "index": true,
23
33
  "comment": "결제 상태",
24
- "type": ["pending", "paid", "cancelled", "refunded"],
34
+ "type": [
35
+ "pending",
36
+ "paid",
37
+ "cancelled",
38
+ "refunded"
39
+ ],
25
40
  "default": "pending"
26
41
  },
27
42
  "paid_at": {
43
+ "index": true,
28
44
  "comment": "결제 완료일시 (*_at → DATETIME 자동 추론)"
29
- }
30
- },
31
- "fields": {
45
+ },
32
46
  "pg_transaction_id": {
33
47
  "type": "varchar(100)",
34
48
  "comment": "PG사 거래 ID"
@@ -1,25 +1,36 @@
1
1
  {
2
2
  "name": "delivery",
3
3
  "description": "push 훅 예제 — 배송 상태 변경 시 고객에게 푸시 알림 전송 (FCM / APNs 공통, 다단계 상태 알림)",
4
- "index": {
4
+ "fields": {
5
5
  "order_seq": {
6
+ "index": true,
6
7
  "comment": "주문 seq",
7
8
  "required": true
8
9
  },
9
10
  "customer_seq": {
11
+ "index": true,
10
12
  "comment": "고객 user seq",
11
13
  "required": true
12
14
  },
13
15
  "tracking_number": {
16
+ "index": true,
14
17
  "comment": "운송장 번호",
15
18
  "unique": true
16
19
  },
17
20
  "carrier": {
21
+ "index": true,
18
22
  "comment": "택배사",
19
- "type": ["cj", "lotte", "hanjin", "post", "direct"],
23
+ "type": [
24
+ "cj",
25
+ "lotte",
26
+ "hanjin",
27
+ "post",
28
+ "direct"
29
+ ],
20
30
  "default": "cj"
21
31
  },
22
32
  "status": {
33
+ "index": true,
23
34
  "comment": "배송 상태",
24
35
  "type": [
25
36
  "ready",
@@ -32,9 +43,11 @@
32
43
  "default": "ready"
33
44
  },
34
45
  "estimated_date": {
46
+ "index": true,
35
47
  "comment": "예상 도착일 (*_date → DATE 자동 추론)"
36
48
  },
37
49
  "delivered_at": {
50
+ "index": true,
38
51
  "comment": "배송 완료일시 (*_at → DATETIME 자동 추론)"
39
52
  }
40
53
  },
@@ -4,18 +4,22 @@
4
4
  "read_only": true,
5
5
  "hard_delete": true,
6
6
  "history_ttl": 0,
7
- "index": {
7
+ "fields": {
8
8
  "actor_seq": {
9
+ "index": true,
9
10
  "comment": "행위자 user seq (null = 시스템)"
10
11
  },
11
12
  "entity_name": {
13
+ "index": true,
12
14
  "comment": "대상 엔티티명",
13
15
  "required": true
14
16
  },
15
17
  "entity_seq": {
18
+ "index": true,
16
19
  "comment": "대상 레코드 seq"
17
20
  },
18
21
  "action": {
22
+ "index": true,
19
23
  "comment": "수행된 작업",
20
24
  "type": [
21
25
  "INSERT",
@@ -29,15 +33,15 @@
29
33
  "required": true
30
34
  },
31
35
  "ip_address": {
36
+ "index": true,
32
37
  "comment": "요청 IP",
33
38
  "type": "varchar(45)"
34
39
  },
35
40
  "result_code": {
41
+ "index": true,
36
42
  "comment": "결과 코드 (HTTP 상태)",
37
43
  "type": "int"
38
- }
39
- },
40
- "fields": {
44
+ },
41
45
  "before_snapshot": {
42
46
  "type": "json",
43
47
  "comment": "변경 전 데이터 스냅샷"
@@ -2,28 +2,39 @@
2
2
  "name": "inventory",
3
3
  "description": "optimistic_lock 예제 — 동시 수정 충돌 방지가 필요한 재고 엔티티",
4
4
  "optimistic_lock": true,
5
- "index": {
5
+ "fields": {
6
6
  "product_seq": {
7
+ "index": true,
7
8
  "comment": "상품 seq",
8
9
  "required": true,
9
10
  "unique": true
10
11
  },
11
12
  "warehouse_code": {
13
+ "index": true,
12
14
  "comment": "창고 코드",
13
15
  "required": true
14
16
  },
15
17
  "qty_available": {
18
+ "index": true,
16
19
  "comment": "가용 재고 수량 (*_qty → INT 자동 추론)"
17
20
  },
18
21
  "qty_reserved": {
22
+ "index": true,
19
23
  "comment": "예약된 재고 수량 (*_qty → INT 자동 추론)"
20
24
  },
21
25
  "location": {
26
+ "index": true,
22
27
  "comment": "창고 내 위치 (예: A-01-03)"
23
28
  },
24
29
  "last_stocked_at": {
30
+ "index": true,
25
31
  "comment": "마지막 입고일시 (*_at → DATETIME 자동 추론)"
26
32
  }
27
33
  },
28
- "unique": [["product_seq", "warehouse_code"]]
34
+ "unique": [
35
+ [
36
+ "product_seq",
37
+ "warehouse_code"
38
+ ]
39
+ ]
29
40
  }
@@ -1,19 +1,23 @@
1
1
  {
2
2
  "name": "country",
3
3
  "description": "reset_defaults 예제 — reset-all 실행 시 주요 국가 코드 자동 시딩",
4
- "index": {
4
+ "fields": {
5
5
  "code": {
6
+ "index": true,
6
7
  "comment": "ISO 3166-1 alpha-2 국가 코드 (예: KR, US)",
7
8
  "required": true,
8
9
  "unique": true
9
10
  },
10
11
  "name_ko": {
12
+ "index": true,
11
13
  "comment": "국가명 (한국어)"
12
14
  },
13
15
  "name_en": {
16
+ "index": true,
14
17
  "comment": "국가명 (영어)"
15
18
  },
16
19
  "region": {
20
+ "index": true,
17
21
  "comment": "대륙/지역",
18
22
  "type": [
19
23
  "asia",
@@ -25,9 +29,11 @@
25
29
  ]
26
30
  },
27
31
  "phone_code": {
32
+ "index": true,
28
33
  "comment": "국가 전화 코드 (예: +82)"
29
34
  },
30
35
  "is_active": {
36
+ "index": true,
31
37
  "comment": "서비스 지원 여부 (is_* → TINYINT(1) 자동 추론)",
32
38
  "default": true
33
39
  }
@@ -2,34 +2,43 @@
2
2
  "name": "organization",
3
3
  "description": "isolated: license 예제 — 이 엔티티가 테넌트(라이선스) 경계를 정의하는 루트 엔티티. license_seq FK 없이 license_seq 컬럼을 직접 소유",
4
4
  "isolated": "license",
5
- "index": {
5
+ "fields": {
6
6
  "name": {
7
+ "index": true,
7
8
  "comment": "조직명",
8
9
  "required": true,
9
10
  "unique": true
10
11
  },
11
12
  "plan": {
13
+ "index": true,
12
14
  "comment": "구독 플랜",
13
- "type": ["free", "starter", "pro", "enterprise"],
15
+ "type": [
16
+ "free",
17
+ "starter",
18
+ "pro",
19
+ "enterprise"
20
+ ],
14
21
  "default": "free"
15
22
  },
16
23
  "max_members": {
24
+ "index": true,
17
25
  "comment": "최대 팀원 수",
18
26
  "type": "uint",
19
27
  "default": 5
20
28
  },
21
29
  "owner_seq": {
30
+ "index": true,
22
31
  "comment": "소유자 account seq"
23
32
  },
24
33
  "is_active": {
34
+ "index": true,
25
35
  "comment": "활성 여부 (is_* → TINYINT(1) 자동 추론)",
26
36
  "default": true
27
37
  },
28
38
  "expires_at": {
39
+ "index": true,
29
40
  "comment": "구독 만료일시 (*_at → DATETIME 자동 추론)"
30
- }
31
- },
32
- "fields": {
41
+ },
33
42
  "billing_email": {
34
43
  "type": "varchar(255)",
35
44
  "comment": "청구용 이메일"
@@ -38,7 +47,11 @@
38
47
  "comment": "조직 설정 (중첩 fields 그룹)",
39
48
  "fields": {
40
49
  "theme": {
41
- "type": ["light", "dark", "system"],
50
+ "type": [
51
+ "light",
52
+ "dark",
53
+ "system"
54
+ ],
42
55
  "comment": "기본 UI 테마",
43
56
  "default": "system"
44
57
  },