using Remotely.Shared.Enums; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Remotely.Shared.Models { public class Organization { public ICollection Alerts { get; set; } public ICollection ApiTokens { get; set; } public BrandingInfo BrandingInfo { get; set; } public ICollection CommandResults { get; set; } public ICollection DeviceGroups { get; set; } public ICollection Devices { get; set; } public ICollection EventLogs { get; set; } public string GithubUser { get; set; } [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public string ID { get; set; } public ICollection InviteLinks { get; set; } public bool IsDefaultOrganization { get; set; } public double SponsorAmount { get; set; } [NotMapped] public SponsorLevel SponsorLevel { get { if (SponsorAmount < 10) { return SponsorLevel.None; } if (SponsorAmount < 20) { return SponsorLevel.Relay; } return SponsorLevel.Branding; } } [StringLength(25)] public string OrganizationName { get; set; } public string RelayCode { get; set; } public ICollection RemotelyUsers { get; set; } public ICollection SharedFiles { get; set; } public string UnlockCode { get; set; } } }