import {LoanModelCallBacks} from './loan.model'; export class RewardModel { constructor( public Amount: number, public Description: string, public Id: number, public LoanId: string, public PayOutId: number, public To: string, public From: string, public Ts: Date, private lc: LoanModelCallBacks ){} public get Role(): string { return this.lc.getUserRole(this.To); } public get UserId(): string { return this.To; } public set UserId(v) { this.To = v; } public get UserName(): string { return this.lc.getUserName(this.To); } public get photoUrlTo(): string{ return this.lc.getUserPhotoUrl(this.To); } public get photoUrlFrom(): string{ return this.lc.getUserPhotoUrl(this.From); } }