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 TreeId { get; set; }
|
|
public string PersonId { get; set; }
|
|
public string SpouseId { get; set; }
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (this == obj) return true;
|
|
|
|
FamilyTreeSpouseMapEntityKey pkey = obj as FamilyTreeSpouseMapEntityKey;
|
|
if (pkey == null) return false;
|
|
|
|
if (TreeId != pkey.TreeId) return false;
|
|
if (PersonId != pkey.PersonId) return false;
|
|
if (SpouseId != pkey.SpouseId) return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
|
|
public override string ToString()
|
|
{
|
|
string declareSql="";
|
|
declareSql=declareSql+$"declare @__tkey_TreeId_0 varchar(50) select @__tkey_TreeId_0 ='{TreeId}'; " ; declareSql=declareSql+$"declare @__tkey_PersonId_1 varchar(50) select @__tkey_PersonId_1 ='{PersonId}'; " ; declareSql=declareSql+$"declare @__tkey_SpouseId_2 varchar(50) select @__tkey_SpouseId_2 ='{SpouseId}'; " ;
|
|
return declareSql;
|
|
}
|
|
}
|
|
}
|
|
/* builder.Entity<FamilyTreeSpouseMapEntity>().HasKey(c => new { c.TreeId, c.PersonId, c.SpouseId}); */
|