using CloudBuilder.Core.Authorization;
namespace CloudBuilder.Security
{
    [TypeScript]
    public class SecurityPermissionDependentEntityKey
    {
        public string PermissionName  { get; set; }
        public string DependentDetailName  { get; set; }

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

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

            if (PermissionName != pkey.PermissionName) return false;
            if (DependentDetailName != pkey.DependentDetailName) return false;

            return true;
        }


            public override string ToString()
            {
                string declareSql="";
                declareSql=declareSql+$"declare @__tkey_PermissionName_0 varchar(50) select @__tkey_PermissionName_0 ='{PermissionName}'; " ;                declareSql=declareSql+$"declare @__tkey_DependentDetailName_1 varchar(50) select @__tkey_DependentDetailName_1 ='{DependentDetailName}'; " ;
                return declareSql;
            }
        }
    }
    /* builder.Entity<SecurityPermissionDependentEntity>().HasKey(c => new {        c.PermissionName,        c.DependentDetailName});    */
