diff --git a/Vpdb/Models/User.cs b/Vpdb/Models/User.cs index fe0d674..46eb4f8 100644 --- a/Vpdb/Models/User.cs +++ b/Vpdb/Models/User.cs @@ -3,6 +3,9 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Xml; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; namespace VpdbAgent.Vpdb.Models { @@ -24,13 +27,14 @@ public class UserCounter public class UserFull : User { - public string Plan { get; set; } + public PlanDetails Plan { get; set; } public string Provider { get; set; } public string Email { get; set; } public string CreatedAt { get; set; } public bool IsActive { get; set; } public List Roles { get; set; } public Permission Permissions { get; set; } + public QuotaDetails Quota { get; set; } public class Permission { @@ -48,5 +52,26 @@ public class Permission public List User { get; set; } public List Messages { get; set; } } + + public class PlanDetails + { + public string Id { get; set; } + public bool AppTokensEnabled { get; set; } + public bool PushNotificationsEnabled { get; set; } + } + + public class QuotaDetails + { + public int Limit { get; set; } + public Period Period { get; set; } + public int Remaining { get; set; } + public long Reset { get; set; } + public bool Unlimited { get; set; } + } + + public enum Period + { + Minute, Hour, Day, Week, Never + } } }