From 3e382ee54463ebe74140d1ecc02a7acee0ba0c6e Mon Sep 17 00:00:00 2001
From: Petar Hristov <hristov@itc.rwth-aachen.de>
Date: Tue, 12 Jul 2022 17:47:44 +0200
Subject: [PATCH] obj

---
 .../ProjectQuotaExtendedReturnObject.cs       | 40 +++++++++++++++++++
 .../ReturnObjects/ProjectQuotaReturnObject.cs |  5 ---
 2 files changed, 40 insertions(+), 5 deletions(-)
 create mode 100644 src/Database/ReturnObjects/ProjectQuotaExtendedReturnObject.cs

diff --git a/src/Database/ReturnObjects/ProjectQuotaExtendedReturnObject.cs b/src/Database/ReturnObjects/ProjectQuotaExtendedReturnObject.cs
new file mode 100644
index 0000000..e4068f1
--- /dev/null
+++ b/src/Database/ReturnObjects/ProjectQuotaExtendedReturnObject.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+
+namespace Coscine.Database.ReturnObjects;
+
+/// <summary>
+/// Contains information about the quota of a project by resource type.
+/// </summary>
+public class ProjectQuotaExtendedReturnObject
+{
+    /// <summary>
+    /// Id of the resoure type.
+    /// </summary>
+    public Guid Id { get; set; }
+
+    /// <summary>
+    /// Display name of the resource type.
+    /// </summary>
+    public string Name { get; set; }
+
+    /// <summary>
+    /// How much space is reserved by resources in total [GiB]. Is equal to the sum of all resource quota reserved values.
+    /// </summary>
+    public QuotaDimObject TotalReserved { get; set; }
+
+    /// <summary>
+    /// How much space is currently allocated and is available to be taken by resources [GiB] (See Database, Table 'ProjectQuotas', Column 'Quota').
+    /// </summary>
+    public QuotaDimObject Allocated { get; set; }
+
+    /// <summary>
+    /// How much maximum space is possible to be taken by resources [GiB] (See Database, Table 'ProjectQuotas', Column 'MaxQuota').
+    /// </summary>
+    public QuotaDimObject Maximum { get; set; }
+
+    /// <summary>
+    /// Resources quota for all individual resources of a resource type in a selected project.
+    /// </summary>
+    public IEnumerable<ResourceQuotaReturnObject> ResourcesQuota { get; set; }
+}
\ No newline at end of file
diff --git a/src/Database/ReturnObjects/ProjectQuotaReturnObject.cs b/src/Database/ReturnObjects/ProjectQuotaReturnObject.cs
index 297ea20..dd9382f 100644
--- a/src/Database/ReturnObjects/ProjectQuotaReturnObject.cs
+++ b/src/Database/ReturnObjects/ProjectQuotaReturnObject.cs
@@ -32,9 +32,4 @@ public class ProjectQuotaReturnObject
     /// How much maximum space is possible to be taken by resources [GiB] (See Database, Table 'ProjectQuotas', Column 'MaxQuota').
     /// </summary>
     public QuotaDimObject Maximum { get; set; }
-
-    /// <summary>
-    /// Resources quota for all individual resources of a resource type in a selected project.
-    /// </summary>
-    public IEnumerable<ResourceQuotaReturnObject> ResourcesQuota { get; set; }
 }
\ No newline at end of file
-- 
GitLab