


using System.Net.Mail;

using ASC.Common.Data.Sql.Expressions;
using ASC.Mail.Core.DbSchema.Tables;

namespace ASC.Mail.Core.Dao.Expressions.Mailbox
{
    public class ConcreteUserServerMailboxExp : СoncreteUserMailboxExp
    {
        public ConcreteUserServerMailboxExp(int id, int tenant, string user, bool? isRemoved = null)
            : base(id, tenant, user, isRemoved)
        {
        }

        public ConcreteUserServerMailboxExp(MailAddress address, int tenant, string user, bool? isRemoved = null)
            : base(address, tenant, user, isRemoved)
        {
        }

        public override Exp GetExpression()
        {
            var exp = base.GetExpression();

            exp = exp & Exp.Eq(MailboxTable.Columns.IsServerMailbox, true);

            return exp;
        }
    }
}