36 lines
1.3 KiB
C#
36 lines
1.3 KiB
C#
|
|
using CloudBuilder.Core.Authorization;
|
|
namespace CloudBuilder.Master
|
|
{
|
|
[TypeScript]
|
|
public class FamilyTreeSpouseMapEntityKey
|
|
{
|
|
public string PersonId { get; set; }
|
|
public string SpouseId { get; set; }
|
|
public string TreeId { get; set; }
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (this == obj) return true;
|
|
|
|
FamilyTreeSpouseMapEntityKey pkey = obj as FamilyTreeSpouseMapEntityKey;
|
|
if (pkey == null) return false;
|
|
|
|
if (PersonId != pkey.PersonId) return false;
|
|
if (SpouseId != pkey.SpouseId) return false;
|
|
if (TreeId != pkey.TreeId) return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
|
|
public override string ToString()
|
|
{
|
|
string declareSql="";
|
|
declareSql=declareSql+$"declare @__tkey_PersonId_0 varchar(50) select @__tkey_PersonId_0 ='{PersonId}'; " ; declareSql=declareSql+$"declare @__tkey_SpouseId_1 varchar(50) select @__tkey_SpouseId_1 ='{SpouseId}'; " ; declareSql=declareSql+$"declare @__tkey_TreeId_2 varchar(50) select @__tkey_TreeId_2 ='{TreeId}'; " ;
|
|
return declareSql;
|
|
}
|
|
}
|
|
}
|
|
/* builder.Entity<FamilyTreeSpouseMapEntity>().HasKey(c => new { c.PersonId, c.SpouseId, c.TreeId}); */
|