Improved models' structure

This commit is contained in:
pb
2024-07-17 17:17:37 +02:00
parent f0eec45836
commit 3732187678
6 changed files with 69 additions and 65 deletions

View File

@@ -6,17 +6,17 @@ type URL struct {
}
type Storage struct {
Resource `json:"resource" required:"true"`
AbstractResource `json:"resource" required:"true" bson:"resource"`
Capacity uint `json:"capacity" required:"true"`
Url URL `json:"URL" ` // Will allow to select between several protocols
Capacity uint `json:"capacity,omitempty"`
Url URL `json:"url,omitempty"` // Will allow to select between several protocols
Encryption bool `json:"encryption" `
Redundancy string `json:"redundancy" `
Throughput string `json:"throughput" `
BookingPrice uint `json:"bookingPrice" `
Encryption bool `json:"encryption,omitempty"`
Redundancy string `json:"redundancy,omitempty"`
Throughput string `json:"throughput,omitempty"`
BookingPrice uint `json:"booking_price,omitempty"`
}
func (s *Storage) GetType() ResourceType{
func (s *Storage) GetType() ResourceType {
return STORAGE
}