New Settings entity

This commit is contained in:
Artemy
2025-07-21 17:06:01 +07:00
parent c434ca447c
commit 4054e4046a
4 changed files with 89 additions and 15 deletions
@@ -0,0 +1,15 @@
namespace Govor.Core.Models.Users;
public class PrivacyRuleEntity
{
public Guid Id { get; set; }
public Guid OwnerId { get; set; }
public PrivacyTargetArea Area { get; set; }
public WhoCan AccessType { get; set; } // Everyone, Friends, None
public List<Guid> Whitelist { get; set; } = new();
public List<Guid> Blacklist { get; set; } = new();
public PrivacyUserSettings OwnerSettings { get; set; } = null!;
}
+22 -15
View File
@@ -3,22 +3,15 @@ namespace Govor.Core.Models.Users;
public class PrivacyUserSettings
{
public Guid UserId { get; set; }
public bool IsGlobalAccount { get; set; }
public WhoCan CanSend { get; set; }
public List<Guid>? WhitelistSent { get; set; }
public List<Guid>? BlacklistSent { get; set; }
public WhoCan CanSeeTimeWas { get; set; }
public List<Guid>? WhitelistTimeWas { get; set; }
public List<Guid>? BlacklistTimeWas { get; set; }
public WhoCan CanSeeImage { get; set; }
public List<Guid>? WhitelistSeeImage { get; set; }
public List<Guid>? BlacklistSeeImage{ get; set; }
public DeletingMessagesVia Via { get; set; } // if min value = none
public bool IsGlobalAccount { get; set; }
public DeletingMessagesVia DeletingVia { get; set; }
public int DeletingIn { get; set; }
public bool IsInvisibleMode { get; set; }
public List<PrivacyRuleEntity> Rules { get; set; } = new();
}
public enum WhoCan
@@ -37,3 +30,17 @@ public enum DeletingMessagesVia
Years = 4
}
public enum PrivacyTargetArea
{
CanSend = 0,
CanSeeTimeWas = 1,
CanSeeImage = 2
}
public enum PrivacyRuleType
{
Allow = 0,
Deny = 1
}