Skills now saved / returned
Edging closer to #2 completion; need to finish styles, create display page, and put some interesting stuff on the dashboard
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace JobsJobsJobs.Shared.Api
|
||||
{
|
||||
@@ -52,7 +53,17 @@ namespace JobsJobsJobs.Shared.Api
|
||||
/// The user's past experience
|
||||
/// </summary>
|
||||
public string Experience { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// The skills for the user
|
||||
/// </summary>
|
||||
public ICollection<SkillForm> Skills { get; set; } = new List<SkillForm>();
|
||||
|
||||
/// <summary>
|
||||
/// Create an instance of this form from the given profile
|
||||
/// </summary>
|
||||
/// <param name="profile">The profile off which this form will be based</param>
|
||||
/// <returns>The profile form, popluated with values from the given profile</returns>
|
||||
public static ProfileForm FromProfile(Profile profile) =>
|
||||
new ProfileForm
|
||||
{
|
||||
|
||||
28
src/JobsJobsJobs/Shared/Api/SkillForm.cs
Normal file
28
src/JobsJobsJobs/Shared/Api/SkillForm.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace JobsJobsJobs.Shared.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// The fields required for a skill
|
||||
/// </summary>
|
||||
public class SkillForm
|
||||
{
|
||||
/// <summary>
|
||||
/// The ID of this skill
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Id { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// The description of the skill
|
||||
/// </summary>
|
||||
[StringLength(100)]
|
||||
public string Description { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Notes regarding the skill
|
||||
/// </summary>
|
||||
[StringLength(100)]
|
||||
public string? Notes { get; set; } = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user