Files
SocialPub/PrivaPub/Models/Group/Group.cs
T

47 lines
1.4 KiB
C#
Raw Normal View History

using MongoDB.Entities;
namespace PrivaPub.Models.Group
{
public class Group : Entity
{
public string UserName { get; set; }//preferredUsername
public string Name { get; set; }//name
public string Description { get; set; }//summary, Markdown
public string Url { get; set; }
public string Domain { get; set; }
public string InboxURL { get; set; }
public string OutboxURL { get; set; }
public string PictureURL { get; set; }//icon
public string ThumbnailURL { get; set; }//image
public string PrivateKey { get; set; }
public string PublicKey { get; set; }
public bool IsDiscoverable { get; set; } = true;
public bool ManuallyApprovesMembers { get; set; }
public string OwnerAvatarId { get; set; }
public List<GroupMember> Members { get; set; } = new();
public string InvitationCode { get; set; }
public string HashedInvitationPassword { get; set; }
public DateTime CreationDate { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public DateTime? DeletionAt { get; set; }
}
public class GroupMember
{
public string AvatarId { get; set; }//local Avatar.ID, or the actor URI when IsForeign
public bool IsForeign { get; set; }
public GroupRole Role { get; set; } = GroupRole.Member;
public DateTime JoinedAt { get; set; } = DateTime.UtcNow;
}
public enum GroupRole
{
Member,
Moderator,
Owner
}
}