|
@@ -56,6 +56,7 @@ TABLE(Profile, "Profile\n员工档案表") {
|
|
|
FIELD(objectId, String)
|
|
|
FIELD(name, String)
|
|
|
FIELD(mobile, String)
|
|
|
+ FIELD(department, Pointer→Department)
|
|
|
FIELD(company, Pointer→Company)
|
|
|
FIELD(userId, String)
|
|
|
FIELD(roleName, String)
|
|
@@ -224,14 +225,14 @@ TABLE(ProjectIssue, "ProjectIssue\n异常记录表") {
|
|
|
FIELD(isDeleted, Boolean)
|
|
|
}
|
|
|
|
|
|
-' ============ 沟通记录 ============
|
|
|
-TABLE(Communication, "Communication\n沟通记录表") {
|
|
|
+' ============ 跟进记录 ============
|
|
|
+TABLE(ContactFollow, "ContactFollow\n跟进记录表") {
|
|
|
FIELD(objectId, String)
|
|
|
FIELD(project, Pointer→Project)
|
|
|
FIELD(sender, Pointer→Profile/ContactInfo)
|
|
|
FIELD(content, String)
|
|
|
- FIELD(communicationType, String)
|
|
|
- FIELD(relatedStage, String)
|
|
|
+ FIELD(type, String)
|
|
|
+ FIELD(stage, String)
|
|
|
FIELD(attachments, Array)
|
|
|
FIELD(data, Object)
|
|
|
FIELD(isDeleted, Boolean)
|
|
@@ -263,7 +264,7 @@ ProjectSettlement "1" --> "n" ProjectVoucher : 付款凭证
|
|
|
Project "1" --> "n" ProjectFeedback : 客户反馈
|
|
|
Project "1" --> "n" ProductCheck : 质量检查
|
|
|
Project "1" --> "n" ProjectIssue : 异常记录
|
|
|
-Project "1" --> "n" Communication : 沟通记录
|
|
|
+Project "1" --> "n" ContactFollow : 跟进记录
|
|
|
|
|
|
' 群聊关系
|
|
|
GroupChat "n" --> "1" Company : 所属企业
|
|
@@ -322,6 +323,7 @@ GroupChat "n" --> "1" Project : 关联项目(可选)
|
|
|
| objectId | String | 是 | 主键ID | "prof001" |
|
|
|
| name | String | 是 | 员工姓名 | "张三" |
|
|
|
| mobile | String | 否 | 手机号 | "13800138000" |
|
|
|
+| department | Pointer | 是 | 所属小组 | → Department |
|
|
|
| company | Pointer | 是 | 所属企业 | → Company |
|
|
|
| userId | String | 否 | 企微UserID | "zhangsan" |
|
|
|
| roleName | String | 是 | 员工角色 | "客服" / "组员" / "组长" |
|
|
@@ -1157,7 +1159,7 @@ Product.quotation 产品报价字段
|
|
|
```json
|
|
|
{
|
|
|
"assignedTo": "prof003",
|
|
|
- "relatedStage": "建模",
|
|
|
+ "stage": "建模",
|
|
|
"impact": "预计延期2天",
|
|
|
"preventiveMeasures": ["增加备份频率", "升级建模软件"],
|
|
|
"resolvedAt": "2024-10-16T15:00:00.000Z"
|
|
@@ -1171,25 +1173,26 @@ Product.quotation 产品报价字段
|
|
|
|
|
|
---
|
|
|
|
|
|
-### 17. Communication(沟通记录表)
|
|
|
+### 17. ContactFollow(跟进记录表)
|
|
|
|
|
|
-**用途**: 记录项目相关的沟通历史。
|
|
|
+**用途**: 记录项目相关的跟进历史。
|
|
|
|
|
|
| 字段名 | 类型 | 必填 | 说明 | 示例值 |
|
|
|
|--------|------|------|------|--------|
|
|
|
| objectId | String | 是 | 主键ID | "comm001" |
|
|
|
| project | Pointer | 是 | 所属项目 | → Project |
|
|
|
-| sender | Pointer | 是 | 发送人 | → Profile / ContactInfo |
|
|
|
-| content | String | 是 | 沟通内容 | "客厅效果图已发送,请查收" |
|
|
|
-| communicationType | String | 是 | 沟通类型 | "message" / "call" / "meeting" |
|
|
|
-| relatedStage | String | 否 | 关联阶段 | "渲染" |
|
|
|
+| profile | Pointer | 是 | 跟进人 | → Profile |
|
|
|
+| contact | Pointer | 是 | 联系人 | → ContactInfo |
|
|
|
+| content | String | 是 | 跟进内容 | "客厅效果图已发送,请查收" |
|
|
|
+| type | String | 是 | 跟进类型 | "message" / "call" / "meeting" |
|
|
|
+| stage | String | 否 | 关联阶段 | "渲染" |
|
|
|
| attachments | Array | 否 | 附件列表 | ["https://..."] |
|
|
|
| data | Object | 否 | 扩展数据 | { isRead, priority, ... } |
|
|
|
| isDeleted | Boolean | 否 | 软删除标记 | false |
|
|
|
| createdAt | Date | 自动 | 创建时间 | 2024-01-01T00:00:00.000Z |
|
|
|
| updatedAt | Date | 自动 | 更新时间 | 2024-01-01T00:00:00.000Z |
|
|
|
|
|
|
-**communicationType 枚举值**:
|
|
|
+**type 枚举值**:
|
|
|
- `message`: 文字消息
|
|
|
- `call`: 电话沟通
|
|
|
- `meeting`: 会议
|
|
@@ -1199,7 +1202,7 @@ Product.quotation 产品报价字段
|
|
|
**索引建议**:
|
|
|
- `project + createdAt`
|
|
|
- `sender + project`
|
|
|
-- `relatedStage`
|
|
|
+- `stage`
|
|
|
|
|
|
---
|
|
|
|