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

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

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

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

            return true;
        }


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