char -> uuid
This commit is contained in:
@@ -13,10 +13,10 @@ import (
|
||||
// @Description Если IsSnapshot=false — Patch содержит JSON Patch относительно предыдущей версии.
|
||||
// swagger:model Version
|
||||
type Version struct {
|
||||
ID uuid.UUID `json:"id" gorm:"type:char(36);primaryKey" example:"550e8400-e29b-41d4-a716-446655440001"`
|
||||
DocumentID uuid.UUID `json:"document_id" gorm:"type:char(36);index" example:"550e8400-e29b-41d4-a716-446655440000"`
|
||||
Document Document `json:"-" gorm:"constraint:OnDelete:CASCADE;"`
|
||||
ParentID *uuid.UUID `json:"parent_id,omitempty" gorm:"type:char(36);" example:"null"`
|
||||
ID uuid.UUID `json:"id" gorm:"type:uuid;default:gen_random_uuid();primaryKey" example:"550e8400-e29b-41d4-a716-446655440000"`
|
||||
DocumentID uuid.UUID `json:"document_id" gorm:"type:uuid;index" example:"550e8400-e29b-41d4-a716-446655440000"`
|
||||
Document *Document `json:"-" gorm:"foreignKey:DocumentID;references:ID;constraint:OnDelete:CASCADE,OnUpdate:CASCADE;"`
|
||||
ParentID *uuid.UUID `json:"parent_id,omitempty" gorm:"type:uuid;" example:"null"`
|
||||
IsSnapshot bool `json:"is_snapshot" example:"false"`
|
||||
|
||||
// JSON Patch или nil, если Snapshot
|
||||
|
||||
Reference in New Issue
Block a user