create-entity-server 0.0.31 → 0.2.5

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 (47) hide show
  1. package/bin/create.js +4 -0
  2. package/package.json +1 -1
  3. package/template/configs/database.json +2 -2
  4. package/template/entities/README.md +3 -3
  5. package/template/entities/System/Address/addr_dong.json +10115 -0
  6. package/template/entities/System/Address/addr_sido.json +39 -0
  7. package/template/entities/System/Address/addr_sigungu.json +1398 -0
  8. package/template/entities/System/Auth/account.json +0 -64
  9. package/template/entities/System/Auth/account_device.json +7 -22
  10. package/template/entities/System/Auth/account_login_log.json +3 -8
  11. package/template/entities/System/Auth/anon_device.json +56 -0
  12. package/template/scripts/api-key.sh +5 -2
  13. package/template/scripts/cleanup-history.sh +9 -4
  14. package/template/scripts/cli.sh +5 -2
  15. package/template/scripts/entity.sh +9 -4
  16. package/template/scripts/install-systemd.sh +7 -3
  17. package/template/scripts/normalize-entities.sh +9 -4
  18. package/template/scripts/rbac-role.sh +5 -2
  19. package/template/scripts/reset-all.sh +91 -13
  20. package/template/scripts/run.sh +73 -27
  21. package/template/scripts/sync.sh +9 -4
  22. package/template/configs/auth/oauth.json +0 -40
  23. package/template/configs/auth/password.json +0 -45
  24. package/template/configs/keys/apns.p8.example +0 -7
  25. package/template/configs/keys/firebase.pem.example +0 -7
  26. package/template/configs/notification/push.json +0 -25
  27. package/template/entities/System/Auth/account_oauth.json +0 -74
  28. package/template/entities/System/Auth/identity_verification.json +0 -106
  29. package/template/entities/System/Auth/password_history.json +0 -19
  30. package/template/entities/System/Notification/alimtalk_log.json +0 -65
  31. package/template/entities/System/Notification/alimtalk_msg.json +0 -53
  32. package/template/entities/System/Notification/friendtalk_log.json +0 -89
  33. package/template/entities/System/Notification/friendtalk_msg.json +0 -91
  34. package/template/entities/System/Notification/sms_log.json +0 -65
  35. package/template/entities/System/Notification/sms_msg.json +0 -82
  36. package/template/entities/System/Notification/sms_verification.json +0 -50
  37. package/template/entities/System/Payment/pg_cancel.json +0 -60
  38. package/template/entities/System/Payment/pg_order.json +0 -115
  39. package/template/entities/System/Payment/pg_webhook_log.json +0 -52
  40. package/template/entities/System/Push/push_log.json +0 -86
  41. package/template/entities/System/Push/push_msg.json +0 -56
  42. package/template/templates/email/auth/2fa_disabled.html +0 -23
  43. package/template/templates/email/auth/2fa_recovery_regenerated.html +0 -31
  44. package/template/templates/email/auth/2fa_setup_complete.html +0 -43
  45. package/template/templates/email/auth/welcome.html +0 -18
  46. package/template/templates/email/order/order_confirmation.html +0 -30
  47. /package/template/configs/{notification/smtp.json → smtp.json} +0 -0
@@ -1,89 +0,0 @@
1
- {
2
- "name": "friendtalk_log",
3
- "description": "친구톡(브랜드메시지) 발송 로그 — 워커가 소비하는 DB 큐 역할을 합니다. 사용자 환경에 맞게 fields를 자유롭게 확장할 수 있습니다.",
4
- "history": false,
5
- "read_only": true,
6
- "compress": true,
7
- "fields": {
8
- "status": {
9
- "index": true,
10
- "type": [
11
- "pending",
12
- "processing",
13
- "sent",
14
- "failed",
15
- "expired"
16
- ],
17
- "default": "pending",
18
- "comment": "발송 상태"
19
- },
20
- "msg_type": {
21
- "index": true,
22
- "type": [
23
- "text",
24
- "image",
25
- "wide_image",
26
- "wide_item_list",
27
- "carousel"
28
- ],
29
- "default": "text"
30
- },
31
- "receiver": {
32
- "index": true,
33
- "hash": true,
34
- "comment": "수신자 전화번호",
35
- "required": true
36
- },
37
- "friendtalk_msg_seq": {
38
- "index": true,
39
- "comment": "friendtalk_msg 참조 seq"
40
- },
41
- "content": {
42
- "type": "text",
43
- "comment": "메시지 본문"
44
- },
45
- "image_url": {
46
- "comment": "이미지 URL"
47
- },
48
- "image_link": {
49
- "comment": "이미지 클릭 시 이동 URL"
50
- },
51
- "is_ad": {
52
- "type": "bool",
53
- "default": true,
54
- "comment": "광고성 메시지 여부"
55
- },
56
- "buttons_json": {
57
- "type": "text",
58
- "comment": "버튼 목록 JSON"
59
- },
60
- "carousel_json": {
61
- "type": "text",
62
- "comment": "캐러셀 데이터 JSON"
63
- },
64
- "items_json": {
65
- "type": "text",
66
- "comment": "와이드 아이템 리스트 JSON"
67
- },
68
- "header": {
69
- "comment": "와이드 아이템 리스트 헤더"
70
- },
71
- "provider": {
72
- "comment": "사용 프로바이더"
73
- },
74
- "provider_msg_id": {
75
- "comment": "프로바이더 메시지 ID"
76
- },
77
- "error_message": {
78
- "type": "text",
79
- "comment": "오류 메시지"
80
- },
81
- "retry_count": {
82
- "type": "uint",
83
- "default": 0
84
- },
85
- "sent_at": {
86
- "type": "string"
87
- }
88
- }
89
- }
@@ -1,91 +0,0 @@
1
- {
2
- "name": "friendtalk_msg",
3
- "description": "친구톡(브랜드메시지) 발송 트리거 엔티티 — Hook 또는 API를 통해 생성되면 친구톡 발송이 시작됩니다. 사용자 환경에 맞게 fields를 자유롭게 확장할 수 있습니다.",
4
- "history": false,
5
- "fields": {
6
- "receiver": {
7
- "index": true,
8
- "hash": true,
9
- "comment": "수신자 전화번호",
10
- "required": true
11
- },
12
- "msg_type": {
13
- "index": true,
14
- "type": [
15
- "text",
16
- "image",
17
- "wide_image",
18
- "wide_item_list",
19
- "carousel"
20
- ],
21
- "default": "text"
22
- },
23
- "status": {
24
- "index": true,
25
- "type": [
26
- "pending",
27
- "processing",
28
- "sent",
29
- "failed"
30
- ],
31
- "default": "pending"
32
- },
33
- "content": {
34
- "type": "text",
35
- "required": true,
36
- "comment": "메시지 본문"
37
- },
38
- "image_url": {
39
- "comment": "이미지 URL"
40
- },
41
- "image_link": {
42
- "comment": "이미지 클릭 시 이동 URL"
43
- },
44
- "is_ad": {
45
- "type": "bool",
46
- "default": true,
47
- "comment": "광고성 메시지 여부"
48
- },
49
- "buttons_json": {
50
- "type": "text",
51
- "comment": "버튼 목록 JSON"
52
- },
53
- "carousel_json": {
54
- "type": "text",
55
- "comment": "캐러셀 데이터 JSON"
56
- },
57
- "items_json": {
58
- "type": "text",
59
- "comment": "와이드 아이템 리스트 JSON"
60
- },
61
- "header": {
62
- "comment": "와이드 아이템 리스트 헤더"
63
- },
64
- "provider": {
65
- "comment": "프로바이더 키 (빈 값이면 default)"
66
- },
67
- "ref_entity": {
68
- "comment": "참조 엔티티 이름"
69
- },
70
- "ref_seq": {
71
- "type": "int"
72
- }
73
- },
74
- "hooks": {
75
- "after_insert": [
76
- {
77
- "type": "friendtalk",
78
- "friendtalk_receiver": "${new.receiver}",
79
- "friendtalk_content": "${new.content}",
80
- "friendtalk_msg_type": "${new.msg_type}",
81
- "friendtalk_image_url": "${new.image_url}",
82
- "friendtalk_image_link": "${new.image_link}",
83
- "friendtalk_is_ad": "${new.is_ad}",
84
- "friendtalk_buttons_json": "${new.buttons_json}",
85
- "friendtalk_carousel_json": "${new.carousel_json}",
86
- "friendtalk_items_json": "${new.items_json}",
87
- "friendtalk_header": "${new.header}"
88
- }
89
- ]
90
- }
91
- }
@@ -1,65 +0,0 @@
1
- {
2
- "name": "sms_log",
3
- "description": "SMS/LMS/MMS 발송 이력 로그. 사용자 환경에 맞게 fields를 자유롭게 확장할 수 있습니다.",
4
- "license_scope": false,
5
- "hard_delete": true,
6
- "history": false,
7
- "read_only": true,
8
- "compress": true,
9
- "fields": {
10
- "status": {
11
- "index": true,
12
- "type": [
13
- "pending",
14
- "processing",
15
- "sent",
16
- "failed"
17
- ]
18
- },
19
- "msg_type": {
20
- "index": true,
21
- "type": [
22
- "sms",
23
- "lms",
24
- "mms"
25
- ]
26
- },
27
- "receiver": {
28
- "index": true,
29
- "hash": true,
30
- "type": "string"
31
- },
32
- "sms_msg_seq": {
33
- "index": true,
34
- "comment": "sms_msg 참조 seq"
35
- },
36
- "sender": {
37
- "type": "string"
38
- },
39
- "subject": {
40
- "type": "string"
41
- },
42
- "content": {
43
- "type": "string"
44
- },
45
- "image_url": {
46
- "type": "string",
47
- "comment": "MMS 이미지 URL"
48
- },
49
- "provider": {
50
- "type": "string"
51
- },
52
- "provider_msg_id": {
53
- "type": "string"
54
- },
55
- "error_message": {
56
- "type": "string"
57
- },
58
- "retry_count": {
59
- "type": "uint"
60
- },
61
- "sent_at": {
62
- "type": "string"
63
- }
64
- }
65
- }
@@ -1,82 +0,0 @@
1
- {
2
- "name": "sms_msg",
3
- "description": "SMS/LMS/MMS 발송 트리거 엔티티. insert 시 sms hook으로 비동기 발송. 사용자 환경에 맞게 fields를 자유롭게 확장할 수 있습니다.",
4
- "license_scope": false,
5
- "hard_delete": true,
6
- "history": false,
7
- "read_only": true,
8
- "fields": {
9
- "status": {
10
- "index": true,
11
- "type": [
12
- "queued",
13
- "sent",
14
- "failed"
15
- ],
16
- "default": "queued"
17
- },
18
- "msg_type": {
19
- "index": true,
20
- "type": [
21
- "sms",
22
- "lms",
23
- "mms"
24
- ],
25
- "default": "sms"
26
- },
27
- "receiver": {
28
- "index": true,
29
- "hash": true,
30
- "type": "string",
31
- "required": true,
32
- "comment": "수신 전화번호"
33
- },
34
- "sender": {
35
- "type": "string",
36
- "comment": "발신번호"
37
- },
38
- "subject": {
39
- "type": "string",
40
- "comment": "LMS/MMS 제목 (SMS는 미사용)"
41
- },
42
- "content": {
43
- "type": "string",
44
- "comment": "메시지 본문"
45
- },
46
- "image_url": {
47
- "type": "string",
48
- "comment": "MMS 이미지 URL"
49
- },
50
- "provider": {
51
- "type": "string",
52
- "comment": "발송 프로바이더 키"
53
- },
54
- "provider_msg_id": {
55
- "type": "string",
56
- "comment": "프로바이더 메시지 ID"
57
- },
58
- "ref_entity": {
59
- "type": "string"
60
- },
61
- "ref_seq": {
62
- "type": "int"
63
- },
64
- "error_message": {
65
- "type": "string"
66
- },
67
- "sent_at": {
68
- "type": "string"
69
- }
70
- },
71
- "hooks": {
72
- "after_insert": [
73
- {
74
- "type": "sms",
75
- "enabled": true,
76
- "sms_receiver": "${new.receiver}",
77
- "sms_content": "${new.content}",
78
- "sms_subject": "${new.subject}"
79
- }
80
- ]
81
- }
82
- }
@@ -1,50 +0,0 @@
1
- {
2
- "name": "sms_verification",
3
- "description": "SMS 인증번호 검증 엔티티. 인증번호 SHA-256 해시 저장, 시도 횟수 관리. 사용자 환경에 맞게 fields를 자유롭게 확장할 수 있습니다.",
4
- "license_scope": false,
5
- "hard_delete": true,
6
- "history": false,
7
- "fields": {
8
- "phone": {
9
- "index": true,
10
- "hash": true,
11
- "comment": "수신 전화번호",
12
- "type": "varchar(20)",
13
- "required": true
14
- },
15
- "purpose": {
16
- "index": true,
17
- "comment": "인증 목적",
18
- "type": [
19
- "signup",
20
- "password_reset",
21
- "identity"
22
- ],
23
- "required": true
24
- },
25
- "status": {
26
- "index": true,
27
- "type": [
28
- "pending",
29
- "verified",
30
- "expired"
31
- ],
32
- "default": "pending",
33
- "required": true
34
- },
35
- "code_hash": {
36
- "type": "varchar(64)",
37
- "required": true,
38
- "comment": "인증번호 SHA-256 해시"
39
- },
40
- "expires_at": {
41
- "required": true,
42
- "comment": "만료 시각"
43
- },
44
- "attempts": {
45
- "type": "uint",
46
- "default": 0,
47
- "comment": "검증 시도 횟수"
48
- }
49
- }
50
- }
@@ -1,60 +0,0 @@
1
- {
2
- "name": "pg_cancel",
3
- "description": "PG 결제 취소 이력 엔티티. 부분/전액 취소를 기록합니다. 사용자 환경에 맞게 fields를 자유롭게 확장할 수 있습니다.",
4
- "read_only": true,
5
- "fields": {
6
- "order_seq": {
7
- "index": true,
8
- "type": "integer",
9
- "required": true,
10
- "comment": "pg_order.seq 참조"
11
- },
12
- "order_id": {
13
- "index": true,
14
- "type": "string",
15
- "required": true,
16
- "comment": "주문번호 (조회 편의)"
17
- },
18
- "cancel_amount": {
19
- "index": true,
20
- "type": "integer",
21
- "required": true,
22
- "comment": "취소 금액"
23
- },
24
- "cancel_reason": {
25
- "index": true,
26
- "type": "string",
27
- "required": true,
28
- "comment": "취소 사유 (최대 200자)"
29
- },
30
- "cancel_status": {
31
- "index": true,
32
- "type": [
33
- "done",
34
- "failed"
35
- ],
36
- "default": "done",
37
- "comment": "취소 처리 상태"
38
- },
39
- "transaction_key": {
40
- "index": true,
41
- "type": "string",
42
- "comment": "PG사 취소 거래 키"
43
- },
44
- "canceled_time": {
45
- "comment": "취소 시각 (ISO 8601)"
46
- },
47
- "refundable_amount": {
48
- "comment": "취소 후 환불 가능 잔액"
49
- },
50
- "tax_free_amount": {
51
- "comment": "취소된 금액 중 면세 금액"
52
- },
53
- "receipt_key": {
54
- "comment": "현금영수증 키 (해당 시)"
55
- },
56
- "refund_account": {
57
- "comment": "환불 계좌 정보 JSON (가상계좌 취소 시)"
58
- }
59
- }
60
- }
@@ -1,115 +0,0 @@
1
- {
2
- "name": "pg_order",
3
- "description": "PG 결제 주문 엔티티. 결제 요청/승인/취소 상태를 추적합니다. 사용자 환경에 맞게 fields를 자유롭게 확장할 수 있습니다.",
4
- "fields": {
5
- "order_id": {
6
- "index": true,
7
- "type": "string",
8
- "required": true,
9
- "unique": true,
10
- "comment": "고유 주문번호 (6~64자, [a-zA-Z0-9_-])"
11
- },
12
- "status": {
13
- "index": true,
14
- "type": [
15
- "created",
16
- "ready",
17
- "in_progress",
18
- "waiting",
19
- "done",
20
- "canceled",
21
- "partial_canceled",
22
- "aborted",
23
- "expired"
24
- ],
25
- "default": "created",
26
- "comment": "결제 상태"
27
- },
28
- "payment_key": {
29
- "index": true,
30
- "type": "string",
31
- "comment": "PG사 결제 키 (승인 후 할당)"
32
- },
33
- "provider": {
34
- "index": true,
35
- "type": "string",
36
- "required": true,
37
- "comment": "PG 프로바이더 키 (toss_payments, kcp, inicis 등)"
38
- },
39
- "method": {
40
- "index": true,
41
- "type": "string",
42
- "comment": "결제수단 (card, virtual_account, transfer, phone, easy_pay)"
43
- },
44
- "amount": {
45
- "index": true,
46
- "type": "integer",
47
- "required": true,
48
- "comment": "총 결제 금액 (원)"
49
- },
50
- "balance_amount": {
51
- "index": true,
52
- "type": "integer",
53
- "comment": "취소 가능 잔액"
54
- },
55
- "currency": {
56
- "index": true,
57
- "type": "string",
58
- "default": "KRW",
59
- "comment": "통화 코드 (ISO 4217)"
60
- },
61
- "account_seq": {
62
- "index": true,
63
- "type": "integer",
64
- "comment": "구매자 계정 seq (로그인 사용자)"
65
- },
66
- "customer_name": {
67
- "index": true,
68
- "hash": true,
69
- "type": "string",
70
- "comment": "구매자명"
71
- },
72
- "customer_email": {
73
- "index": true,
74
- "hash": true,
75
- "type": "string",
76
- "comment": "구매자 이메일"
77
- },
78
- "order_name": {
79
- "comment": "주문 상품명 (예: '토스 티셔츠 외 2건')"
80
- },
81
- "requested_time": {
82
- "comment": "결제 요청 시각 (ISO 8601)"
83
- },
84
- "approved_time": {
85
- "comment": "결제 승인 시각 (ISO 8601)"
86
- },
87
- "card_info": {
88
- "comment": "카드 결제 정보 JSON (마스킹된 카드번호, 카드타입 등)"
89
- },
90
- "virtual_account_info": {
91
- "comment": "가상계좌 정보 JSON (계좌번호, 은행, 입금기한)"
92
- },
93
- "easy_pay_info": {
94
- "comment": "간편결제 정보 JSON (provider, amount, discountAmount)"
95
- },
96
- "receipt_url": {
97
- "comment": "영수증 URL"
98
- },
99
- "checkout_url": {
100
- "comment": "결제창 URL"
101
- },
102
- "failure_code": {
103
- "comment": "실패 에러 코드"
104
- },
105
- "failure_message": {
106
- "comment": "실패 에러 메시지"
107
- },
108
- "metadata": {
109
- "comment": "상점 커스텀 데이터 JSON (최대 5개 key-value)"
110
- },
111
- "pg_raw_response": {
112
- "comment": "PG사 원본 응답 JSON (디버깅용)"
113
- }
114
- }
115
- }
@@ -1,52 +0,0 @@
1
- {
2
- "name": "pg_webhook_log",
3
- "description": "PG 웹훅 수신 이력. 모든 수신 이벤트를 기록합니다. 사용자 환경에 맞게 fields를 자유롭게 확장할 수 있습니다.",
4
- "hard_delete": true,
5
- "read_only": true,
6
- "compress": true,
7
- "fields": {
8
- "event_type": {
9
- "index": true,
10
- "type": "string",
11
- "required": true,
12
- "comment": "웹훅 이벤트 타입 (payment.done, payment.canceled 등)"
13
- },
14
- "order_id": {
15
- "index": true,
16
- "type": "string",
17
- "comment": "관련 주문번호"
18
- },
19
- "payment_key": {
20
- "index": true,
21
- "type": "string",
22
- "comment": "관련 결제 키"
23
- },
24
- "status": {
25
- "index": true,
26
- "type": [
27
- "received",
28
- "processed",
29
- "failed"
30
- ],
31
- "default": "received",
32
- "comment": "웹훅 처리 상태"
33
- },
34
- "provider": {
35
- "index": true,
36
- "type": "string",
37
- "comment": "PG 프로바이더 키"
38
- },
39
- "payload": {
40
- "comment": "수신한 웹훅 원본 JSON"
41
- },
42
- "processed_time": {
43
- "comment": "처리 완료 시각"
44
- },
45
- "error_message": {
46
- "comment": "처리 실패 시 에러 메시지"
47
- },
48
- "signature": {
49
- "comment": "웹훅 서명값 (검증용)"
50
- }
51
- }
52
- }