完善域名服务器项目归属与数据库关联约束
保存资源项目、所有者和操作人,接口从会话记录归属,普通更新保留创建信息。 新增三库第十一版迁移、同项目绑定约束和 SQLite 触发器保护,补充迁移回滚重试、仓储、接口及备份恢复测试。 本次整理验证:后端构建、静态检查、关联改造针对性测试和 CLI 包测试通过。 范围说明:项目成员权限及其他资源归属尚未完成;本次未重新执行外部数据库实库、独立程序及生产部署验收。
This commit is contained in:
1 parent
059e6d7b67
commit
7284958819
22 files changed
+815
-27
No files matched your search
@@ -8,6 +8,8 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.pcux.cn/xuans/Scert/backend/internal/domain"
|
||||
)
|
||||
|
||||
type WebServer string
|
||||
@@ -45,6 +47,7 @@ const (
|
||||
var serverPathPlaceholderPattern = regexp.MustCompile(`\{[^{}]+\}`)
|
||||
|
||||
type Server struct {
|
||||
domain.ResourceScope
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Address string `json:"address"`
|
||||
@@ -71,6 +74,7 @@ type Server struct {
|
||||
}
|
||||
|
||||
func (s Server) Normalize() Server {
|
||||
s.ResourceScope = s.ResourceScope.Normalize()
|
||||
s.ID = strings.TrimSpace(s.ID)
|
||||
s.Name = strings.TrimSpace(s.Name)
|
||||
s.Address = strings.TrimSpace(s.Address)
|
||||
|
||||
Reference in new issue
Block a user