unit Unit2;
interface
uses
System.Generics.Collections;
type
TLocationDateTime =
record
Location:
string;
Timestamp: TDateTime;
end;
TPersonViewModel =
class
private
FID: TGUID;
FLastName:
string;
FFirstName:
string;
FBorn: TLocationDateTime;
FDied: TLocationDateTime;
public
property ID: TGUID
read FID
write FID;
property LastName:
string read FLastName;
property FirstName:
string read FFirstName;
property Born: TLocationDateTime
read FBorn;
property Died: TLocationDateTime
read FDied;
end;
TParentViewModel =
class( TPersonViewModel )
private
FFather: TPersonViewModel;
FMother: TPersonViewModel;
public
property Father: TPersonViewModel
read FFather;
property Mother: TPersonViewModel
read FMother;
end;
TChildViewModel =
class( TPersonViewModel )
private
FEngagedTo: TList<TPersonViewModel>;
public
property EngagedTo: TList<TPersonViewModel>
read FEngagedTo;
end;
TRelationViewModel =
class( TPersonViewModel )
private
FChildren: TList<TChildViewModel>;
public
property Children: TList<TChildViewModel>
read FChildren;
end;
TSelectedPersonViewModel =
class( TPersonViewModel )
private
FFather: TParentViewModel;
FMother: TParentViewModel;
FRelations: TList<TRelationViewModel>;
FSiblings: TList<TChildViewModel>;
public
property Father: TParentViewModel
read FFather;
property Mother: TParentViewModel
read FMother;
property Siblings: TList<TChildViewModel>
read FSiblings;
property Relations: TList<TRelationViewModel>
read FRelations;
end;
implementation
end.