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

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

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

            if (Username != pkey.Username) return false;
            if (PreferenceKey != pkey.PreferenceKey) return false;
            if (ProfileName != pkey.ProfileName) 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}'; " ;                declareSql=declareSql+$"declare @__tkey_ProfileName_2 varchar(50) select @__tkey_ProfileName_2 ='{ProfileName}'; " ;
                return declareSql;
            }
        }
    }
    /* builder.Entity<SecurityUserWebPagePreferenceEntity>().HasKey(c => new {        c.Username,        c.PreferenceKey,        c.ProfileName});    */
