feat: 初始提交 - Code Server Bridge完整实现
- OAuth认证系统(Gitea + Lua扩展) - Git自动化操作(本地/SSH远程) - 实时进度WebSocket推送 - 现代化Tab界面UI - Cobra CLI命令行(init/version/serve) - 完整构建系统(Makefile + Taskfile) - UPX压缩支持(体积减少70%)
This commit is contained in:
16
internal/db/workspace_token.go
Normal file
16
internal/db/workspace_token.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// WorkspaceToken 工作区访问令牌模型
|
||||
// 用于存储一次性/限时的workspace访问token
|
||||
type WorkspaceToken struct {
|
||||
ID uint `gorm:"primarykey"`
|
||||
Token string `gorm:"uniqueIndex;not null"` // Token哈希值
|
||||
WorkspacePath string `gorm:"not null"` // 工作区路径
|
||||
CreatedAt time.Time // 创建时间
|
||||
ExpiresAt time.Time `gorm:"index"` // 过期时间
|
||||
Used bool `gorm:"default:false;index"` // 是否已使用
|
||||
}
|
||||
Reference in New Issue
Block a user