From d865ee2766620092e1be3fa091398ef9d6c09627 Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 2 Oct 2024 16:44:39 +0200 Subject: [PATCH] storage type as enum --- models/resources/storage/storage.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/resources/storage/storage.go b/models/resources/storage/storage.go index 0f71a9a..39e7f97 100644 --- a/models/resources/storage/storage.go +++ b/models/resources/storage/storage.go @@ -40,7 +40,8 @@ type URL struct { type StorageResource struct { resource_model.AbstractResource // AbstractResource contains the basic fields of an object (id, name) Acronym string `bson:"acronym,omitempty" json:"acronym,omitempty"` // Acronym is the acronym of the storage - Type StorageType `bson:"type" json:"type" default:"0"` // Type is the type of the storage + Type string `bson:"type,omitempty" json:"type,omitempty"` // Type is the type of the storage + SizeType StorageType `bson:"sizeType" json:"sizeType" default:"0"` // SizeType is the type of the storage size Size uint `bson:"size,omitempty" json:"size,omitempty"` // Size is the size of the storage Url *URL `bson:"url,omitempty" json:"url,omitempty"` // Will allow to select between several protocols Local bool `bson:"local" json:"local"` // Local is a flag that indicates if the storage is local