feat: 添加数据库资产、命令拦截器、授权资产等功能,修复GitHub Actions工作流

This commit is contained in:
2026-04-18 07:44:18 +08:00
parent 6e2e2f9387
commit 3c217ab039
64 changed files with 3308 additions and 760 deletions
+33 -33
View File
@@ -5,23 +5,23 @@ import (
)
type User struct {
ID string `gorm:"primary_key,type:varchar(36)" json:"id"`
Username string `gorm:"index,type:varchar(200)" json:"username"`
Password string `gorm:"type:varchar(500)" json:"-"`
TOTPSecret string `json:"-"`
Online *bool `json:"online"`
Status string `gorm:"type:varchar(10)" json:"status"`
Created common.JsonTime `json:"createdAt"`
Type string `gorm:"type:varchar(20)" json:"type"`
Nickname string `gorm:"type:varchar(500)" json:"nickname"`
Mail string `gorm:"type:varchar(500)" json:"mail"`
Phone string `gorm:"type:varchar(50)" json:"phone"`
Source string `gorm:"type:varchar(20)" json:"source"`
Recording string `gorm:"type:varchar(20);default:'enabled'" json:"recording"`
Watermark string `gorm:"type:varchar(20);default:'enabled'" json:"watermark"`
PublicKey string `gorm:"type:text" json:"publicKey"`
Remark string `gorm:"type:text" json:"remark"`
Roles []string `gorm:"-" json:"roles"`
ID string `gorm:"primary_key,type:varchar(36)" json:"id"`
Username string `gorm:"index,type:varchar(200)" json:"username"`
Password string `gorm:"type:varchar(500)" json:"-"`
TOTPSecret string `json:"-"`
Online *bool `json:"online"`
Status string `gorm:"type:varchar(10)" json:"status"`
Created common.JsonTime `json:"createdAt"`
Type string `gorm:"type:varchar(20)" json:"type"`
Nickname string `gorm:"type:varchar(500)" json:"nickname"`
Mail string `gorm:"type:varchar(500)" json:"mail"`
Phone string `gorm:"type:varchar(50)" json:"phone"`
Source string `gorm:"type:varchar(20)" json:"source"`
Recording string `gorm:"type:varchar(20);default:'enabled'" json:"recording"`
Watermark string `gorm:"type:varchar(20);default:'enabled'" json:"watermark"`
PublicKey string `gorm:"type:text" json:"publicKey"`
Remark string `gorm:"type:text" json:"remark"`
Roles []string `gorm:"-" json:"roles"`
Departments []UserDepartment `gorm:"-" json:"departments"`
}
@@ -31,22 +31,22 @@ type UserDepartment struct {
}
type UserForPage struct {
ID string `json:"id"`
Username string `json:"username"`
Nickname string `json:"nickname"`
TOTPSecret string `json:"totpSecret"`
Mail string `json:"mail"`
Phone string `json:"phone"`
Online bool `json:"online"`
Status string `json:"status"`
Created common.JsonTime `json:"createdAt"`
Type string `json:"type"`
Source string `json:"source"`
Recording string `json:"recording"`
Watermark string `json:"watermark"`
Remark string `json:"remark"`
SharerAssetCount int64 `json:"sharerAssetCount"`
Departments []UserDepartment `json:"departments"`
ID string `json:"id"`
Username string `json:"username"`
Nickname string `json:"nickname"`
TOTPSecret string `json:"totpSecret"`
Mail string `json:"mail"`
Phone string `json:"phone"`
Online bool `json:"online"`
Status string `json:"status"`
Created common.JsonTime `json:"createdAt"`
Type string `json:"type"`
Source string `json:"source"`
Recording string `json:"recording"`
Watermark string `json:"watermark"`
Remark string `json:"remark"`
SharerAssetCount int64 `json:"sharerAssetCount"`
Departments []UserDepartment `gorm:"-" json:"departments"`
LastLoginAt *common.JsonTime `json:"lastLoginAt"`
}