feat: sync current progress (P0 hardening + P1 observability + deploy docs/systemd)

This commit is contained in:
OpenClaw Agent
2026-02-28 23:51:23 +08:00
commit d17296d794
96 changed files with 6358 additions and 0 deletions

20
internal/model/asset.go Normal file
View File

@@ -0,0 +1,20 @@
package model
import "time"
type Asset struct {
ID uint `json:"id" gorm:"primaryKey;index:idx_assets_user_status_id,priority:3"`
UserID uint `json:"user_id" gorm:"not null;index:idx_assets_user_status_category,priority:1;index:idx_assets_user_status_id,priority:1"`
Name string `json:"name" gorm:"size:128;not null"`
CategoryID uint `json:"category_id" gorm:"not null;index:idx_assets_user_status_category,priority:3"`
Category Category `json:"-"`
Quantity float64 `json:"quantity" gorm:"not null"`
UnitPrice float64 `json:"unit_price" gorm:"not null"`
TotalValue float64 `json:"total_value" gorm:"not null;index"`
Currency string `json:"currency" gorm:"size:16;not null"`
ExpiryDate *time.Time `json:"expiry_date,omitempty" gorm:"index"`
Note string `json:"note" gorm:"type:text"`
Status string `json:"status" gorm:"size:16;not null;default:active;check:status IN ('active','inactive');index:idx_assets_user_status_category,priority:2;index:idx_assets_user_status_id,priority:2"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}