Esempio n. 1
0
 public RentaDto(Renta renta)
 {
     HasQRWrite       = renta.HasQRWrite;
     PriceId          = renta.PriceId;
     RentaId          = renta.Id;
     FinalPrice       = BillingHelper.GetFinalPrice(renta);
     BasePrice        = renta.BasePrice;
     Discount         = renta.Discount;
     Scoring          = renta.CurrentScoring;
     CharacterName    = renta.Sin?.Passport?.PersonName ?? "Unknown";
     ProductType      = renta.Sku?.Nomenklatura?.Specialisation?.ProductType?.Name;
     Shop             = renta.Shop?.Name;
     NomenklaturaName = $"{renta.Sku?.Nomenklatura?.Name} x {renta.Count}";
     SkuName          = renta.Sku?.Name;
     Corporation      = renta.Sku?.Corporation?.Name;
     QRRecorded       = renta.QRRecorded;
     DateCreated      = renta.DateCreated;
     Specialisation   = renta.Sku?.Nomenklatura?.Specialisation?.Name;
     Stealable        = renta.Stealable;
     Count            = renta.Count;
     BeatId           = renta.BeatId;
 }