Skip to content

Commit

Permalink
feat(people): allow the assignment and loading of a degree and rank t…
Browse files Browse the repository at this point in the history
…o a person
  • Loading branch information
CarlosPavajeau committed Sep 13, 2021
1 parent 65d80e4 commit a8285d5
Show file tree
Hide file tree
Showing 10 changed files with 1,730 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ public class CreatePersonRequest

[Required(ErrorMessage = "El rol de la persona es requerido.")]
public string RoleName { get; set; }

[Required(ErrorMessage = "El grado de la persona es requerido.")]
public int DegreeId { get; set; }
}
}
2 changes: 2 additions & 0 deletions src/Armory/Degrees/Domain/Degree.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Armory.People.Domain;
using Armory.Ranks.Domain;
using Armory.Troopers.Domain;

Expand All @@ -22,5 +23,6 @@ public Degree(string name, int rankId)
[ForeignKey("RankId")] public Rank Rank { get; set; }

public ICollection<Troop> Troopers { get; set; }
public ICollection<Person> People { get; set; }
}
}
Loading

0 comments on commit a8285d5

Please sign in to comment.