Files
Wino-Mail/Wino.Core.Domain/Entities/MailAccountAlias.cs

57 lines
1.6 KiB
C#
Raw Normal View History

2024-08-15 16:02:02 +02:00
using System;
using SQLite;
namespace Wino.Core.Domain.Entities
{
2024-08-17 19:54:52 +02:00
public class RemoteAccountAlias
2024-08-15 16:02:02 +02:00
{
2024-08-15 16:13:18 +02:00
/// <summary>
/// Display address of the alias.
/// </summary>
2024-08-15 16:02:02 +02:00
public string AliasAddress { get; set; }
2024-08-15 16:13:18 +02:00
/// <summary>
/// Address to be included in Reply-To header when alias is used for sending messages.
/// </summary>
2024-08-15 16:11:12 +02:00
public string ReplyToAddress { get; set; }
2024-08-15 16:13:18 +02:00
/// <summary>
/// Whether this alias is the primary alias for the account.
/// </summary>
2024-08-15 16:02:02 +02:00
public bool IsPrimary { get; set; }
2024-08-15 16:13:18 +02:00
2024-08-17 19:54:52 +02:00
/// <summary>
/// Whether the alias is verified by the server.
/// Only Gmail aliases are verified for now.
/// Non-verified alias messages might be rejected by SMTP server.
/// </summary>
public bool IsVerified { get; set; }
/// <summary>
/// Whether this alias is the root alias for the account.
/// Root alias means the first alias that was created for the account.
/// It can't be deleted or changed.
/// </summary>
public bool IsRootAlias { get; set; }
2024-08-17 19:54:52 +02:00
}
2024-08-17 19:54:52 +02:00
public class MailAccountAlias : RemoteAccountAlias
{
2024-08-15 16:13:18 +02:00
/// <summary>
2024-08-17 19:54:52 +02:00
/// Unique Id for the alias.
2024-08-15 16:13:18 +02:00
/// </summary>
2024-08-17 19:54:52 +02:00
[PrimaryKey]
public Guid Id { get; set; }
/// <summary>
/// Account id that this alias is attached to.
/// </summary>
public Guid AccountId { get; set; }
/// <summary>
/// Root aliases can't be deleted.
/// </summary>
public bool CanDelete => !IsRootAlias;
2024-08-15 16:02:02 +02:00
}
}