- 后端:新增 /api/audio/transcribe 接口,调用 Ollama whisper 进行语音识别 - 前端:新增 AudioTranscribePage.vue 页面,支持 MP3/WAV/M4A/OGG/FLAC 等格式 - 注册路由、工具卡片、智能助手欢迎语更新 Co-Authored-By: Claude Code <noreply@anthropic.com>
24 lines
1.4 KiB
Go
24 lines
1.4 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
// User 用户表
|
|
type User struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
Username string `gorm:"size:64;uniqueIndex;not null" json:"username"`
|
|
PasswordHash string `gorm:"size:256;not null" json:"-"`
|
|
FullName string `gorm:"size:64;not null" json:"full_name"`
|
|
Role string `gorm:"size:16;not null;default:employee;index" json:"role"` // employee / admin
|
|
Status string `gorm:"size:16;not null;default:active;index" json:"status"` // active / disabled
|
|
AiPoints int `gorm:"not null;default:100" json:"ai_points"` // 剩余 AI 算力点
|
|
LearningPoints int `gorm:"not null;default:0;index" json:"learning_points"` // 学习积分(游戏化成长值)
|
|
Department string `gorm:"size:64;default:''" json:"department"` // 部门
|
|
Position string `gorm:"size:64;default:''" json:"position"` // 岗位(文本,历史遗留)
|
|
PositionID *uint `gorm:"index" json:"position_id"` // 所属岗位,可空(历史用户/管理员可为空)
|
|
HireBatch string `gorm:"size:64;default:''" json:"hire_batch"` // 入职批次
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
func (User) TableName() string { return "user" }
|