-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c747ba
commit de87970
Showing
38 changed files
with
298 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Linq; | ||
using Mapster; | ||
using Pims.Dal.Helpers.Extensions; | ||
using Entity = Pims.Dal.Entities; | ||
using Model = Pims.Api.Areas.Lease.Models.Search; | ||
|
||
namespace Pims.Api.Areas.Lease.Mapping.Search | ||
{ | ||
public class LeaseMap : IRegister | ||
{ | ||
public void Register(TypeAdapterConfig config) | ||
{ | ||
config.NewConfig<Entity.PimsLease, Model.LeaseModel>() | ||
.Map(dest => dest.Id, src => src.LeaseId) | ||
.Map(dest => dest.LFileNo, src => src.LFileNo) | ||
.Map(dest => dest.ExpiryDate, src => src.GetExpiryDate()) | ||
.Map(dest => dest.ProgramName, src => src.GetProgramName()) | ||
.Map(dest => dest.TenantNames, src => src.PimsLeaseTenants.Select(t => t.GetTenantName())) | ||
.Map(dest => dest.Properties, src => src.GetProperties()) | ||
.Map(dest => dest.StatusType, src => src.LeaseStatusTypeCodeNavigation); | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
source/backend/api/Areas/Leases/Models/Search/PropertyMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Mapster; | ||
using Entity = Pims.Dal.Entities; | ||
using Model = Pims.Api.Areas.Lease.Models.Search; | ||
|
||
namespace Pims.Api.Areas.Lease.Mapping.Search | ||
{ | ||
public class PropertyMap : IRegister | ||
{ | ||
public void Register(TypeAdapterConfig config) | ||
{ | ||
config.NewConfig<Entity.PimsProperty, Model.PropertyModel>() | ||
.Map(dest => dest.Id, src => src.PropertyId) | ||
.Map(dest => dest.Pin, src => src.Pin) | ||
.Map(dest => dest.Pid, src => src.Pid) | ||
.Map(dest => dest.Address, src => src.Address); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.