33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using CloudBuilder.Core.Authorization;
|
|
namespace CloudBuilder.Security
|
|
{
|
|
[TypeScript]
|
|
public class SecurityPermissionFunctionMapEntityKey
|
|
{
|
|
public string PermissionName { get; set; }
|
|
public string FunctionName { get; set; }
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (this == obj) return true;
|
|
|
|
SecurityPermissionFunctionMapEntityKey pkey = obj as SecurityPermissionFunctionMapEntityKey;
|
|
if (pkey == null) return false;
|
|
|
|
if (PermissionName != pkey.PermissionName) return false;
|
|
if (FunctionName != pkey.FunctionName) 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_FunctionName_1 varchar(50) select @__tkey_FunctionName_1 ='{FunctionName}'; " ;
|
|
return declareSql;
|
|
}
|
|
}
|
|
}
|
|
/* builder.Entity<SecurityPermissionFunctionMapEntity>().HasKey(c => new { c.PermissionName, c.FunctionName}); */
|