136 lines
3.9 KiB
Go
136 lines
3.9 KiB
Go
package mongo_model
|
||
|
||
import (
|
||
"time"
|
||
)
|
||
|
||
// AdvicerVersionMongo 销售版本(与项目资料存储格式一致)
|
||
// 各维度内容直接作为文档顶层字段存储(key=维度名,value=内容)
|
||
type AdvicerVersionMongo struct {
|
||
AdvicerId int32 `json:"advicerId" bson:"advicerId"`
|
||
VersionDesc string `json:"versionDesc" bson:"versionDesc"`
|
||
Data map[string]interface{} `json:"data" bson:"-"` // 不直接映射 bson,save/load 时手动展平
|
||
LastUpdateTime time.Time `json:"lastUpdateTime" bson:"lastUpdateTime"`
|
||
}
|
||
|
||
func NewAdvicerVersionMongo() *AdvicerVersionMongo {
|
||
return &AdvicerVersionMongo{}
|
||
}
|
||
|
||
func (a *AdvicerVersionMongo) MongoTableName() string {
|
||
return "advicer_version"
|
||
}
|
||
|
||
// DialectFeatures 方言特征(保留用于其他业务引用)
|
||
type DialectFeatures struct {
|
||
Region string `json:"region"`
|
||
Intensity float64 `json:"intensity"`
|
||
KeyWords []string `json:"keyWords"`
|
||
}
|
||
|
||
func (e *DialectFeatures) Example() string {
|
||
return `{"region":"四川成都话","intensity":0.4,"keyWords":["噻","要得","没得","不晓得","是不是"]}`
|
||
}
|
||
|
||
func (e *DialectFeatures) Copy() AdviceData {
|
||
return new(DialectFeatures)
|
||
}
|
||
|
||
func (e *DialectFeatures) Role() AdviceRole {
|
||
return RoleAdvicer
|
||
}
|
||
|
||
func (e *DialectFeatures) Desc() string {
|
||
return "方言特征"
|
||
}
|
||
|
||
// SentencePatterns 句子模式(保留用于其他业务引用)
|
||
type SentencePatterns struct {
|
||
OpeningMode []string `json:"openingMode"`
|
||
ExplanationMode []string `json:"explanationMode"`
|
||
ConfirmationMode []string `json:"confirmationMode"`
|
||
SummaryMode []string `json:"summaryMode"`
|
||
TransitionMode []string `json:"transitionMode"`
|
||
}
|
||
|
||
func (e *SentencePatterns) Example() string {
|
||
return `{"openingMode":["我给你介绍一下","我们先来看一下"],"explanationMode":["是这样的","我跟你讲","你发现没得"],"confirmationMode":["对吧?","是不是嘛?","你晓得不?","明白了噻?"],"summaryMode":["所以说","简单说就是"],"transitionMode":["然后的话","再其次","还有一点"]}`
|
||
}
|
||
|
||
func (e *SentencePatterns) Copy() AdviceData {
|
||
return new(SentencePatterns)
|
||
}
|
||
|
||
func (e *SentencePatterns) Role() AdviceRole {
|
||
return RoleAdvicer
|
||
}
|
||
|
||
func (e *SentencePatterns) Desc() string {
|
||
return "句子模式"
|
||
}
|
||
|
||
// PersonalityTags 个性标签(保留用于其他业务引用)
|
||
type PersonalityTags []string
|
||
|
||
func (e *PersonalityTags) Example() string {
|
||
return `["耐心细致","细节控"]`
|
||
}
|
||
func (e *PersonalityTags) Copy() AdviceData {
|
||
return new(PersonalityTags)
|
||
}
|
||
|
||
func (e *PersonalityTags) Role() AdviceRole {
|
||
return RoleAdvicer
|
||
}
|
||
|
||
func (e *PersonalityTags) Desc() string {
|
||
return "个性标签"
|
||
}
|
||
|
||
// ToneTags 语气标签(保留用于其他业务引用)
|
||
type ToneTags struct {
|
||
Enthusiasm float64 `json:"enthusiasm"`
|
||
Patience float64 `json:"patience"`
|
||
Confidence float64 `json:"confidence"`
|
||
Friendliness float64 `json:"friendliness"`
|
||
Persuasion float64 `json:"persuasion"`
|
||
}
|
||
|
||
func (e *ToneTags) Example() string {
|
||
return `{"enthusiasm":0.8,"patience":0.9,"confidence":0.85,"friendliness":0.75,"persuasion":0.7}`
|
||
}
|
||
|
||
func (e *ToneTags) Copy() AdviceData {
|
||
return new(ToneTags)
|
||
}
|
||
|
||
func (e *ToneTags) Role() AdviceRole {
|
||
return RoleAdvicer
|
||
}
|
||
|
||
func (e *ToneTags) Desc() string {
|
||
return "语气标签"
|
||
}
|
||
|
||
// SignatureDialogues 代表性对话示例(保留用于其他业务引用)
|
||
type SignatureDialogues []struct {
|
||
Context string `json:"context"`
|
||
Dialogue string `json:"dialogue"`
|
||
}
|
||
|
||
func (e *SignatureDialogues) Example() string {
|
||
return `[{"context":"客户质疑地块大小","dialogue":"哥,14亩确实不大,但你要在成都是2.5环内城买房,这种是个普遍存在的一个现象。"}]`
|
||
}
|
||
|
||
func (e *SignatureDialogues) Copy() AdviceData {
|
||
return new(SignatureDialogues)
|
||
}
|
||
|
||
func (e *SignatureDialogues) Role() AdviceRole {
|
||
return RoleAdvicer
|
||
}
|
||
|
||
func (e *SignatureDialogues) Desc() string {
|
||
return "代表性对话示例"
|
||
}
|