Skip to content

Commit

Permalink
Merge pull request #87 from CAUCA-9-1-1/#163_add_city_to_building
Browse files Browse the repository at this point in the history
#163 add city to building
  • Loading branch information
philipperobertgh authored Jul 16, 2018
2 parents 2a22446 + 02e8a11 commit 680a470
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Survi.Prevention.DataLayer/Mapping/BuildingMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public override void Map(EntityTypeBuilder<Building> b)
b.HasOne(m => m.RiskLevel).WithMany().HasForeignKey(m => m.IdRiskLevel);
b.HasOne(m => m.UtilisationCode).WithMany().HasForeignKey(m => m.IdUtilisationCode);
b.HasOne(m => m.Lane).WithMany().HasForeignKey(m => m.IdLane);
b.HasOne(m => m.Transversal).WithMany().HasForeignKey(m => m.IdLaneTransversal);
b.HasOne(m => m.City).WithMany().HasForeignKey(m => m.IdCity);
b.HasOne(m => m.Transversal).WithMany().HasForeignKey(m => m.IdLaneTransversal);
b.HasOne(m => m.Picture).WithMany().HasForeignKey(m => m.IdPicture);
b.HasOne(m => m.Detail).WithOne(m => m.Building).HasForeignKey<BuildingDetail>(m => m.IdBuilding);

Expand Down
6 changes: 4 additions & 2 deletions Survi.Prevention.Models/Buildings/Building.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public class Building : BaseModel
public string Details { get; set; }
public BuildingChildType ChildType { get; set; }

public Guid IdLane { get; set; }
public Guid IdCity { get; set; }
public Guid IdLane { get; set; }
public Guid? IdLaneTransversal { get; set; }
public Guid? IdUtilisationCode { get; set; }
public Guid IdRiskLevel { get; set; }
Expand All @@ -45,7 +46,8 @@ public class Building : BaseModel

public RiskLevel RiskLevel { get; set; }
public UtilisationCode UtilisationCode { get; set; }
public Lane Lane { get; set; }
public City City { get; set; }
public Lane Lane { get; set; }
public Lane Transversal { get; set; }
public Building Parent { get; set; }
public Picture Picture { get; set; }
Expand Down

0 comments on commit 680a470

Please sign in to comment.