@yolo-croket-dev/entity-v2 0.2.19-jun.0 → 0.2.19-jun.1
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.
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Types } from 'mongoose';
|
|
2
|
+
export declare enum ChatRoomTypeEnum {
|
|
3
|
+
ASK = "ask",
|
|
4
|
+
STORE = "store"
|
|
5
|
+
}
|
|
6
|
+
export declare enum ChatRoomProcessEnum {
|
|
7
|
+
QUESTION = "question",
|
|
8
|
+
PAID = "paid"
|
|
9
|
+
}
|
|
10
|
+
export interface ChatRoomBuyerInfo {
|
|
11
|
+
userId: Types.ObjectId | string;
|
|
12
|
+
buyerName: string;
|
|
13
|
+
unread: number;
|
|
14
|
+
isOut: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ChatRoomSellerInfo {
|
|
17
|
+
userId: Types.ObjectId | string;
|
|
18
|
+
storeId: Types.ObjectId | string;
|
|
19
|
+
unread: number;
|
|
20
|
+
isOut: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ChatRoomPastItemInfo {
|
|
23
|
+
pastItemName: string;
|
|
24
|
+
pastItemImg: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ChatRoomPastAskInfo {
|
|
27
|
+
pastAskTitle: string;
|
|
28
|
+
pastAskImg: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ChatRoomRelateAskInfo {
|
|
31
|
+
askProcess: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ChatRoomRelatePInfo {
|
|
34
|
+
PInfoProcess: string;
|
|
35
|
+
PInfoProcess_v2: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @author jun
|
|
39
|
+
* @description 채팅 룸 엔티티
|
|
40
|
+
*/
|
|
41
|
+
export interface ChatRoomEntity {
|
|
42
|
+
_id: Types.ObjectId | string;
|
|
43
|
+
/** 메시지 타입 <ask, store> */
|
|
44
|
+
chatType: ChatRoomTypeEnum;
|
|
45
|
+
/** 마지막 메세지 인덱스 (총 메시지 content 수) */
|
|
46
|
+
chatLastIndex: number;
|
|
47
|
+
/** 메시지 프로세스 < question, paid > */
|
|
48
|
+
chatProcess: ChatRoomProcessEnum;
|
|
49
|
+
/** 최초 생성자 유저 아이디 */
|
|
50
|
+
initRegUserId: Types.ObjectId | string;
|
|
51
|
+
/** 키 `_${상품 또는 요청, 결제 아이디}-${구매자아이디}-${셀러아이디}_` */
|
|
52
|
+
chatRoomKey: string;
|
|
53
|
+
buyerInfo: ChatRoomBuyerInfo;
|
|
54
|
+
sellerInfo: ChatRoomSellerInfo;
|
|
55
|
+
/** 관련 구매 정보 아이디 */
|
|
56
|
+
relatedPInfoId?: Types.ObjectId | string;
|
|
57
|
+
/** 관련 뉴 요청 아이디 */
|
|
58
|
+
relatedAskId?: Types.ObjectId | string;
|
|
59
|
+
/** 관련 상품 아이디 */
|
|
60
|
+
relatedItemId?: Types.ObjectId | string;
|
|
61
|
+
pastItemInfo?: ChatRoomPastItemInfo;
|
|
62
|
+
pastAskInfo?: ChatRoomPastAskInfo;
|
|
63
|
+
relateAsk?: ChatRoomRelateAskInfo;
|
|
64
|
+
relatePInfo?: ChatRoomRelatePInfo;
|
|
65
|
+
/** 미리 보기 텍스트 */
|
|
66
|
+
preview?: string;
|
|
67
|
+
/** 미리 보기 종류 <text, img> */
|
|
68
|
+
previewType?: string;
|
|
69
|
+
/** 마지막 문자 시간 */
|
|
70
|
+
lastMsgDate?: Date;
|
|
71
|
+
/** 저장 일 */
|
|
72
|
+
regDate: Date;
|
|
73
|
+
/** 메시지 룸 로그 */
|
|
74
|
+
log: [];
|
|
75
|
+
/** 복사한 메시지 아이디 */
|
|
76
|
+
relatedMsgId?: Types.ObjectId | string;
|
|
77
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatRoomProcessEnum = exports.ChatRoomTypeEnum = void 0;
|
|
4
|
+
var ChatRoomTypeEnum;
|
|
5
|
+
(function (ChatRoomTypeEnum) {
|
|
6
|
+
ChatRoomTypeEnum["ASK"] = "ask";
|
|
7
|
+
ChatRoomTypeEnum["STORE"] = "store";
|
|
8
|
+
})(ChatRoomTypeEnum = exports.ChatRoomTypeEnum || (exports.ChatRoomTypeEnum = {}));
|
|
9
|
+
var ChatRoomProcessEnum;
|
|
10
|
+
(function (ChatRoomProcessEnum) {
|
|
11
|
+
ChatRoomProcessEnum["QUESTION"] = "question";
|
|
12
|
+
ChatRoomProcessEnum["PAID"] = "paid";
|
|
13
|
+
})(ChatRoomProcessEnum = exports.ChatRoomProcessEnum || (exports.ChatRoomProcessEnum = {}));
|
package/chat.modules/index.d.ts
CHANGED
package/chat.modules/index.js
CHANGED
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./chat-content.entity"), exports);
|
|
18
18
|
__exportStar(require("./chat-content-group.entity"), exports);
|
|
19
|
+
__exportStar(require("./chat-room.entity"), exports);
|