This commit is contained in:
Logan committed 2026-07-09 14:16:56 +08:00
1 parent 0690285147
commit 5618cd2738
154 files changed
+5021 -3161

No files matched your search

+9 -10
View File
@@ -2,20 +2,19 @@ package model
import (
"time"
)
// ResourceModel 资源模型 (CMDB 模型定义)
type ResourceModel struct {
ID uint `gorm:"primarykey" json:"id"`
Name string `gorm:"size:64;not null" json:"name"`
Code string `gorm:"size:64;uniqueIndex;not null" json:"code"`
Description string `gorm:"size:500" json:"description"`
Type string `gorm:"size:32;default:normal" json:"type"` // normal, parent
Attributes string `gorm:"type:text" json:"attributes"` // JSON 数组
Icon string `gorm:"size:64" json:"icon"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ID uint `gorm:"primarykey" json:"id"`
Name string `gorm:"size:64;not null" json:"name"`
Code string `gorm:"size:64;uniqueIndex;not null" json:"code"`
Description string `gorm:"size:500" json:"description"`
Type string `gorm:"size:32;default:normal" json:"type"` // normal, parent
Attributes string `gorm:"type:text" json:"attributes"` // JSON 数组
Icon string `gorm:"size:64" json:"icon"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (ResourceModel) TableName() string {