Skip to content

Commit

Permalink
feat(#163): Add id_city to building
Browse files Browse the repository at this point in the history
  • Loading branch information
mickjol committed Jul 12, 2018
1 parent 6dd00d1 commit 02e8a11
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 02e8a11

Please sign in to comment.