feat: 定义用户模块 User 模型与 Repository 层 #94
@@ -41,6 +41,15 @@ func (p SessionConfigPatch) Apply(cfg *SessionConfig) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// User 用户。
|
||||||
|
type User struct {
|
||||||
|
ID string `json:"id"`
|
||||||
|
Username string `json:"username"`
|
||||||
|
PasswordHash string `json:"-"`
|
||||||
|
CreatedAt time.Time `json:"created_at"`
|
||||||
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
|
}
|
||||||
|
|
||||||
// Message 对话消息。
|
// Message 对话消息。
|
||||||
type Message struct {
|
type Message struct {
|
||||||
Role string `json:"role"` // "user" | "assistant"
|
Role string `json:"role"` // "user" | "assistant"
|
||||||
|
|||||||
Reference in New Issue
Block a user