package caasmmodel

import (
	"time"

	coremodel "security-center-backend/internal/model"
)

type AssetHistory struct {
	coremodel.Base
	AssetID   uint64          `json:"asset_id" gorm:"index"`
	Asset     Asset           `json:"-"`
	Action    string          `json:"action" gorm:"size:32"` // create, update, delete
	Changes   coremodel.JSONB `json:"changes" gorm:"type:json"`
	ChangedBy string          `json:"changed_by" gorm:"size:320"`
	ChangedAt time.Time       `json:"changed_at"`
}

func (AssetHistory) TableName() string {
	return "asset_history"
}
