diff --git a/Internship.Core/Internship.Core.csproj b/Internship.Core/Internship.Core.csproj deleted file mode 100644 index 8642d92..0000000 --- a/Internship.Core/Internship.Core.csproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - netcoreapp3.1 - - - diff --git a/src/Internship.Api/Controllers/WeatherForecastController.cs b/src/Internship.Api/Controllers/WeatherForecastController.cs deleted file mode 100644 index 0d6af37..0000000 --- a/src/Internship.Api/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using Serilog; - -namespace Internship.Api.Controllers -{ - [ApiController] - [Route("[controller]")] - public class WeatherForecastController : ControllerBase - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - private readonly ILogger _logger; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet] - public IEnumerable Get() - { - var rng = new Random(); - - Log.Warning("Randomly generated number was: {Rng}", rng); - - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = DateTime.Now.AddDays(index), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }) - .ToArray(); - } - } -} diff --git a/src/Internship.Api/Internship.Api.csproj b/src/Internship.Api/Internship.Api.csproj index b69d036..720285f 100644 --- a/src/Internship.Api/Internship.Api.csproj +++ b/src/Internship.Api/Internship.Api.csproj @@ -12,4 +12,8 @@ + + + + diff --git a/src/Internship.Api/WeatherForecast.cs b/src/Internship.Api/WeatherForecast.cs deleted file mode 100644 index 808d8fc..0000000 --- a/src/Internship.Api/WeatherForecast.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace Internship.Api -{ - public class WeatherForecast - { - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string Summary { get; set; } - } -} diff --git a/src/Internship.Core/Address.cs b/src/Internship.Core/Address.cs new file mode 100644 index 0000000..d921e9b --- /dev/null +++ b/src/Internship.Core/Address.cs @@ -0,0 +1,11 @@ +namespace Internship.Core +{ + public struct Address + { + public string Street { get; set; } + public string Building { get; set; } + public string City { get; set; } + public string PostalCode { get; set; } + public string Country { get; set; } + } +} \ No newline at end of file diff --git a/src/Internship.Core/BranchOffice.cs b/src/Internship.Core/BranchOffice.cs index 79cb9f9..3f0c80d 100644 --- a/src/Internship.Core/BranchOffice.cs +++ b/src/Internship.Core/BranchOffice.cs @@ -2,5 +2,7 @@ { public class BranchOffice { + public Company Company { get; set; } + public Address Address { get; set; } } } \ No newline at end of file diff --git a/src/Internship.Core/Company.cs b/src/Internship.Core/Company.cs new file mode 100644 index 0000000..57cf9dd --- /dev/null +++ b/src/Internship.Core/Company.cs @@ -0,0 +1,12 @@ +using System; + +namespace Internship.Core +{ + public class Company + { + public string Name { get; set; } + public RangeOfActivities Range { get; set; } + public Uri SiteAddress { get; set; } + public string Nip { get; set; } + } +} \ No newline at end of file diff --git a/src/Internship.Core/Course.cs b/src/Internship.Core/Course.cs new file mode 100644 index 0000000..44e9c1d --- /dev/null +++ b/src/Internship.Core/Course.cs @@ -0,0 +1,6 @@ +namespace Internship.Core +{ + public class Course + { + } +} \ No newline at end of file diff --git a/src/Internship.Core/DeanAcceptance.cs b/src/Internship.Core/DeanAcceptance.cs new file mode 100644 index 0000000..0eec430 --- /dev/null +++ b/src/Internship.Core/DeanAcceptance.cs @@ -0,0 +1,18 @@ +using System; + +namespace Internship.Core +{ + public struct DeanAcceptance + { + public DateTime AcceptanceDate { get; set; } + public bool IsDeansAcceptanceRequired { get; set; } + public DeanAcceptanceReason Reason { get; set; } + } + + public enum DeanAcceptanceReason + { + Semester, + Delay, + Whatever + } +} \ No newline at end of file diff --git a/src/Internship.Core/Edition.cs b/src/Internship.Core/Edition.cs index 097e763..8d6c6ac 100644 --- a/src/Internship.Core/Edition.cs +++ b/src/Internship.Core/Edition.cs @@ -6,6 +6,7 @@ namespace Internship.Core { public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } + public DateTime IPPDeadlineDate { get; set; } } } \ No newline at end of file diff --git a/src/Internship.Core/Insurance.cs b/src/Internship.Core/Insurance.cs new file mode 100644 index 0000000..e74cf57 --- /dev/null +++ b/src/Internship.Core/Insurance.cs @@ -0,0 +1,10 @@ +using System; + +namespace Internship.Core +{ + public struct Insurance + { + public DateTime InsuranceDeliveryDate { get; set; } + public bool IsInsuranceRequired { get; set; } + } +} \ No newline at end of file diff --git a/src/Internship.Core/Intern.cs b/src/Internship.Core/Intern.cs index 14dcf0d..6f65c68 100644 --- a/src/Internship.Core/Intern.cs +++ b/src/Internship.Core/Intern.cs @@ -7,5 +7,8 @@ namespace Internship.Core public string AlbumNumber { get; set; } public string Name { get; set; } public string Surname { get; set; } + public string Email { get; set; } + public Course Course { get; set; } + public int Semester { get; set; } } } \ No newline at end of file diff --git a/src/Internship.Core/Internship.cs b/src/Internship.Core/Internship.cs index 423a589..c876e7b 100644 --- a/src/Internship.Core/Internship.cs +++ b/src/Internship.Core/Internship.cs @@ -1,4 +1,6 @@ -namespace Internship.Core +using System; + +namespace Internship.Core { public class Internship { @@ -7,5 +9,13 @@ public Report Report { get; set; } public BranchOffice BranchOffice { get; set; } public InternshipProgram Program { get; set; } + public InternshipType Type { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + public bool IsAccepted { get; set; } + public DeanAcceptance DeanAcceptance { get; set; } + public Insurance Insurance { get; set; } + + public int InternshipLengthInWeeks { get; set; } } } \ No newline at end of file diff --git a/src/Internship.Core/InternshipType.cs b/src/Internship.Core/InternshipType.cs new file mode 100644 index 0000000..8fb9258 --- /dev/null +++ b/src/Internship.Core/InternshipType.cs @@ -0,0 +1,8 @@ +namespace Internship.Core +{ + public enum InternshipType + { + B2B, + Free + } +} \ No newline at end of file diff --git a/src/Internship.Core/RangeOfActivities.cs b/src/Internship.Core/RangeOfActivities.cs new file mode 100644 index 0000000..b3ff198 --- /dev/null +++ b/src/Internship.Core/RangeOfActivities.cs @@ -0,0 +1,6 @@ +namespace Internship.Core +{ + public enum RangeOfActivities + { + } +} \ No newline at end of file