admin
2025-06-06 9cd825aea53fa5ba0cda1485464af027e27f0ce4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
package tech.aiflowy.ai.entity.base;
 
import tech.aiflowy.common.entity.DateEntity;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.core.handler.FastjsonTypeHandler;
 
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import java.util.Map;
 
 
public class AiBotMessageBase extends DateEntity implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    @Id(keyType = KeyType.Generator, value = "snowFlakeId")
    private BigInteger id;
 
    /**
     * Bot ID
     */
    @Column(comment = "Bot ID")
    private BigInteger botId;
 
    /**
     * 关联的账户ID
     */
    @Column(comment = "关联的账户ID")
    private BigInteger accountId;
 
    /**
     * 回话ID
     */
    @Column(comment = "回话ID")
    private String sessionId;
 
    private String role;
 
    private String content;
 
    private String image;
 
    private Integer promptTokens;
 
    private Integer completionTokens;
 
    private Integer totalTokens;
 
    /**
     * 1是external 消息,0: bot页面消息
     *
     */
    private int isExternalMsg;
 
    /**
     * 方法定义
     */
    @Column(comment = "方法定义")
    private String functions;
 
    @Column(typeHandler = FastjsonTypeHandler.class)
    private Map<String, Object> options;
 
    private Date created;
 
    private Date modified;
 
    public BigInteger getId() {
        return id;
    }
 
    public void setId(BigInteger id) {
        this.id = id;
    }
 
    public BigInteger getBotId() {
        return botId;
    }
 
    public void setBotId(BigInteger botId) {
        this.botId = botId;
    }
 
    public BigInteger getAccountId() {
        return accountId;
    }
 
    public void setAccountId(BigInteger accountId) {
        this.accountId = accountId;
    }
 
    public String getSessionId() {
        return sessionId;
    }
 
    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }
 
    public String getRole() {
        return role;
    }
 
    public void setRole(String role) {
        this.role = role;
    }
 
    public String getContent() {
        return content;
    }
 
    public void setContent(String content) {
        this.content = content;
    }
 
    public String getImage() {
        return image;
    }
 
    public void setImage(String image) {
        this.image = image;
    }
 
    public Integer getPromptTokens() {
        return promptTokens;
    }
 
    public void setPromptTokens(Integer promptTokens) {
        this.promptTokens = promptTokens;
    }
 
    public Integer getCompletionTokens() {
        return completionTokens;
    }
 
    public void setCompletionTokens(Integer completionTokens) {
        this.completionTokens = completionTokens;
    }
 
    public Integer getTotalTokens() {
        return totalTokens;
    }
 
    public void setTotalTokens(Integer totalTokens) {
        this.totalTokens = totalTokens;
    }
 
    public String getFunctions() {
        return functions;
    }
 
    public void setFunctions(String functions) {
        this.functions = functions;
    }
 
    public Map<String, Object> getOptions() {
        return options;
    }
 
    public void setOptions(Map<String, Object> options) {
        this.options = options;
    }
 
    public Date getCreated() {
        return created;
    }
 
    public void setCreated(Date created) {
        this.created = created;
    }
 
    public Date getModified() {
        return modified;
    }
 
    public void setModified(Date modified) {
        this.modified = modified;
    }
 
    public int getIsExternalMsg() {
        return isExternalMsg;
    }
 
    public void setIsExternalMsg(int isExternalMsg) {
        this.isExternalMsg = isExternalMsg;
    }
}