init: 数字员工平台初始代码
包含前端(Vue3 + VueFlow 画布)、后端(Go)、文档体系。 - 工作台画布:节点拖放、连线模式、右键菜单、AI 助手 - 后端:连接器 API、专员种子数据 - 导航:左侧导航、工坊、市场、控制台
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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" }
|
||||
Reference in New Issue
Block a user