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 ToId: string,
    public FromId: string,
    public Ts: Date,
    private lc: LoanModelCallBacks
  ){}


  public get Role(): string {
    return this.lc.getUserRole(this.ToId);
  }

  // public get UserId(): string {
  //   return this.ToId;
  // }
  //
  // public set UserId(v) {
  //   this.ToId = v;
  // }

  public get UserName(): string {
    return this.lc.getUserName(this.ToId);
  }

  public get photoUrlTo(): string{
    return this.lc.getUserPhotoUrl(this.ToId);
  }

  public get photoUrlFrom(): string{
    return this.lc.getUserPhotoUrl(this.FromId);
  }
}



