using CloudBuilder.Core.Authorization;
namespace CloudBuilder.Security
{
    [TypeScript]
    public class SecurityMasterEntityKey
    {
        public string MasterCategory  { get; set; }
        public string MasterSubcategory  { get; set; }
        public string MasterCodeItem  { get; set; }

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

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

            if (MasterCategory != pkey.MasterCategory) return false;
            if (MasterSubcategory != pkey.MasterSubcategory) return false;
            if (MasterCodeItem != pkey.MasterCodeItem) return false;

            return true;
        }


            public override string ToString()
            {
                string declareSql="";
                declareSql=declareSql+$"declare @__tkey_MasterCategory_0 varchar(50) select @__tkey_MasterCategory_0 ='{MasterCategory}'; " ;                declareSql=declareSql+$"declare @__tkey_MasterSubcategory_1 varchar(50) select @__tkey_MasterSubcategory_1 ='{MasterSubcategory}'; " ;                declareSql=declareSql+$"declare @__tkey_MasterCodeItem_2 varchar(50) select @__tkey_MasterCodeItem_2 ='{MasterCodeItem}'; " ;
                return declareSql;
            }
        }
    }
    /* builder.Entity<SecurityMasterEntity>().HasKey(c => new {        c.MasterCategory,        c.MasterSubcategory,        c.MasterCodeItem});    */
