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

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

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

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

            return true;
        }


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