using CloudBuilder.Core.Authorization;
namespace CloudBuilder.Security
{
    [TypeScript]
    public class SecurityLockEntityKey
    {
        public string EntityName  { get; set; }
        public string PkeyId  { get; set; }
        public string LockedByActor  { get; set; }

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

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

            if (EntityName != pkey.EntityName) return false;
            if (PkeyId != pkey.PkeyId) return false;
            if (LockedByActor != pkey.LockedByActor) return false;

            return true;
        }


            public override string ToString()
            {
                string declareSql="";
                declareSql=declareSql+$"declare @__tkey_EntityName_0 varchar(50) select @__tkey_EntityName_0 ='{EntityName}'; " ;                declareSql=declareSql+$"declare @__tkey_PkeyId_1 varchar(50) select @__tkey_PkeyId_1 ='{PkeyId}'; " ;                declareSql=declareSql+$"declare @__tkey_LockedByActor_2 varchar(50) select @__tkey_LockedByActor_2 ='{LockedByActor}'; " ;
                return declareSql;
            }
        }
    }
    /* builder.Entity<SecurityLockEntity>().HasKey(c => new {        c.EntityName,        c.PkeyId,        c.LockedByActor});    */
