diff --git a/models/version.go b/models/version.go index 8ebaf3b..0af3db1 100644 --- a/models/version.go +++ b/models/version.go @@ -20,10 +20,10 @@ type Version struct { IsSnapshot bool `json:"is_snapshot" example:"false"` // JSON Patch или nil, если Snapshot - Patch json.RawMessage `json:"patch,omitempty" gorm:"type:json" example:"[{\"op\":\"replace\",\"path\":\"/name\",\"value\":\"new name\"}]"` + Patch json.RawMessage `json:"patch,omitempty" gorm:"type:json"` // Полный JSON, если IsSnapshot = true - Snapshot json.RawMessage `json:"snapshot,omitempty" gorm:"type:json" example:"{\"field\": \"value\"}"` + Snapshot json.RawMessage `json:"snapshot,omitempty" gorm:"type:json"` CreatedAt time.Time `json:"created_at" example:"2025-01-02T15:04:05Z"` }