using CloudBuilder.Core.Authorization;
namespace CloudBuilder.Security
{
    [TypeScript]
    public class SecurityUserWebLoginEntityKey
    {
        public string SessionId  { get; set; }
        public string Username  { get; set; }

        public override bool Equals(object obj)
        {
            if (this == obj) return true;

            SecurityUserWebLoginEntityKey pkey = obj as SecurityUserWebLoginEntityKey;
            if (pkey == null) return false;

            if (SessionId != pkey.SessionId) return false;
            if (Username != pkey.Username) return false;

            return true;
        }


            public override string ToString()
            {
                string declareSql="";
                declareSql=declareSql+$"declare @__tkey_SessionId_0 varchar(50) select @__tkey_SessionId_0 ='{SessionId}'; " ;                declareSql=declareSql+$"declare @__tkey_Username_1 varchar(50) select @__tkey_Username_1 ='{Username}'; " ;
                return declareSql;
            }
        }
    }
    /* builder.Entity<SecurityUserWebLoginEntity>().HasKey(c => new {        c.SessionId,        c.Username});    */
